/* ==========================================================================
   Calculator Styles - GCS Rental Directory V4
   Unified calculator CSS replacing per-page calculator styles.
   Loaded alongside shared-components.css on calculator pages only.
   ========================================================================== */


/* ==========================================================================
   1. SECTION WRAPPER
   ========================================================================== */

.calc-section {
    padding: var(--gcs-section-pad, 80px) 0;
}

.calc-section__inner {
    max-width: var(--gcs-max-width, 1320px);
    margin: 0 auto;
    padding: 0 24px;
}


/* ==========================================================================
   2. SECTION HEADER (eyebrow, title, subtitle above calculator)
   ========================================================================== */

.calc-eyebrow {
    font-family: var(--gcs-font-body);
    font-weight: 700;
    font-size: var(--text-xs, 12px);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gcs-red);
    margin-bottom: 14px;
}

.calc-title {
    font-family: var(--gcs-font-display);
    font-weight: 800;
    font-size: var(--text-2xl, 32px);
    line-height: 0.96;
    letter-spacing: -0.005em;
    text-transform: uppercase;
    margin: 0 0 6px;
    color: var(--gcs-text);
}

.calc-lead {
    font-size: var(--text-sm, 14px);
    line-height: 1.5;
    color: var(--gcs-text-muted);
    margin: 0 0 24px;
}


/* ==========================================================================
   3. TWO-COLUMN GRID LAYOUT
   ========================================================================== */

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}


/* ==========================================================================
   4. INPUT PANEL (left side - white background)
   ========================================================================== */

.calc-controls {
    background: var(--gcs-white);
    border: 1.5px solid var(--gcs-black);
    padding: 40px;
}

.calc-controls .calc-eyebrow {
    margin-bottom: 14px;
}

.calc-controls .calc-title {
    margin-bottom: 6px;
}

.calc-controls .calc-lead {
    margin-bottom: 24px;
}


/* ==========================================================================
   5. INPUT ROWS (label + slider)
   ========================================================================== */

.calc-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 22px;
}

.calc-row-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.calc-label {
    font-family: var(--gcs-font-body);
    font-size: var(--text-sm, 14px);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gcs-text);
}

.calc-value {
    font-family: var(--gcs-font-display);
    font-weight: 800;
    font-size: var(--text-xl, 24px);
    line-height: 1;
    color: var(--gcs-black);
    letter-spacing: -0.01em;
}

.calc-value .unit {
    font-family: var(--gcs-font-body);
    font-size: var(--text-sm, 14px);
    font-weight: 600;
    color: var(--gcs-gray-60);
    margin-left: 4px;
}


/* ==========================================================================
   6. RANGE SLIDER
   ========================================================================== */

.calc-slider,
.calc-section input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--gcs-gray-90);
    outline: none;
    border-radius: 0;
    margin: 0;
}

.calc-slider::-webkit-slider-thumb,
.calc-section input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--gcs-red);
    border: 3px solid var(--gcs-white);
    box-shadow: 0 0 0 1.5px var(--gcs-black);
    cursor: pointer;
    border-radius: 0;
}

.calc-slider::-moz-range-thumb,
.calc-section input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--gcs-red);
    border: 3px solid var(--gcs-white);
    box-shadow: 0 0 0 1.5px var(--gcs-black);
    cursor: pointer;
    border-radius: 0;
}

.calc-slider::-moz-range-track,
.calc-section input[type="range"]::-moz-range-track {
    height: 6px;
    background: var(--gcs-gray-90);
    border: none;
    border-radius: 0;
}


/* ==========================================================================
   7. DISCLAIMER TEXT
   ========================================================================== */

.calc-disclaimer {
    font-size: var(--text-hint, 13px);
    color: var(--gcs-gray-60);
    margin: 8px 0 0;
    line-height: 1.5;
}


/* ==========================================================================
   8. RESULTS PANEL (right side - black background)
   ========================================================================== */

.calc-result {
    background: var(--gcs-black);
    color: var(--gcs-white);
    padding: 40px;
    position: relative;
}

.calc-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        45deg,
        var(--gcs-red) 0 8px,
        transparent 8px 24px
    );
}

.calc-result-label {
    font-family: var(--gcs-font-body);
    font-size: var(--text-hint, 13px);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gcs-red);
    margin-bottom: 12px;
}

