/* ==========================================================================
   AI CONSOLE ANIMATIONS - Interactive terminal-style displays
   ========================================================================== */

.ai-console {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.875rem;
    width: 100%;
    height: 420px;
    max-height: 420px;
    display: flex;
    flex-direction: column;
}

/* Header z control buttons (macOS style) */
.console-header {
    background: linear-gradient(180deg, #3a3a3a 0%, #2d2d2d 100%);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

.console-title {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.console-controls {
    display: flex;
    gap: 0.5rem;
}

.console-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #555;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.console-dot.red { background: #ff5f57; }
.console-dot.yellow { background: #ffbd2e; }
.console-dot.green { background: #28c840; }

/* Console body */
.console-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Messages */
.console-message {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    animation: messageSlideIn 0.4s var(--ease-organic);
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.message-content {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    line-height: 1.6;
}

/* User message */
.console-message.user .message-content {
    background: rgba(69, 194, 112, 0.15);
    border-left: 3px solid var(--warmth-accent);
    color: #a8e6cf;
}

/* Assistant message */
.console-message.assistant .message-content {
    background: rgba(91, 174, 243, 0.15);
    border-left: 3px solid #5BAEF3;
    color: #b3d9ff;
}

/* System message (success, info, etc.) */
.console-message.system .message-content {
    background: rgba(212, 146, 90, 0.15);
    border-left: 3px solid var(--warmth-gold);
    color: #ffd699;
    font-weight: 500;
}

/* Typing indicator */
.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0;
}

.typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    animation: typingBounce 1.4s infinite;
}

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

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* Cursor blink effect */
.cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--warmth-gold);
    margin-left: 2px;
    animation: cursorBlink 1s infinite;
}

@keyframes cursorBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--warmth-accent), var(--warmth-gold));
    border-radius: 2px;
    animation: progressFill 2s ease-out forwards;
}

@keyframes progressFill {
    from { width: 0%; }
    to { width: 100%; }
}

/* Check marks */
.check-icon {
    display: inline-block;
    color: var(--warmth-accent);
    margin-right: 0.5rem;
}

/* Code highlighting */
.code-highlight {
    color: #ff79c6;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .ai-console {
        height: 360px;
        max-height: 360px;
        font-size: 0.8rem;
    }

    .console-body {
        padding: 1rem;
        gap: 0.75rem;
    }
}
