/* Chatbot Window Animation */
#chatbot-window {
    transition: opacity 200ms ease, transform 200ms ease;
    transform-origin: bottom right;
}

.chatbot-window-hidden {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
    pointer-events: none;
}

.chatbot-window-show {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

/* Messages */
.chatbot-msg {
    max-width: 85%;
    padding: 0.625rem 0.875rem;
    border-radius: 1rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    word-break: break-word;
}

.chatbot-msg-bot {
    background-color: #f1f5f9; /* slate-100 */
    color: #334155; /* slate-700 */
    border-bottom-left-radius: 0.25rem;
    margin-right: auto;
}

.chatbot-msg-user {
    background-color: #6366f1; /* primary-500 */
    color: #ffffff;
    border-bottom-right-radius: 0.25rem;
    margin-left: auto;
}

/* Question Buttons */
.chatbot-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chatbot-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #4f46e5; /* primary-600 */
    background-color: #ffffff;
    border: 1px solid #e0e7ff; /* primary-100 */
    border-radius: 0.75rem;
    cursor: pointer;
    transition: background-color 150ms, border-color 150ms;
}

.chatbot-btn:hover {
    background-color: #eef2ff; /* primary-50 */
    border-color: #c7d2fe; /* primary-200 */
}

.chatbot-btn-primary {
    background-color: #6366f1; /* primary-500 */
    color: #ffffff;
    border-color: #6366f1;
}

.chatbot-btn-primary:hover {
    background-color: #4f46e5; /* primary-600 */
    border-color: #4f46e5;
}

/* Typing Indicator */
.chatbot-typing {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
}

.chatbot-typing span {
    display: inline-block;
    width: 0.5rem;
    height: 0.5rem;
    background-color: #94a3b8; /* slate-400 */
    border-radius: 50%;
    animation: chatbot-dot 1.4s infinite ease-in-out;
}

.chatbot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes chatbot-dot {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile */
@media (max-width: 640px) {
    #chatbot-window {
        width: calc(100vw - 2rem);
        right: 0;
        max-height: 70vh !important;
    }
}
