/* ==========================================================================
   Polished Generating State UI - Consistent across MCQ, Short Answer, Flashcards
   Orange Theme (#ff6b35)
   ========================================================================== */

/* Keyframes for animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-ring-orange {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

@keyframes shimmer-orange {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes dots-orange {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Main generating state container */
.generating-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(
        145deg,
        var(--bg-secondary, #1a1f2e) 0%,
        var(--bg-tertiary, #242b3d) 100%
    );
    border-radius: 16px;
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    max-width: 480px;
    margin: 2rem auto;
    animation: fade-in-up 0.5s ease-out;
    position: relative;
    overflow: hidden;
}

/* Subtle gradient accent at top - ORANGE */
.generating-state::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(
        90deg,
        #ff6b35 0%,
        #ff8f5c 50%,
        #ff6b35 100%
    );
    background-size: 200% 100%;
    animation: shimmer-orange 3s linear infinite;
}

/* Spinner wrapper with glow effect */
.generating-spinner-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Pulsing ring behind spinner - ORANGE */
.generating-spinner-wrapper::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        #ff6b35 0%,
        transparent 70%
    );
    opacity: 0.2;
    animation: pulse-ring-orange 2s ease-in-out infinite;
}

/* Main spinner - ORANGE */
.generating-spinner {
    width: 48px;
    height: 48px;
    animation: spin 1.5s linear infinite;
    color: #ff6b35;
    position: relative;
    z-index: 1;
}

/* Title */
.generating-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    margin: 0 0 0.75rem;
    letter-spacing: -0.01em;
}

/* Subtitle/message */
.generating-message {
    font-size: 0.9375rem;
    color: var(--text-secondary, #94a3b8);
    margin: 0 0 1.5rem;
    line-height: 1.6;
    max-width: 320px;
}

/* Progress indicator dots - ORANGE */
.generating-dots {
    display: inline-flex;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.generating-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff6b35;
    animation: pulse-ring-orange 1.4s ease-in-out infinite both;
}

.generating-dot:nth-child(1) { animation-delay: -0.32s; }
.generating-dot:nth-child(2) { animation-delay: -0.16s; }
.generating-dot:nth-child(3) { animation-delay: 0s; }

/* Estimated time badge */
.generating-eta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-primary, rgba(15, 23, 42, 0.6));
    border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
    border-radius: 9999px;
    font-size: 0.8125rem;
    color: var(--text-muted, #64748b);
}

.generating-eta svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Tips section */
.generating-tips {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.06));
    width: 100%;
}

.generating-tips-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, #64748b);
    margin: 0 0 0.75rem;
}

.generating-tips-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
    margin: 0;
    padding: 0;
    list-style: none;
}

.generating-tip {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.8125rem;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.5;
}

.generating-tip svg {
    width: 16px;
    height: 16px;
    color: #ff6b35;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .generating-state {
        margin: 1rem;
        padding: 2rem 1.5rem;
    }

    .generating-title {
        font-size: 1.125rem;
    }

    .generating-message {
        font-size: 0.875rem;
    }
}
