/* Chat Toggle Button */
#chat-toggle-button {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 9998;
    transition: transform 0.2s ease-in-out;
}
#chat-toggle-button:hover {
    transform: scale(1.1);
}
#chat-toggle-button svg {
    width: 32px;
    height: 32px;
}

/* Main Chat Widget */
#chat-widget {
    position: fixed;
    bottom: 140px;
    right: 20px;
    width: 350px;
    max-width: 90%;
    height: 500px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    transition: opacity 0.3s, transform 0.3s;
    transform-origin: bottom right;
}

#chat-widget.hidden {
    opacity: 0;
    transform: scale(0.5);
    pointer-events: none; /* Make it unclickable when hidden */
}

/* Chat Header */
#chat-header {
    background-color: #007bff;
    color: white;
    padding: 15px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
}
#chat-header h5 {
    margin: 0;
    font-size: 1.1rem;
}

/* Messages Area */
#chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.4;
}

.bot-message {
    background-color: #f1f0f0;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.user-message {
    background-color: #007bff;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Options/Buttons Area */
#chat-options {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-option-button {
    width: 100%;
    padding: 12px;
    border: 1px solid #007bff;
    background-color: white;
    color: #007bff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s, color 0.2s;
}

.chat-option-button:hover {
    background-color: #007bff;
    color: white;
}