/* Season Cost Calculator — Rush Auto Works */
/* Canonical cost data: knowledge/data/racing-costs.csv */

.scc-wrap { padding: 3rem 0; }

.scc-calculator {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 2rem;
    align-items: start;
}

/* --- Inputs --- */
.scc-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.scc-field label,
.scc-lbl {
    display: block;
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--raw-cyan, #47C7FC);
    margin-bottom: 0.25rem;
}

.scc-sliders-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.scc-range-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.scc-range-row input[type="range"] {
    flex: 1;
    accent-color: var(--raw-orange, #FF8000);
    height: 4px;
}

.scc-range-value {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--raw-orange, #FF8000);
    min-width: 1.5ch;
    text-align: center;
}

.scc-toggle-row {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.scc-toggle {
    padding: 0.25rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    background: var(--bg-secondary, #0a2a52);
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.scc-toggle:hover {
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text-primary, #e0e0e0);
}

.scc-toggle.active {
    background: var(--raw-orange, #FF8000);
    border-color: var(--raw-orange, #FF8000);
    color: #fff;
    font-weight: 600;
}

/* --- Results panel --- */
.scc-results {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
}

.scc-results-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1rem;
}

.scc-results-title {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    color: var(--raw-cyan, #47C7FC);
    font-size: 1.25rem;
    text-transform: uppercase;
    margin: 0;
}

.scc-show-all-link {
    font-size: 0.8rem;
    color: var(--raw-cyan, #47C7FC);
    text-decoration: underline;
    cursor: pointer;
}

/* --- Table --- */
.scc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.scc-table td,
.scc-table th {
    padding: 0.4rem 0.6rem;
    border: none;
}

.scc-header-row th {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.scc-header-row th:first-child { text-align: left; }
.scc-header-row th.scc-amount { color: var(--raw-orange, #FF8000); }
.scc-header-row th.scc-comp-col { color: var(--text-muted, rgba(255, 255, 255, 0.5)); }

.scc-cat-row td {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--raw-cyan, #47C7FC);
    padding-top: 0.6rem;
    border-bottom: 1px solid rgba(71, 199, 252, 0.15);
}

.scc-amount {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.scc-comp-col { color: var(--text-muted, rgba(255, 255, 255, 0.5)); }
.scc-comp-worse { color: #ff6b6b; }

/* Subtotal row */
.scc-subtotal-row td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.scc-subtotal-label {
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-primary, #e0e0e0);
}

.scc-subtotal-amount {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.scc-runtime-highlight { color: var(--raw-cyan, #47C7FC); font-weight: 700; }

/* Total row (inside table) */
.scc-total-row-table td {
    padding: 0.6rem;
    border-top: 2px solid var(--raw-orange, #FF8000);
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-weight: 700;
    font-size: 1.1rem;
}

.scc-total-row-table .scc-total-label-cell {
    text-transform: uppercase;
    color: var(--text-primary, #e0e0e0);
}

.scc-total-row-table .scc-total-rush {
    text-align: right;
    color: var(--raw-orange, #FF8000);
    font-size: 1.3rem;
}

.scc-total-row-table .scc-total-comp {
    text-align: right;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    font-size: 1rem;
}

/* Per-hour summary row (inside table) */
.scc-perhour-row td {
    padding: 0.5rem 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-weight: 600;
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    color: var(--text-primary, #e0e0e0);
}

.scc-perhour-row td.scc-comp-col {
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
}

/* Hide button */
.scc-hide-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    color: var(--text-muted, rgba(255, 255, 255, 0.4));
    font-size: 0.65rem;
    line-height: 1;
    padding: 1px 3px;
    cursor: pointer;
    vertical-align: middle;
    margin-left: 2px;
}

.scc-hide-btn:hover { color: #ff6b6b; border-color: #ff6b6b; }

/* --- Tooltips --- */
.scc-derivation-wrap {
    position: relative;
    display: inline-block;
}

.scc-derivation-icon {
    font-size: 0.7rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.3));
    cursor: help;
    vertical-align: middle;
}

.scc-derivation-tip {
    display: none;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #0d1b2a;
    border: 1px solid rgba(71, 199, 252, 0.3);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.8);
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    z-index: 20;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.scc-derivation-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(71, 199, 252, 0.3);
}

.scc-derivation-tip--wide {
    white-space: normal;
    width: 200px;
    text-align: center;
}

.scc-derivation-wrap:hover .scc-derivation-tip { display: block; }

/* --- CTA --- */
.scc-cta {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.scc-cta p {
    font-size: 0.85rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.5));
    margin: 0 0 0.6rem 0;
}

.scc-cta-btn {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    font-family: var(--font-display, 'Barlow Condensed', sans-serif);
    font-size: 0.85rem;
    text-transform: uppercase;
    text-decoration: none;
    transition: opacity 0.15s ease;
    margin-right: 0.5rem;
    background: var(--raw-orange, #FF8000);
    color: #fff;
}

.scc-cta-btn:hover { opacity: 0.85; }

.scc-cta-btn--secondary {
    background: transparent;
    border: 1px solid var(--raw-cyan, #47C7FC);
    color: var(--raw-cyan, #47C7FC);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .scc-calculator {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .scc-table { font-size: 0.75rem; }
    .scc-table td, .scc-table th { padding: 0.3rem 0.4rem; }
}
