/* Report Loading Screen
   Professional loader with cycling framework messages
   Uses global 7ED styling
*/

.report-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #faf8f5 0%, #f5f0e8 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.report-loader {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 60px rgba(0,0,0,0.12);
    padding: 3rem 4rem;
    width: 90%;
    max-width: 700px;
    text-align: center;
}

.report-loader-header {
    margin-bottom: 2rem;
}

.report-loader-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a2f4a;
    margin: 0 0 0.5rem 0;
}

.report-loader-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
}

.report-loader-wait-message {
    font-size: 0.9rem;
    color: #2EB8B8;
    margin: 1rem 0 0 0;
    font-style: italic;
    padding: 0.75rem 1rem;
    background: #E0F4F4;
    border-radius: 8px;
    border-left: 3px solid #2EB8B8;
}

/* Progress Bar */
.report-loader-progress {
    background: #e2e8f0;
    border-radius: 8px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.report-loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2EB8B8 0%, #d4af37 50%, #2EB8B8 100%);
    background-size: 200% 100%;
    border-radius: 8px;
    width: 0%;
    transition: width 0.5s ease;
    animation: shimmer 2s ease-in-out infinite;
}

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

/* Current Action Display */
.report-loader-action {
    background: linear-gradient(135deg, #fef9e7 0%, #fdf6e3 100%);
    border-left: 4px solid #2EB8B8;
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.report-loader-action-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #92400e;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.report-loader-action-icon {
    font-size: 1.3rem;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

/* Stage Indicators */
.report-loader-stages {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.report-loader-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.report-loader-stage.active {
    opacity: 1;
}

.report-loader-stage.complete {
    opacity: 1;
}

.report-loader-stage-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.3s ease;
}

.report-loader-stage.active .report-loader-stage-icon {
    background: #2EB8B8;
    color: white;
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.2);
}

.report-loader-stage.complete .report-loader-stage-icon {
    background: #16a34a;
    color: white;
}

.report-loader-stage-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.report-loader-stage.active .report-loader-stage-label {
    color: #1a2f4a;
}

.report-loader-stage.complete .report-loader-stage-label {
    color: #16a34a;
}

/* Footer */
.report-loader-footer {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Mobile */
@media (max-width: 600px) {
    .report-loader {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .report-loader-title {
        font-size: 1.25rem;
    }
    
    .report-loader-stages {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .report-loader-action-text {
        font-size: 1rem;
    }
}

/* ============================================
   INLINE LOADER - Compact version for cards
   ============================================ */

.inline-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #fefdfb 0%, #faf8f5 100%);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.inline-loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #2EB8B8;
    border-radius: 50%;
    animation: inline-spin 1s linear infinite;
    flex-shrink: 0;
}

@keyframes inline-spin {
    to { transform: rotate(360deg); }
}

.inline-loader-content {
    text-align: left;
}

.inline-loader-title {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1a2f4a;
    margin-bottom: 0.25rem;
}

.inline-loader-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #64748b;
}

.inline-loader-icon {
    font-size: 1rem;
}

.inline-loader-text {
    transition: opacity 0.2s ease;
}

/* Small variant for tight spaces */
.inline-loader.small {
    padding: 1rem 1.5rem;
    gap: 0.75rem;
}

.inline-loader.small .inline-loader-spinner {
    width: 24px;
    height: 24px;
    border-width: 2px;
}

.inline-loader.small .inline-loader-title {
    font-size: 0.9rem;
}

.inline-loader.small .inline-loader-message {
    font-size: 0.8rem;
}

/* Minimal variant - just message */
.inline-loader.minimal {
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    justify-content: flex-start;
}

.inline-loader.minimal .inline-loader-spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.inline-loader.minimal .inline-loader-title {
    display: none;
}

.inline-loader.minimal .inline-loader-message {
    font-size: 0.85rem;
}
