/* === AI Chat Animations === */

/* 1. Message Pop-in Animation */
.chat-message-pop {
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: bottom left;
    opacity: 0;
}

.chat-message-pop.user {
    transform-origin: bottom right;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 2. Thinking Indicator (Bouncing Dots) */
.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
}

.thinking-dot {
    width: 6px;
    height: 6px;
    background-color: #94a3b8;
    border-radius: 50%;
    animation: thinkingBounce 1.4s infinite ease-in-out both;
}

.thinking-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.thinking-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.thinking-dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes thinkingBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 3. Send Button Animation */
.chat-send-btn {
    transition: all 0.3s ease;
}

.chat-send-btn.sending {
    pointer-events: none;
    background-color: #475569 !important;
    /* Slate 600 */
    transform: scale(0.9);
}

.chat-send-btn.sending svg {
    animation: flyAway 0.6s ease-in-out forwards;
}

@keyframes flyAway {
    0% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }

    40% {
        transform: translateX(10px) scale(0.8);
        opacity: 0;
    }

    41% {
        transform: translateX(-20px) scale(0.8);
        opacity: 0;
    }

    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* 4. Typewriter Cursor */
.typewriter-cursor::after {
    content: '|';
    display: inline-block;
    width: 2px;
    margin-left: 2px;
    background-color: #22d3ee;
    /* Cyan 400 */
    animation: blinkCursor 0.8s infinite;
}

@keyframes blinkCursor {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}