/* Styles specific to the Credit Card Payoff Tier-2 calculator: the two-line balance chart, the
   screen-reader helper, the never-clears warning banner, and the saving-coloured pill. Sits alongside
   calculator.css; loaded only on /uk/calculators/credit-card-payoff.

   The line-chart + saving-pill rules mirror calculator-charts.css (the two Tier-2
   comparison-line calcs share the same chart shape). A future refactor could promote the shared
   line-chart base into calculator.css for both pages; kept per-page here as a small duplication of
   the shared calculator-charts.css chart CSS, to keep this change self-contained. */

/* The visually-hidden screen-reader helper (.calc-sr-only / .visually-hidden) is defined ONCE in
   calculator.css, which every calculator page loads. It used to be defined here and copied into three
   other per-page sheets, which is why mortgage-affordability, a page that loads calculator.css and not
   this one, rendered its screen-reader table VISIBLY to every sighted visitor. */

/* ── Line chart ─────────────────────────────────────────────────────────────────────────────────
   Inline-SVG line chart: two polylines (minimum only + with the extra), 4-tick Y grid, 5-year X
   ticks. No external chart library. The server renders the polylines + tick labels at first paint and
   calculator.js redraws them on AJAX recompute (applyCardPayoffChart). Geometry is mirrored between
   Razor and JS so the two paths produce identical pixel output. */

.calc-chart-wrap {
    margin: 1rem 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.calc-chart {
    width: 100%;
    height: auto;
    font-size: 0.85rem;
}

.calc-chart-bg {
    fill: #f8f9fa;
}

.calc-chart-gridlines line {
    stroke: #dee2e6;
    stroke-width: 1;
}

.calc-chart-line {
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Comparison line pair: "minimum only" is the Loser (de-emphasised grey + dash, the baseline),
   "with the extra" is the Winner (green). Colours from the :root vars in _HeadTags. */
.calc-chart-line-loser {
    stroke: var(--chart-loser);
    stroke-dasharray: 4 4;
}

.calc-chart-line-winner {
    stroke: var(--chart-winner);
}

.calc-chart-legend {
    display: flex;
    gap: 1.2rem;
    color: #555;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
    font-size: 0.95rem;
}

.calc-chart-swatch {
    display: inline-block;
    width: 1.2rem;
    height: 0.25rem;
    margin-right: 0.4rem;
    border-radius: 1px;
    vertical-align: middle;
}

.calc-chart-swatch-loser {
    background: var(--chart-loser);
}

.calc-chart-swatch-winner {
    background: var(--chart-winner);
}

/* Saving-coloured pill figure: the "Interest saved" pill is the page's headline number, so it stands
   out in green (matches SDLT's FTB-saving pill colour for consistency across the calculator surface). */
.calc-pill-saving {
    color: #1d6a31;
}

/* Never-clears warning banner: shown only when the minimum payment does not cover the interest (only
   reachable when the minimum percentage is set to zero). An honest result state, not a validation
   error, so it sits inside the results area rather than the validation-issues banner above. */
.calc-warning {
    margin: 0.5rem 0 0;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    background: #fff3cd;
    border: 1px solid #ffe69c;
    color: #664d03;
    font-size: 0.95rem;
}
