/* Ported verbatim from the OptimizePress custom-HTML block on
   /product/slide-templates/overview/. The original declared its variables on
   :root with generic names (--text, --border, --card) that would have
   collided with the theme; that block is scoped to .roi-calculator here.
   Behaviour is otherwise unchanged. */

.roi-calculator {
        --text: #1f2937;
        --muted: #6b7280;
        --border: none;
        --card: #f8fafc;
        --track: #dadada;
        --fill: #c91d1d;
        --thumb: #c91d1d;
        --radius: 0px;
    }
    .roi-calculator,
    .roi-calculator * {
        box-sizing: border-box;
    }
    .roi-calculator {
        max-width: 100%;
        margin: 0 auto;
        font-family:
            Inter,
            ui-sans-serif,
            system-ui,
            -apple-system,
            BlinkMacSystemFont,
            "Segoe UI",
            sans-serif;
        color: var(--text);
        background: #f8f7f6;
        padding: 0;
    }
    .roi-input-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        margin-bottom: 22px;
    }
    .roi-field {
        background: #fff;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 20px;
    }
    .roi-field label {
        display: block;
        margin-bottom: 14px;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.4;
    }
    .slider-wrap {
        position: relative;
        padding-top: 8px;
    }
    .range-input {
        -webkit-appearance: none;
        appearance: none;
        width: 100%;
        height: 8px;
        border-radius: 999px;
        outline: none;
        background: linear-gradient(
            to right,
            var(--fill) 0%,
            var(--fill) var(--progress, 0%),
            var(--track) var(--progress, 0%),
            var(--track) 100%
        );
        margin: 0;
    }
    .range-input::-webkit-slider-runnable-track {
        height: 8px;
        border-radius: 999px;
        background: transparent;
    }
    .range-input::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 22px;
        height: 22px;
        margin-top: -7px;
        border-radius: 50%;
        border: 3px solid #fff;
        background: var(--thumb);
        cursor: pointer;
    }
    .range-input::-moz-range-track {
        height: 8px;
        border-radius: 999px;
        background: var(--track);
    }
    .range-input::-moz-range-progress {
        height: 8px;
        border-radius: 999px;
        background: var(--fill);
    }
    .range-input::-moz-range-thumb {
        width: 22px;
        height: 22px;
        border: 3px solid #fff;
        border-radius: 50%;
        background: var(--thumb);
        cursor: pointer;
    }
    .slider-labels {
        position: relative;
        height: 22px;
        margin-top: 12px;
        font-size: 13px;
        color: var(--muted);
        user-select: none;
    }
    .slider-labels span {
        position: absolute;
        transform: translateX(-50%);
        white-space: nowrap;
        line-height: 1;
    }
    .slider-labels span:first-child {
        transform: translateX(0);
    }
    .slider-labels span:last-child {
        transform: translateX(-100%);
    }
    .hours-labels span:nth-child(1) {
        left: 0%;
    }
    .hours-labels span:nth-child(2) {
        left: 11.11%;
    }
    .hours-labels span:nth-child(3) {
        left: 22.22%;
    }
    .hours-labels span:nth-child(4) {
        left: 33.33%;
    }
    .hours-labels span:nth-child(5) {
        left: 44.44%;
    }
    .hours-labels span:nth-child(6) {
        left: 55.55%;
    }
    .hours-labels span:nth-child(7) {
        left: 66.66%;
    }
    .hours-labels span:nth-child(8) {
        left: 77.77%;
    }
    .hours-labels span:nth-child(9) {
        left: 88.88%;
    }
    .hours-labels span:nth-child(10) {
        left: 100%;
    }
    .rate-labels span:nth-child(1) {
        left: 0%;
    }
    .rate-labels span:nth-child(2) {
        left: 20%;
    }
    .rate-labels span:nth-child(3) {
        left: 40%;
    }
    .rate-labels span:nth-child(4) {
        left: 60%;
    }
    .rate-labels span:nth-child(5) {
        left: 80%;
    }
    .rate-labels span:nth-child(6) {
        left: 100%;
    }
    .roi-results-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
        margin-bottom: 24px;
    }
    .roi-result-card {
        background: #fff;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 22px 18px;
        text-align: center;
    }
    .roi-result-label {
        font-size: 13px;
        line-height: 1.35;
        color: var(--muted);
        margin-bottom: 10px;
    }
    .roi-result-value {
        font-size: clamp(22px, 3vw, 30px);
        line-height: 1.1;
        font-weight: 700;
        letter-spacing: -0.02em;
    }
    .roi-summary {
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 0px;
        line-height: 1.65;
        font-size: 13px;
        text-align: center;
    }
    .roi-summary strong {
        font-weight: 700;
    }
    @media (max-width: 980px) {
        .roi-results-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }
    @media (max-width: 760px) {
        .roi-calculator {
            padding: 20px 14px;
        }
        .roi-input-grid,
        .roi-results-grid {
            grid-template-columns: 1fr;
        }
        .roi-field,
        .roi-result-card,
        .roi-summary {
            padding: 18px;
        }
    }

/* Breathing room under the intro copy. Appended deliberately: the ported block
   sets `margin: 0 auto` further down, and that shorthand resets margin-top. */
.landing .roi-calculator {
	margin-top: 3em;
}
