/* 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: 600px;
    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;
    margin-bottom: 1rem;
}

/* Educational Tip */
.report-loader-tip {
    background: #f8f9fa;
    border-left: 4px solid #2EB8B8;
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.report-loader-tip-label {
    font-size: 0.75rem;
    color: #2EB8B8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.report-loader-tip-text {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    transition: opacity 0.3s ease;
}

/* Cancel Button */
.report-loader-cancel {
    margin-top: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.report-loader-cancel:hover {
    background: #f5f5f5;
    border-color: #94a3b8;
    color: #475569;
}

/* 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;
}

/* ============================================
   COMPACT LOADER - Card overlay for inline use
   Used in: Studio, Progress, Synthesis, Admin
   ============================================ */

.compact-loader-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    padding: 2rem;
}

.compact-loader-fullpage {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.compact-loader {
    background: white;
    border-radius: 16px;
    padding: 1.75rem 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    text-align: center;
}

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

/* Compact Coffee Message */
.compact-loader-coffee {
    background: linear-gradient(135deg, #FFF8E7 0%, #FEF3D4 100%);
    border: 1px solid #F5DEB3;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.compact-loader-coffee span {
    color: #8B6914;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Compact Progress Bar */
.compact-loader-progress {
    background: #e9ecef;
    border-radius: 6px;
    height: 6px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.compact-loader-progress-bar {
    height: 100%;
    border-radius: 6px;
    background: linear-gradient(90deg, #2EB8B8, #3AACB8, #2EB8B8);
    background-size: 200% 100%;
    animation: shimmer 2s linear infinite;
    width: 25%;
    transition: width 0.5s ease;
}

/* Compact Action Display */
.compact-loader-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    background: linear-gradient(135deg, #E8F8F8 0%, #E0F4F4 100%);
    border-radius: 10px;
}

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

.compact-loader-action-text {
    font-size: 0.95rem;
    color: #1a6b6b;
    font-weight: 500;
}

/* Compact Educational Tip */
.compact-loader-tip {
    background: #f8f9fa;
    border-left: 3px solid #2EB8B8;
    border-radius: 0 8px 8px 0;
    padding: 0.8rem 1rem;
    text-align: left;
    margin-bottom: 0.8rem;
}

.compact-loader-tip-label {
    font-size: 0.65rem;
    color: #2EB8B8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
}

.compact-loader-tip-text {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
    transition: opacity 0.3s ease;
}

/* Compact Time Estimate */
.compact-loader-time {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.8rem;
}

/* Compact Cancel Button */
.compact-loader-cancel {
    padding: 0.5rem 1.2rem;
    background: transparent;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.compact-loader-cancel:hover {
    background: #f5f5f5;
    border-color: #94a3b8;
    color: #475569;
}

/* Mobile adjustments for compact loader */
@media (max-width: 480px) {
    .compact-loader {
        padding: 1.25rem 1.5rem;
        margin: 0.5rem;
    }
    
    .compact-loader-title {
        font-size: 1.1rem;
    }
    
    .compact-loader-coffee span {
        font-size: 0.85rem;
    }
    
    .compact-loader-tip-text {
        font-size: 0.8rem;
    }
}