.calc-result-num {
    font-family: var(--gcs-font-display);
    font-weight: 800;
    font-size: clamp(40px, 6vw, 56px);
    line-height: 0.95;
    color: var(--gcs-white);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}

.calc-result-num .currency {
    font-size: 0.6em;
    vertical-align: top;
    margin-right: 2px;
}

.calc-result-sub {
    font-size: var(--text-sm, 14px);
    line-height: 1.5;
    color: var(--gcs-text-light);
    margin-bottom: 28px;
}


/* ==========================================================================
   9. BREAKDOWN TABLE (inside results panel)
   ========================================================================== */

.calc-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 28px;
}

.calc-breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    font-size: var(--text-sm, 14px);
}

.calc-breakdown-row:last-child {
    border-bottom: none;
    padding-top: 14px;
    font-weight: 700;
}

.calc-breakdown-label {
    color: var(--gcs-text-light);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 600;
    font-size: var(--text-sm, 14px);
}

.calc-breakdown-val {
    font-family: var(--gcs-font-display);
    font-weight: 700;
    font-size: var(--text-base, 16px);
}

/* Net savings row: highlighted with red background */
.calc-breakdown-row.savings {
    background: var(--gcs-red);
    margin: 0 -40px;
    padding: 16px 40px;
    border-bottom: none;
}

.calc-breakdown-row.savings .calc-breakdown-label {
    color: var(--gcs-white);
    font-weight: 700;
    font-size: var(--text-sm, 14px);
}

.calc-breakdown-row.savings .calc-breakdown-val {
    color: var(--gcs-white);
    font-size: 22px;
    font-weight: 800;
}


/* ==========================================================================
   10. EXTRA NOTE (e.g. aggregate info for concrete crusher)
   ========================================================================== */

.calc-extra-note {
    font-size: var(--text-hint, 13px);
    line-height: 1.5;
    color: var(--gcs-text-light);
    margin: 16px 0 20px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}


/* ==========================================================================
   11. CTA BUTTON (inside calculator panels)
   ========================================================================== */

.calc-result-cta,
.calc-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 26px;
    font-family: var(--gcs-font-body);
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    cursor: pointer;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border-radius: 0;
    transition: background 0.15s, color 0.15s;
    background: var(--gcs-white);
    color: var(--gcs-black);
    width: 100%;
}

.calc-result-cta:hover,
.calc-cta:hover {
    background: var(--gcs-gray-90);
}


/* ==========================================================================
   11. FOOTER DISCLAIMER
   ========================================================================== */

.calc-foot {
    font-size: var(--text-hint, 13px);
    color: var(--gcs-gray-60);
    margin-top: 20px;
    line-height: 1.5;
}

.calc-result .calc-foot {
    color: var(--gcs-text-light);
}

.calc-foot a {
    color: var(--gcs-red);
    font-weight: 700;
    text-decoration: none;
}

.calc-foot a:hover {
    text-decoration: underline;
}


/* ==========================================================================
   12. EQUIPMENT CALCULATOR VARIANT
   ========================================================================== */

.calc-section--equipment {
    background: var(--gcs-black);
    color: var(--gcs-white);
}

.calc-section--equipment .calc-section__inner {
    padding: 0;
}


/* --------------------------------------------------------------------------
   12a. Equipment Input Panel (left)
   -------------------------------------------------------------------------- */

.calc-inputs {
    padding: 56px 48px;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.calc-inputs h2 {
    font-family: var(--gcs-font-display);
    font-weight: 800;
    font-size: clamp(32px, 3.6vw, 48px);
    line-height: 0.95;
    text-transform: uppercase;
    letter-spacing: -0.005em;
    margin: 0 0 12px;
    color: var(--gcs-white);
}

.calc-inputs p {
    font-size: 15px;
    line-height: 1.5;
    color: var(--gcs-text-light);
    margin: 0 0 32px;
    max-width: 480px;
}


/* --------------------------------------------------------------------------
   12b. Equipment Input Field
   -------------------------------------------------------------------------- */

.calc-field {
    margin-bottom: 28px;
}

.calc-field-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
}

.calc-field label {
    font-size: var(--text-sm, 14px);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gcs-text-light);
}

.calc-field .calc-value {
    color: var(--gcs-white);
}

/* Range slider on dark background */
.calc-field input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    border-radius: 0;
    margin: 0;
}

