/*!
 * cz-calc-2888.css - Lifestyle usage-cost estimator (post 2888)
 * Version: 1.0.0 (2026-06-13)
 * Loaded by cz-calc-restore.php mu-plugin only on post 2888 (auto-enqueue if file exists).
 * Pairs with cz-calc-2888.js (DOM class names are stable).
 *
 * LAYOUT: ranked horizontal bars (label | filled bar | amount), total strip,
 * dark verdict strip, optional IRS-deduction note. This is a different layout
 * from 3887's card/donut grid - classes target the 2888 JS output directly.
 * !important used only to defeat theme inline <style> cascade leaks.
 */

/* ---- shell ---- */
.cz-calc-2888 {
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 1.5rem 0;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ---- header (high-specificity + !important to beat theme h3/p color) ---- */
#cz-2888-calc-mount .cz-calc-2888-header,
.cz-calc-2888-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 55%, #4338ca 100%);
    padding: 1.4rem 1.6rem;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
#cz-2888-calc-mount .cz-calc-2888-header h3,
.cz-calc-2888-header h3 {
    margin: 0 0 0.3rem 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff !important;
    letter-spacing: -0.015em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.25);
    line-height: 1.25;
}
#cz-2888-calc-mount .cz-calc-2888-header p,
.cz-calc-2888-header p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 400;
    color: rgba(255,255,255,0.92) !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.18);
}

/* ---- inputs ---- */
.cz-calc-2888-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
    gap: 1.5rem;
    padding: 1.5rem;
}
.cz-calc-2888-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    justify-content: flex-start;
    line-height: 1.2;
}
.cz-calc-2888-field label {
    width: 90%;
    font-size: 0.875rem;
    line-height: 1.2;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}
.cz-calc-2888-field label span {
    font-weight: 800;
    color: #1e40af;
    font-variant-numeric: tabular-nums;
}
.cz-calc-2888-field input[type="range"] {
    width: 90%;
    height: 20px;
    margin: 0;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}
.cz-calc-2888-field input[type="range"]::-webkit-slider-runnable-track {
    height: 9px;
    border-radius: 999px;
    background: #e2e8f0;
}
.cz-calc-2888-field input[type="range"]::-moz-range-track {
    height: 9px;
    border-radius: 999px;
    background: #e2e8f0;
}
.cz-calc-2888-field input[type="range"]::-moz-range-progress {
    height: 9px;
    border-radius: 999px;
    background: #1e40af;
}
.cz-calc-2888-field input[type="range"]:focus { outline: none; }
.cz-calc-2888-field input[type="range"]:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 4px rgba(30,64,175,0.18), 0 1px 3px rgba(0,0,0,0.2);
}
.cz-calc-2888-field input[type="range"]:focus::-moz-range-thumb {
    box-shadow: 0 0 0 4px rgba(30,64,175,0.18), 0 1px 3px rgba(0,0,0,0.2);
}
.cz-calc-2888-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px; border-radius: 50%;
    background: #1e40af; border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2); cursor: pointer;
    margin-top: -4.5px;
}
.cz-calc-2888-field input[type="range"]::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%;
    background: #1e40af; border: 2px solid #ffffff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2); cursor: pointer;
}
.cz-calc-2888-field select {
    width: 90%;
    height: 32px;
    margin: 0;
    padding: 0 0.75rem;
    font-family: inherit;
    font-size: 0.9375rem;
    color: #111827;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-sizing: border-box;
}
.cz-calc-2888-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

/* ---- results ---- */
.cz-calc-2888-results {
    padding: 0.5rem 1.5rem 1.5rem;
}
.cz-calc-2888-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.cz-calc-2888-row {
    display: grid;
    grid-template-columns: 130px 1fr 90px;
    align-items: center;
    gap: 0.75rem;
}
.cz-calc-2888-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}
.cz-calc-2888-bar {
    position: relative;
    height: 14px;
    background: #eef2f7;
    border-radius: 7px;
    overflow: hidden;
}
.cz-calc-2888-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #1e40af;
    border-radius: 7px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.2s ease;
}
.cz-calc-2888-amt {
    text-align: right;
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
    font-variant-numeric: tabular-nums;
}

/* ---- total strip ---- */
.cz-calc-2888-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding: 1.05rem 1.3rem;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #0f172a;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(15,23,42,0.18);
}
.cz-calc-2888-total span {
    font-size: 1.0rem;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 0.01em;
}
.cz-calc-2888-total strong {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

/* ---- IRS deduction note ---- */
.cz-calc-2888-note {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-left: 3px solid #475569;
    border-radius: 8px;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #334155;
}
.cz-calc-2888-note strong {
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}

/* ---- verdict strip (dark) ---- */
.cz-calc-2888-verdict {
    margin-top: 0.5rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    border-radius: 9px;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.6;
}


/* ---- per-category percentage share ---- */
.cz-calc-2888-share { font-size: 0.75rem; font-weight: 600; color: #94a3b8; margin-left: 0.15rem; }

/* ---- result tiles: benchmark + driver side-by-side; verdict full-width below ---- */
.cz-calc-2888-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    margin-top: 0.6rem;
}
.cz-calc-2888-bench,
.cz-calc-2888-driver {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
    min-height: 64px;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.8125rem;
    line-height: 1.4;
}
.cz-calc-2888-bench-below { background: #f0fdf4; border: 1px solid #bbf7d0; }
.cz-calc-2888-bench-above { background: #fef2f2; border: 1px solid #fecaca; }
.cz-calc-2888-bench-label { color: #475569; font-weight: 500; }
.cz-calc-2888-bench-val { font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.cz-calc-2888-bench-below .cz-calc-2888-bench-val { color: #047857; font-weight: 700; }
.cz-calc-2888-bench-above .cz-calc-2888-bench-val { color: #b91c1c; font-weight: 700; }
.cz-calc-2888-driver { background: #f8fafc; border: 1px solid #e2e8f0; color: #334155; }
.cz-calc-2888-driver-label { color: #475569; font-weight: 500; display: flex; align-items: center; }
.cz-calc-2888-driver-val { font-size: 0.9375rem; color: #0f172a; }
.cz-calc-2888-driver-val strong { color: #0f172a; font-weight: 700; }
.cz-calc-2888-driver-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; display: inline-block; margin-right: 0.4rem; }

/* ---- mobile ---- */
@media (max-width: 720px) {
    .cz-calc-2888-tiles {
        grid-template-columns: 1fr;
    }
    .cz-calc-2888-inputs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .cz-calc-2888-field input[type="range"] {
        height: 24px;
    }
    .cz-calc-2888-field select {
        padding: 0.75rem 0.875rem;
        font-size: 1rem;
    }
    .cz-calc-2888-row {
        grid-template-columns: 96px 1fr 76px;
        gap: 0.5rem;
    }
    .cz-calc-2888-label {
        font-size: 0.8125rem;
    }
    .cz-calc-2888-total strong {
        font-size: 1.25rem;
    }
}
