/* Chat Interface - Message Bubbles */

.chat-history {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Scrollbar styling for chat history */
.chat-history::-webkit-scrollbar {
    width: 6px;
}

.chat-history::-webkit-scrollbar-track {
    background: transparent;
}

.chat-history::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.chat-history::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.chat-message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 1.25rem;
    line-height: 1.5;
    font-size: 0.9rem;
    animation: messageSlideIn 0.4s ease-out forwards;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* User messages on the left */
.user-message {
    align-self: flex-start;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 0.25rem;
}

/* Bot messages on the right */
.bot-message {
    align-self: flex-end;
    background-color: var(--primary-color);
    color: white;
    border-bottom-right-radius: 0.25rem;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    background-color: var(--primary-color);
    border-radius: 1.25rem;
    border-bottom-right-radius: 0.25rem;
    align-self: flex-end;
    width: fit-content;
    align-items: center;
    animation: messageSlideIn 0.4s ease-out forwards;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 0.5rem;
    animation: typingBounce 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 typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Hide honeypot */
#website {
    display: none;
}