/* Main Chat Container */
#faq-ai-chat-container {
    max-width: 600px;
    margin: 2rem auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    background-color: #f9f9f9;
}

/* Messages Area */
#faq-ai-chat-messages {
    padding: 20px;
    height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px; /* Adds space between messages */
}

/* General Message Bubble Style */
.chat-message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 75%;
    line-height: 1.5;
}

/* Sender Name Style */
.chat-message strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.8rem;
    color: #555;
}

/* Assistant's Message Bubble */
.chat-message.assistant-message {
    background-color: #ECEFF1; /* Light gray */
    color: #263238;
    border-bottom-left-radius: 4px; /* "Tear drop" effect */
    align-self: flex-start; /* Align to the left */
}

/* User's Message Bubble */
.chat-message.user-message {
    background-color: #0073aa; /* WordPress blue */
    color: #ffffff;
    border-bottom-right-radius: 4px; /* "Tear drop" effect */
    align-self: flex-end; /* Align to the right */
}

/* Change sender name color for user's message to be visible */
.chat-message.user-message strong {
    color: #e0f2f1;
}

/* The "typing" indicator message */
.chat-message.typing span {
    color: #777;
    font-style: italic;
}

/* Input Form */
#faq-ai-chat-form {
    display: flex;
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    background-color: #fff;
    border-radius: 0 0 8px 8px;
}

#faq-ai-chat-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 18px;
    margin-right: 10px;
}

#faq-ai-chat-form button {
    padding: 10px 20px;
    border: none;
    background-color: #0073aa;
    color: white;
    cursor: pointer;
    border-radius: 18px;
    font-weight: bold;
}

#faq-ai-chat-form button:hover {
    background-color: #005a87;
}
