/* Suck Meter — Rush Auto Works */

.sm-wrap { padding: 2rem 0 3rem; }

/* --- Driver Select --- */
.sm-driver-select {
    text-align: center;
    margin-bottom: 2rem;
}
.sm-driver-select label {
    display: block;
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--raw-cyan, #47C7FC);
    margin-bottom: 0.5rem;
}
.sm-driver-select select {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 1rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary, #0a2a52);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    min-width: 280px;
    cursor: pointer;
}
.sm-driver-select select:focus {
    outline: none;
    border-color: var(--raw-orange, #FF8000);
}

/* --- Loading --- */
.sm-loading {
    text-align: center;
    padding: 3rem 0;
}
.sm-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--raw-orange, #FF8000);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: sm-spin 0.8s linear infinite;
}
@keyframes sm-spin { to { transform: rotate(360deg); } }
.sm-loading p {
    color: var(--text-muted, rgba(255,255,255,0.5));
    font-style: italic;
}

/* --- Verdict Card --- */
.sm-verdict-card {
    background: var(--bg-secondary, #0a2a52);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}
.sm-verdict-meter { margin-bottom: 1.5rem; }
.sm-meter-bar {
    height: 12px;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.5rem;
}
.sm-meter-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1s ease-out, background 1s ease-out;
    width: 0%;
}
.sm-meter-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted, rgba(255,255,255,0.5));
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.sm-verdict-title {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 1.8rem;
    color: var(--raw-orange, #FF8000);
    margin: 0 0 0.5rem;
}
.sm-verdict-text {
    color: var(--text-primary, #e0e0e0);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Stats Grid --- */
.sm-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
.sm-stat {
    background: var(--bg-secondary, #0a2a52);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 1.25rem 1rem;
    text-align: center;
}
.sm-stat-value {
    display: block;
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 2rem;
    font-weight: 700;
    color: var(--raw-orange, #FF8000);
    line-height: 1.1;
}
.sm-stat-label {
    display: block;
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted, rgba(255,255,255,0.5));
    margin-top: 0.25rem;
}

/* --- Section Titles --- */
.sm-section { margin-bottom: 2rem; }
.sm-section-title {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 1.4rem;
    text-align: center;
    margin: 0 0 0.5rem;
}
.sm-section-lead {
    text-align: center;
    color: var(--text-muted, rgba(255,255,255,0.5));
    font-size: 0.9rem;
    margin: 0 0 1rem;
}

/* --- Track Cards --- */
.sm-track-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}
.sm-track-card {
    background: var(--bg-secondary, #0a2a52);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    overflow: hidden;
}
.sm-track-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}
.sm-track-card-header:hover {
    background: rgba(255,255,255,0.03);
}
.sm-track-card-header::after {
    content: '\25BC';
    font-size: 0.7rem;
    color: var(--text-muted, rgba(255,255,255,0.5));
    margin-left: 0.75rem;
    transition: transform 0.2s;
    flex-shrink: 0;
}
.sm-track-card.sm-expanded .sm-track-card-header::after {
    transform: rotate(180deg);
}
.sm-track-name {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 1.1rem;
    color: var(--raw-cyan, #47C7FC);
    text-transform: uppercase;
}
.sm-track-gap {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 0.95rem;
    color: var(--raw-orange, #FF8000);
}
.sm-track-summary {
    display: flex;
    gap: 1rem;
    align-items: center;
}
.sm-track-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.sm-track-card.sm-expanded .sm-track-body {
    max-height: 2000px;
    transition: max-height 0.4s ease-in;
}
.sm-track-body-inner {
    padding: 0 1.25rem 1rem;
}
.sm-track-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.sm-track-table th {
    text-align: left;
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted, rgba(255,255,255,0.5));
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sm-track-table td {
    padding: 0.35rem 0.5rem;
    color: var(--text-primary, #e0e0e0);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.sm-track-table tr.sm-highlight td {
    color: #fff;
    font-weight: 700;
    background: rgba(255, 128, 0, 0.18);
    border-bottom-color: rgba(255, 128, 0, 0.25);
}
.sm-track-table tr.sm-highlight td:first-child {
    box-shadow: inset 3px 0 0 var(--raw-orange, #FF8000);
}
.sm-track-table td:last-child { text-align: right; }
.sm-track-table th:last-child { text-align: right; }

/* --- Leaderboard --- */
.sm-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.sm-leaderboard-table th {
    text-align: left;
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted, rgba(255,255,255,0.5));
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sm-leaderboard-table td {
    padding: 0.5rem;
    color: var(--text-primary, #e0e0e0);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.sm-leaderboard-table tr.sm-highlight td {
    color: #fff;
    font-weight: 700;
    background: rgba(255, 128, 0, 0.18);
    border-bottom-color: rgba(255, 128, 0, 0.25);
}
.sm-leaderboard-table tr.sm-highlight td:first-child {
    box-shadow: inset 3px 0 0 var(--raw-orange, #FF8000);
}
.sm-leaderboard-table td:nth-child(1) { width: 40px; text-align: center; }
.sm-leaderboard-table td:nth-child(3),
.sm-leaderboard-table th:nth-child(3),
.sm-leaderboard-table td:nth-child(4),
.sm-leaderboard-table th:nth-child(4),
.sm-leaderboard-table td:nth-child(5),
.sm-leaderboard-table th:nth-child(5) { text-align: right; }

/* --- Roasts --- */
.sm-roasts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.sm-roast {
    background: var(--bg-secondary, #0a2a52);
    border-left: 3px solid var(--raw-orange, #FF8000);
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary, #e0e0e0);
}

/* --- Skeleton Loading --- */
@keyframes sm-shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.sm-skel-block {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 800px 100%;
    animation: sm-shimmer 1.5s infinite ease-in-out;
    border-radius: 6px;
}
.sm-skel-title {
    height: 2rem;
    width: 60%;
    margin: 0 auto 0.75rem;
}
.sm-skel-text {
    height: 1rem;
    width: 80%;
    margin: 0 auto 0.5rem;
}
.sm-skel-text--short { width: 50%; }
.sm-skel-stat-val {
    height: 2rem;
    width: 50%;
    margin: 0 auto 0.25rem;
}
.sm-skel-track {
    height: 1.25rem;
    width: 40%;
    margin-bottom: 0.75rem;
}
.sm-skel-table {
    height: 120px;
    width: 100%;
}
.sm-skel-leaderboard {
    height: 300px;
    width: 100%;
}
.sm-skel-roast {
    height: 3rem;
    width: 100%;
    margin-bottom: 0.75rem;
    border-left: 3px solid rgba(255,128,0,0.3);
    border-radius: 0 8px 8px 0;
}

/* --- Mobile --- */
@media (max-width: 640px) {
    .sm-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .sm-stat { padding: 0.75rem 0.5rem; }
    .sm-stat-value { font-size: 1.5rem; }
    .sm-verdict-title { font-size: 1.4rem; }
    .sm-track-card-header { padding: 0.75rem 1rem; }
    .sm-track-summary { flex-direction: column; gap: 0.15rem; align-items: flex-start; }
    .sm-track-body-inner { padding: 0 0.75rem 0.75rem; }
    .sm-track-table { font-size: 0.85rem; }
    .sm-leaderboard-table { font-size: 0.85rem; }
    .sm-driver-select select { min-width: 100%; }
}
