/**
Chatbot - CSS
 */
#chatbot-sticker {
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    z-index: 1000;
}

#chatbot-sticker img {
    width: 60px;
}

#chatbox {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 400px;
    height: 500px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all .4s ease;
}

#chatbox.expand {
    width: 1000px;
    max-width: 95%;
    height: 800px;
    max-height: 80%;
}

@media all and (max-width: 767px) {
    #chatbox {
        right: 10px;
    }
}

@media all and (max-width: 425px) {
    #chatbox {
        width: 95%;
    }

    #resize-chat {
        display: none;
    }
}

#chatbox-header {
    background-color: #3170B5;
    color: #fff;
    padding: 15px;
    text-align: center;
    font-size: 16px;
    border-radius: 10px 10px 0 0;
}

.clear-chat-button,
.resize-chat-button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 14px;
    right: 40px;
}

.clear-chat-button:hover {
    color: #ffcc00;
}

.resize-chat-button {
    right: 80px;
}

#chatbox-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #ffffff;
    scroll-behavior: smooth;
}

.chat-message {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.chat-message.user {
    align-items: flex-end;
}

.chat-message.gpt {
    align-items: flex-start;
}

.chat-message .sender {
    font-weight: bold;
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.chat-message .message {
    max-width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.6;
    word-wrap: break-word;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#chatbox.expand .chat-message .message {
    max-width: 90%;
}

.chat-message.user .message {
    background-color: #477db2;
    color: #fff;
    border-top-right-radius: 0;
}

.chat-message.user .message a {
    color: #fff;
    text-decoration: underline;
}

.chat-message.user .message p {
    margin: 0;
}

.chat-message.user .message a:hover {
    text-decoration: none;
}

.chat-message.gpt .message {
    background-color: #f1f1f1;
    color: #333;
    border-top-left-radius: 0;
}

.chat-message .suggestions {
    background: #DDD;
    margin: 1em 0;
    padding: 1em 2em;
    color: #666;
}

.chat-message .suggestions li {
    list-style-type: disclosure-closed;
}

.chat-message .suggestions a.question {
}

#chatbox-input {
    display: flex;
    border-top: 1px solid #ddd;
    padding: 10px;
    background-color: #f9f9f9;
}

#chatbox-input input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

#chatbox-input button {
    margin-left: 10px;
    background: #3170B5;
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#chatbox-input button:hover {
    background-color: #27568f;
}

#loading-indicator {
    display: none;
    align-self: center;
    margin: 10px 0;
    color: #3170B5;
    font-size: 14px;
    font-weight: bold;
    animation: fadeInOut 1s infinite;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

.close-chat-button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 14px;
    right: 10px;
}

.close-chat-button:hover {
    color: #f00;
}

#chatbox ul,
#chatbox ol {
    padding: .2em 1em .2em;
}

#chatbox li {
    padding: .2em 0;
}

#chatbox ul li {
    list-style-type: '- ';
}

#chatbox li p {
    margin: 0;
}

#chatbox h1,
#chatbox h2,
#chatbox h3,
#chatbox h4,
#chatbox h5,
#chatbox h6 {
    font-size: 1.3em;
    font-weight: bold !important;
    margin-top: 15px;
    margin-bottom: 15px;
}

#chatbox h1 {
    font-size: 1.7em;
}

#chatbox h2 {
    font-size: 1.5em;
}