.calc-field input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: var(--gcs-red);
    border: 3px solid var(--gcs-white);
    box-shadow: 0 0 0 1.5px var(--gcs-black);
    cursor: pointer;
    border-radius: 0;
}

.calc-field input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: var(--gcs-red);
    border: 3px solid var(--gcs-white);
    box-shadow: 0 0 0 1.5px var(--gcs-black);
    cursor: pointer;
    border-radius: 0;
}

.calc-field input[type="range"]::-moz-range-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 0;
}

.calc-field-hints {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: var(--text-hint, 13px);
    color: var(--gcs-text-light);
    letter-spacing: 0.04em;
}


/* --------------------------------------------------------------------------
   12c. Model Toggle Button Group
   -------------------------------------------------------------------------- */

.calc-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.calc-toggle button {
    padding: 14px 20px;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: var(--gcs-text-light);
    font-family: var(--gcs-font-display);
    font-weight: 700;
    font-size: var(--text-base, 16px);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    text-align: center;
    border-radius: 0;
}

.calc-toggle button + button {
    border-left: none;
}

.calc-toggle button.active {
    background: var(--gcs-red);
    border-color: var(--gcs-red);
    color: var(--gcs-white);
}

.calc-toggle button:hover:not(.active) {
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--gcs-white);
}


/* --------------------------------------------------------------------------
   12d. Equipment Output Panel (right)
   -------------------------------------------------------------------------- */

.calc-output {
    padding: 56px 48px;
    background: linear-gradient(180deg, #111 0%, #000 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.calc-output-eye {
    font-size: var(--text-hint, 13px);
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gcs-red);
    margin-bottom: 14px;
}

.calc-output h3 {
    font-family: var(--gcs-font-display);
    font-weight: 800;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -0.005em;
    margin: 0 0 28px;
    color: var(--gcs-white);
}


/* ==========================================================================
   13. CONCRETE CRUSHER: COMPARISON BARS
   ========================================================================== */

.calc-bar {
    margin-bottom: 20px;
}

.calc-bar-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.calc-bar-row > span {
    font-size: var(--text-xs, 12px);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gcs-text-light);
}

.calc-bar-row > strong {
    font-family: var(--gcs-font-display);
    font-weight: 700;
    font-size: var(--text-md, 18px);
    color: var(--gcs-white);
}

.calc-bar-track {
    width: 100%;
    height: 12px;
    background: rgba(255, 255, 255, 0.08);
    position: relative;
    border-radius: 0;
}

.calc-bar-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 0;
}

.calc-bar-fill--haul {
    background: var(--gcs-gray-60);
}

.calc-bar-fill--crush {
    background: var(--gcs-red);
}

.calc-bar-breakdown {
    display: flex;
    justify-content: flex-start;
    gap: 16px;
    margin-top: 6px;
    margin-bottom: 0;
}

.calc-bar-breakdown > span {
    font-size: var(--text-hint, 13px);
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--gcs-text-light);
}


/* ==========================================================================
   14. CONCRETE CRUSHER: SAVINGS CALLOUT
   ========================================================================== */

.calc-savings {
    background: var(--gcs-red);
    padding: 24px 28px;
    margin-top: 28px;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    align-items: center;
    border-radius: 0;
}

.calc-savings-num {
    font-family: var(--gcs-font-display);
    font-weight: 800;
    font-size: clamp(32px, 5vw, 40px);
    line-height: 0.95;
    letter-spacing: -0.02em;
    color: var(--gcs-white);
}

.calc-savings-label {
    font-size: var(--text-hint, 13px);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 4px;
}

.calc-savings-pct {
    font-family: var(--gcs-font-display);
    font-weight: 800;
    font-size: 28px;
    line-height: 1;
    color: var(--gcs-white);
    text-align: right;
}


/* ==========================================================================
   15. TROMMEL SCREEN: RESULT GRID (2x2)
   ========================================================================== */

.calc-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 18px;
}

.calc-result-item {
    padding: 22px 24px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.calc-result-item:nth-child(2n) {
    border-right: none;
}

.calc-result-item:nth-last-child(-n+2) {
    border-bottom: none;
}

.calc-result-item-label {
    font-size: var(--text-hint, 13px);
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gcs-text-light);
    margin-bottom: 6px;
}

