/* Chat Interface Animation Styles */
.chat-interface {
    background: var(--color-bg-primary);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-bot-name {
    font-weight: bold;
    color: var(--color-accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-status {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.chat-status::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    /* Green for online */
    border-radius: 50%;
}

.chat-body {
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex-grow: 1;
    justify-content: flex-end;
    /* Messages start from bottom like real chat */
}

.chat-message {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    max-width: 85%;
    line-height: 1.4;
    opacity: 0;
    /* For animation */
    transform: translateY(10px);
    animation: message-appear 0.3s forwards;
}

@keyframes message-appear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-message.bot {
    background: var(--color-accent);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    text-align: right;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg-secondary);
    border-radius: 12px;
    align-self: flex-start;
    width: fit-content;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: fade-in 0.3s forwards;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--color-text-secondary);
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing-bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}