/* ═══════════════════════════════════════════════════════════════════
 * Setup Quality Banner - Tier badge + score progress bar
 * Shows prominent quality indicator at top of each setup card
 * ═══════════════════════════════════════════════════════════════════ */


.quality-banner {
    padding: 8px 12px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-bottom: 2px solid currentColor;
    position: relative;
    overflow: hidden;
}

/* Subtle shimmer effect for top tier */
.quality-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.6s ease;
}

.quality-banner:hover::before {
    left: 100%;
}


/* ─── Tier-specific colors ─── */

.quality-s {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(16, 185, 129, 0.08));
    color: #10b981;
}

.quality-a {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0.08));
    color: #3b82f6;
}

.quality-b {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.18), rgba(251, 191, 36, 0.08));
    color: #fbbf24;
}

.quality-c {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(239, 68, 68, 0.08));
    color: #ef4444;
}

.quality-unknown {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.12), rgba(148, 163, 184, 0.05));
    color: #94a3b8;
}


/* ─── Banner rows ─── */

.quality-banner-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.quality-banner-row.quality-banner-bar {
    gap: 8px;
}


/* ─── Tier label ─── */

.quality-tier {
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}


/* ─── Score number ─── */

.quality-score {
    font-family: 'Courier New', monospace;
    font-weight: 800;
    font-size: 0.85rem;
    margin-left: auto;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    border: 1px solid currentColor;
}


/* ─── Warnings count badge ─── */

.quality-warnings-count {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border-radius: 4px;
    border: 1px solid rgba(239, 68, 68, 0.4);
    cursor: help;
}


/* ─── Progress bar ─── */

.quality-progress {
    flex: 1;
    height: 4px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
    overflow: hidden;
    min-width: 60px;
}

.quality-progress-fill {
    height: 100%;
    background: currentColor;
    border-radius: 2px;
    transition: width 0.5s ease;
    box-shadow: 0 0 8px currentColor;
}


/* ─── Label ─── */

.quality-label {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.9;
    white-space: nowrap;
    flex-shrink: 0;
}


/* ─── Mechanical (validation_recommendation) secondary line ─── */

.quality-mech-line {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    font-size: 0.68rem;
    opacity: 0.75;
    font-weight: 500;
}

.quality-mech-line b {
    font-weight: 700;
    opacity: 0.95;
}


/* ─── Mobile responsive ─── */

@media (max-width: 480px) {
    .quality-banner {
        padding: 6px 10px;
        gap: 4px;
    }
    
    .quality-tier {
        font-size: 0.75rem;
    }
    
    .quality-score {
        font-size: 0.75rem;
        padding: 1px 6px;
    }
    
    .quality-label {
        font-size: 0.65rem;
    }
    
    .quality-warnings-count {
        font-size: 0.65rem;
    }
}


/* ─── Override the existing setup-card to remove top padding for banner ─── */

.setup-card {
    padding-top: 0 !important;
}

.setup-card .setup-card-header {
    padding-top: 4px;
}