.calc-result-item-value {
    font-family: var(--gcs-font-display);
    font-weight: 800;
    font-size: var(--text-xl, 24px);
    line-height: 0.95;
    color: var(--gcs-white);
    letter-spacing: -0.02em;
}

.calc-result-item-value .calc-result-unit {
    font-size: var(--text-base, 16px);
    color: var(--gcs-text-light);
    margin-left: 4px;
}


/* ==========================================================================
   16. TROMMEL SCREEN: BIG SAVINGS DISPLAY
   ========================================================================== */

.calc-bigsavings {
    background: var(--gcs-red);
    padding: 26px 28px;
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 16px;
    align-items: center;
    border-radius: 0;
}

.calc-bigsavings-label {
    font-size: var(--text-sm, 14px);
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 4px;
}

.calc-bigsavings-num {
    font-family: var(--gcs-font-display);
    font-weight: 800;
    font-size: 44px;
    line-height: 0.95;
    color: var(--gcs-white);
    letter-spacing: -0.02em;
}

.calc-bigsavings-right {
    text-align: right;
}

.calc-bigsavings-right span {
    font-size: var(--text-xs, 12px);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    display: block;
}

.calc-bigsavings-right strong {
    display: block;
    font-family: var(--gcs-font-display);
    font-weight: 800;
    font-size: 30px;
    color: var(--gcs-white);
    margin-top: 2px;
    letter-spacing: -0.01em;
}


/* ==========================================================================
   17. RESPONSIVE: 980px (stack to single column)
   ========================================================================== */

@media (max-width: 980px) {

    /* Listing calculator */
    .calc-grid {
        grid-template-columns: 1fr;
    }

    .calc-controls {
        border-bottom: none;
    }

    /* Equipment calculator */
    .calc-section--equipment .calc-grid {
        grid-template-columns: 1fr;
    }

    .calc-inputs {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    }

    /* Savings callout */
    .calc-savings {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .calc-savings-pct {
        text-align: left;
    }

    .calc-bigsavings {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .calc-bigsavings-right {
        text-align: left;
    }

    /* Breakdown savings row margin adjustment */
    .calc-breakdown-row.savings {
        margin: 0 -32px;
        padding: 16px 32px;
    }
}


/* ==========================================================================
   18. RESPONSIVE: 720px (reduce padding)
   ========================================================================== */

@media (max-width: 720px) {

    .calc-section {
        padding: var(--gcs-section-pad-mobile, 48px) 0;
    }

    .calc-section__inner {
        padding: 0 20px;
    }

    .calc-controls {
        padding: 28px 24px;
    }

    .calc-result {
        padding: 28px 24px;
    }

    .calc-inputs {
        padding: 36px 24px;
    }

    .calc-output {
        padding: 36px 24px;
    }

    .calc-result-item-value {
        font-size: var(--text-lg, 20px);
    }

    .calc-bigsavings-num {
        font-size: 36px;
    }

    .calc-bigsavings-right strong {
        font-size: 24px;
    }

    /* Breakdown savings row margin adjustment for reduced padding */
    .calc-breakdown-row.savings {
        margin: 0 -24px;
        padding: 16px 24px;
    }
}


/* ==========================================================================
   19. RESPONSIVE: 560px (smaller headings, tighter layout)
   ========================================================================== */

@media (max-width: 560px) {

    .calc-title {
        font-size: var(--text-xl, 24px);
    }

    .calc-inputs h2 {
        font-size: clamp(24px, 7vw, 32px);
    }

    .calc-output h3 {
        font-size: clamp(22px, 6vw, 28px);
    }

    .calc-controls {
        padding: 24px 20px;
    }

    .calc-result {
        padding: 24px 20px;
    }

    .calc-inputs {
        padding: 32px 20px;
    }

    .calc-output {
        padding: 32px 20px;
    }

    /* Result grid stacks to single column */
    .calc-result-grid {
        grid-template-columns: 1fr;
    }

    .calc-result-item {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .calc-result-item:last-child {
        border-bottom: none;
    }

    .calc-bigsavings {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .calc-bigsavings-right {
        text-align: left;
    }

    .calc-savings {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .calc-savings-pct {
        text-align: left;
    }

    /* Breakdown savings row margin adjustment for tightest padding */
    .calc-breakdown-row.savings {
        margin: 0 -20px;
        padding: 16px 20px;
    }
}
