#faqbot-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

#faqbot-chat-toggle {
    background-color: #5865F2; /* Discord blurple */
    color: white;
    border: none;
    border-radius: 12px; /* Rounded square */
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Softer shadow */
    outline: none;
    transition: background-color 0.3s ease;
    position: relative; /* Needed for absolute positioning of the window */
}

#faqbot-chat-toggle:hover {
    background-color: #4c56e4; /* Slightly darker on hover */
}

#faqbot-chat-toggle svg {
    fill: white;
    width: 24px;
    height: 24px;
}

#faqbot-chat-window {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15); /* More pronounced shadow */
    width: 350px;
    max-height: 500px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease-in-out; /* Smooth transition */
    position: absolute; /* Positioned absolutely */
    bottom: 70px; /* Positioned above the toggle button */
    right: 0;
    font-family: 'Montserrat', sans-serif; /* Default font */
}

#faqbot-chat-header {
    background-color: #f8f9fa; /* Light grey */
    color: #343a40; /* Darker grey */
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6; /* Lighter border */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.header-info {
    display: flex;
    align-items: center;
}

.bot-icon {
    background-color: #ede7f6;
    color: #5865F2;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 12px;
}

.bot-icon svg {
    fill: #5865F2;
    width: 20px;
    height: 20px;
}

.bot-details {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.bot-name {
    font-weight: 600; /* Semi-bold */
    color: #212529; /* Even darker grey */
}

.bot-status {
    color: #2ecc71;
    font-size: 12px;
    display: flex;
    align-items: center;
}

.bot-status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #2ecc71;
    margin-right: 5px;
}

#faqbot-close-btn {
    background: none;
    border: none;
    color: #6c757d; /* Medium grey */
    cursor: pointer;
    font-size: 20px;
    outline: none;
    transition: color 0.2s ease;
}

#faqbot-close-btn:hover {
    color: #343a40;
}

#faqbot-chat-body {
    padding: 15px 20px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 12px; /* Spacing between messages */
}

.bot-message, .user-message {
    padding: 12px 16px;
    border-radius: 20px; /* Rounded message bubbles */
    margin-bottom: 10px;
    clear: both;
    display: flex;
    align-items: flex-start;
    word-wrap: break-word;
    font-weight:500;
    font-size: 14px; /* Smaller font size for messages */
}

.bot-message {
    background-color: #f0f2f5; /* Light grey bubble */
    color: #343a40;
    float: left;
}

.user-message {
    background-color: #5865F2;
    color: white;
    float: right;
    flex-direction: row-reverse;
}

.bot-message .bot-icon, .user-message .bot-icon {
    margin-right: 12px;
}

.user-message .bot-icon {
    margin-left: 12px;
    margin-right: 0;
}

#faqbot-chat-input {
    padding: 15px 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
}

#faqbot-chat-input input[type="text"] {
    flex-grow: 1;
    padding: 12px 16px;
    border: 1px solid #ced4da; /* Light border */
    border-radius: 30px; /* Pill-shaped input */
    margin-right: 10px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s ease;
    font-family: 'Montserrat', sans-serif;
}

#faqbot-chat-input input[type="text"]:focus {
    border-color: #5865F2;
    box-shadow: 0 0 0 0.2rem rgba(88, 101, 242, 0.25); /* Subtle focus shadow */
}

#faqbot-chat-input button {
    background-color: #5865F2;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    outline: none;
    transition: background-color 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

#faqbot-chat-input button:hover {
    background-color: #4c56e4;
}

#faqbot-chat-input button svg {
    fill: white;
    vertical-align: middle;
    width: 20px;
    height: 20px;
}

#faqbot-chat-footer {
    background-color: #f8f9fa;
    color: #6c757d;
    padding: 10px 20px;
    text-align: right;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    font-size: 12px;
    font-family: 'Montserrat', sans-serif;
}

.button-options {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.option-button {
    background-color: #e9ecef; /* Lighter grey */
    color: #343a40;
    border: none;
    border-radius: 24px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    outline: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-family: 'Montserrat', sans-serif;
}

.option-button:hover {
    background-color: #dee2e6;
    color: #212529;
}

#faqbot-chat-body-scroll {
    flex-shrink: 0;
    height: 1px;
}

.bot-message.loading::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #999;
    animation: loading 1s linear infinite;
    margin-left: 5px;
}

@keyframes loading {
    0% { transform: scale(0); }
    50% { transform: scale(1); }
    100% { transform: scale(0); }
}

.bot-message span {
    display: inline-block; /* Crucial for animation */
    opacity: 0;
}

.bot-message span.appear {
    opacity: 1;
    transition: opacity 0.05s ease-in-out; /* Adjust speed as needed */
}

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap');