/**
 * AI Loading Overlay - Componente reutilizável
 * Exibir durante chamadas de IA que podem demorar (especialmente Manus async)
 * Uso: aiLoadingOverlay.show(container) / aiLoadingOverlay.hide()
 */

.ai-loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    text-align: center;
    animation: aiLoadingFadeIn 0.3s ease;
}

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

/* Animação de ondas (brain pulse) */
.ai-loading-waves {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 40px;
    margin-bottom: 20px;
}

.ai-loading-waves span {
    display: inline-block;
    width: 5px;
    height: 12px;
    border-radius: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: aiWavePulse 1.2s ease-in-out infinite;
}

.ai-loading-waves span:nth-child(1) { animation-delay: 0s; }
.ai-loading-waves span:nth-child(2) { animation-delay: 0.1s; }
.ai-loading-waves span:nth-child(3) { animation-delay: 0.2s; }
.ai-loading-waves span:nth-child(4) { animation-delay: 0.3s; }
.ai-loading-waves span:nth-child(5) { animation-delay: 0.4s; }

@keyframes aiWavePulse {
    0%, 100% { height: 12px; opacity: 0.4; }
    50% { height: 32px; opacity: 1; }
}

/* Texto principal */
.ai-loading-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 8px 0;
}

.ai-loading-subtitle {
    font-size: 0.92rem;
    color: #718096;
    margin: 0 0 20px 0;
    line-height: 1.5;
    max-width: 380px;
}

/* Timer de tempo decorrido */
.ai-loading-timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.82rem;
    color: #a0aec0;
    font-variant-numeric: tabular-nums;
}

.ai-loading-timer-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #667eea;
    animation: aiTimerDotPulse 1.5s ease-in-out infinite;
}

@keyframes aiTimerDotPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Dicas que rodam */
.ai-loading-tips {
    margin-top: 20px;
    font-size: 0.85rem;
    color: #a0aec0;
    font-style: italic;
    min-height: 1.5em;
    transition: opacity 0.3s ease;
}
