/* chatWidget.css */
#archie-chat-widget {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 9999 !important;
    font-family: Arial, sans-serif;
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.chat-toggle-button {
    background-color: #007bff; /* Brand blue */
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    visibility: visible !important;
    opacity: 1 !important;
}

.chat-toggle-button:hover {
    transform: scale(1.05);
}

.chat-toggle-button .chat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Make it round */
}

.chat-container {
    display: none; /* Hidden by default */
    width: 350px;
    height: 500px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    flex-direction: column;
    overflow: hidden;
    position: fixed !important;
    bottom: 90px !important;
    right: 20px !important;
    z-index: 9999 !important;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.chat-container.open {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.chat-header {
    background-color: #0056b3; /* Darker blue for header */
    color: white;
    padding: 10px 15px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
}

.chat-header-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 10px;
}

.close-chat-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.chat-body {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #e9eff6; /* Light blue background for chat body */
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message-bubble {
    padding: 10px 15px;
    border-radius: 20px;
    max-width: 80%;
    word-wrap: break-word;
}

.message-bubble.user {
    align-self: flex-end;
    background-color: #007bff; /* Brand blue for user messages */
    color: white;
    border-bottom-right-radius: 5px; /* Sharper corner */
}

.message-bubble.assistant {
    align-self: flex-start;
    background-color: #ffffff; /* White for assistant messages */
    color: #333;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border-bottom-left-radius: 5px; /* Sharper corner */
}

.message-bubble.typing-indicator {
    font-style: italic;
    color: #666;
}

.chat-input-area {
    display: flex;
    padding: 10px 15px;
    border-top: 1px solid #ddd;
    background-color: #f1f1f1;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

#chat-input {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 8px 15px;
    margin-right: 10px;
    font-size: 14px;
}

#chat-send-button {
    background-color: #28a745; /* Green send button */
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

#chat-send-button:hover {
    background-color: #218838;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .chat-container {
        width: 90vw; /* Take more width on small screens */
        height: 80vh; /* Take more height */
        bottom: 10px;
        right: 10px;
    }
    .chat-toggle-button {
        width: 50px;
        height: 50px;
    }
    .chat-toggle-button .chat-icon {
        width: 35px;
        height: 35px;
    }
}