/**
 * SpendSnapper - Dext alternative page
 *
 * The page for a practice moving from Dext. It reuses the Accountants page's hero, simulation and step styles
 * (accountants.css) and the site's cards, lists, questions and notes (site.css). These rules add the bill calculator
 * and the page's own phone layout.
 */

/* -----------------------------
 * The bill calculator, beside the pitch
 * ----------------------------- */
.bill-calc {
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    background: var(--secondary-ultra-light);
}

.bill-calc h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.bill-calc label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
    color: var(--muted);    /* quiet, like the panel's other text, so the price stands out */
}

/* Each slider and its number box share a row, the box just wide enough for a few figures */
.bill-calc-pair {
    display: grid;
    grid-template-columns: 1fr 5.5rem;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.1rem;
}

.bill-calc .form-range {
    height: 2.75rem;        /* a target a thumb can find */
}

/* The slider's track, a shade deeper than the panel so it can be seen against it */
.bill-calc .form-range::-webkit-slider-runnable-track {
    background-color: var(--table-header-bg);
}

.bill-calc .form-range::-moz-range-track {
    background-color: var(--table-header-bg);
}

/* The slider's knob in the site's blue, a little larger than the browser's own so it is easy to catch */
.bill-calc .form-range::-webkit-slider-thumb {
    width: 1.4rem;
    height: 1.4rem;
    margin-top: -0.45rem;
    background-color: var(--secondary);
}

.bill-calc .form-range::-webkit-slider-thumb:active {
    background-color: var(--secondary-light);
}

.bill-calc .form-range::-moz-range-thumb {
    width: 1.4rem;
    height: 1.4rem;
    background-color: var(--secondary);
}

.bill-calc .form-range::-moz-range-thumb:active {
    background-color: var(--secondary-light);
}

.bill-calc .form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 0.25rem var(--secondary-ultra-light), 0 0 0 0.4rem var(--secondary-light);
}

.bill-calc .form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 0.25rem var(--secondary-ultra-light), 0 0 0 0.4rem var(--secondary-light);
}

.bill-calc .form-control {
    height: 2.75rem;
}

/* The figure beside the slider: it looks like the site's boxes but only shows the slider's value */
.bill-calc-count {
    display: flex;
    align-items: center;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

.bill-calc-result {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    background: var(--bs-white);
}

.bill-calc-price {
    margin: 0;
    font-size: 1rem;
    color: var(--muted);
}

.bill-calc-price span {
    font-size: 2rem;
    font-weight: 700;
    color: var(--success);
}

/* The second half of the sentence under the price: it doesn't matter how many clients the documents come from.
   The same size and spacing as the line above, standing out through the site's blue rather than weight. */
.bill-calc-clients {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--secondary);
}

/* Above the largest plan, in the price's place: a heading the size of the step cards' headings, in slate rather
   than green as it isn't a price, with more room around the message */
.bill-calc-result:has(.bill-calc-talk) {
    padding: 1.25rem 1.5rem 1.4rem;
}

.bill-calc-talk {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}

.bill-calc-talk + .bill-calc-plan {
    line-height: 1.6;
}

.bill-calc-talk-button {
    margin-top: 0.9rem;
}

.bill-calc-plan {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* The simulation sits under its heading, centred in its panel, as far below it as the other panels' cards */
#switch-sim .practice-sim {
    margin-top: 2rem;
}

/* -----------------------------
 * Which suits you
 * ----------------------------- */
.suits h3 {
    font-size: 1.2rem;
}

.suits .feature-list {
    grid-template-columns: 1fr;
    margin-top: 1rem;
}


/* The trade mark line at the foot of the closing band, in the band's own quiet text colour */
.closing .trade-mark-note {
    margin: 1.25rem 0 0;
    font-size: 0.8rem;
}

/* Once the cards stack one to a row, the icon sits beside its heading and text, so the cards stay short
   (as the Accountants page's control cards do) */
@media (max-width: 767.98px) {
    #switch-different .step {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 1rem;
        align-items: start;
        align-content: start;
        padding: 1.25rem;
    }

    #switch-different .step .step-icon {
        grid-row: span 2;
        width: 40px;
        height: 40px;
        margin-bottom: 0;
        font-size: 1rem;
    }

    #switch-different .step h3 {
        margin-top: 0.45rem;
    }
}

/* -----------------------------
 * Phones
 * ----------------------------- */
@media (max-width: 575.98px) {
    /* Centred headings, as on the other pages */
    #switch-different .section-title,
    #switch-sim .section-title,
    #switch-suits .section-title,
    #switch-suits .hero-note {
        text-align: center;
    }

    .bill-calc {
        padding: 1.25rem 1rem;
    }

    .bill-calc h2 {
        text-align: center;
    }

    .bill-calc-pair {
        grid-template-columns: 1fr 4.75rem;
        gap: 0.75rem;
    }
}
