/**
Chatbot - CSS
 */
#chatbot-sticker {
    position: fixed;
    bottom: 10px;
    right: 10px;
    width: 60px;
    height: 60px;
    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;
}

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

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

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

.clear-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;
}

#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: 75%;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 1.6;
    word-wrap: break-word;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

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

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

#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;
}