/* V4-calculatorvarianten (lokale ontwerppreview): gedeelde opbouw. Kleur en karakter staan in variant-a.css en variant-b.css.
   Volgorde op elke breedte: uitkomst (foto, maandbedrag, looptijd), invoer, afronding. Geen inline stijl (CSP). */
@media (max-width: 899.98px) { html { scroll-padding-bottom: 104px; } }   /* een veld met focus komt niet achter de vaste balk terecht */

.cv { --cv-groot: clamp(3.25rem, 15vw, 4.25rem); display: grid; grid-template-columns: minmax(0, 1fr); }
.cv p { margin: 0; }
.calc-wrap .calc-hoofd { margin-bottom: var(--s2); }   /* de calculator sluit dichter aan op de titel: het maandbedrag staat eerder in beeld */

/* Uitkomst */
.cv-kop { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; min-width: 0; }
.cv-foto { margin: 0; position: relative; overflow: hidden; }
.cv-foto picture { display: block; width: 100%; height: 100%; }
.cv-foto img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 62% 60%; }
.cv-foto figcaption { font-size: .75rem; line-height: 1.4; }
.cv-label { font-size: .9375rem; font-weight: 650; }
/* Het maandbedrag: vaste hoogte, zodat een melding ("Controleer uw invoer") de rest niet verschuift */
.cv-groot { font-size: var(--cv-groot); min-height: calc(var(--cv-groot) * 1.42); line-height: .96; font-weight: 800; letter-spacing: -.045em; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; justify-content: flex-start; }
.cv-groot small { margin-top: .5rem; font-size: 1rem; line-height: 1.3; font-weight: 600; letter-spacing: 0; }
.cv[data-berekend="nee"] .cv-groot { font-size: calc(var(--cv-groot) * .44); line-height: 1.15; letter-spacing: -.02em; justify-content: center; }

/* Looptijd: een rij van zes, het bedrag erboven verandert mee */
.cv-sel { font-size: .9375rem; font-weight: 650; }
.cv-looptijden { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 10px; }
.cv-lt { position: relative; display: grid; place-items: center; min-height: 46px; cursor: pointer; font-weight: 650; font-variant-numeric: tabular-nums; }
.cv-lt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }

/* Invoer */
.cv-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); align-content: start; min-width: 0; }
.cv-inkop { margin: 0; font-size: 1.125rem; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; color: var(--navy-900); }
.cv-in .error-summary { margin: 0; }
.cv-velden { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
.cv-veld, .cv-extra { gap: 6px; min-width: 0; }
.cv-veld > label, .cv-extra > label { font-size: .9375rem; font-weight: 650; color: var(--ink); }
.cv-euro { display: flex; align-items: center; background: #fff; border: 1px solid #7f8c9f; border-radius: 10px; padding-left: 14px; transition: border-color .15s; }
.cv-euro > span { color: var(--muted); font-weight: 650; font-size: 1.125rem; }
.cv-euro input { flex: 1; min-width: 0; border: 0; background: transparent; box-shadow: none; min-height: 54px; padding: 0 12px 0 8px; font: inherit; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--navy-900); }
.cv-euro:hover { border-color: var(--navy-700); }
.cv-euro:focus-within { border-color: var(--navy-900); outline: 3px solid var(--green-300); outline-offset: 2px; }
.cv-euro input:focus, .cv-euro input:focus-visible { outline: 0; box-shadow: none; }
.cv-euro[data-ongeldig="true"] { border-color: var(--danger); background: var(--danger-bg); }
.cv-in .hint { margin: 0; font-size: .875rem; line-height: 1.45; color: var(--muted); }
.cv-in .hint[data-toon="ok"] { color: var(--green-800); font-weight: 650; }
.cv-in .hint[data-toon="fout"] { color: var(--danger); font-weight: 650; }
/* Financieringsbedrag: een samenvattingsregel, geen eigen blok */
.cv-fin { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'naam bedrag' 'uitleg uitleg'; align-items: baseline; gap: 2px 16px; padding: 14px 0; border-block: 1px solid var(--line); }
.cv-fin-naam { grid-area: naam; font-weight: 650; }
.cv-fin-uitleg { grid-area: uitleg; font-size: .875rem; line-height: 1.45; color: var(--muted); }
@media (min-width: 640px) { .cv-fin { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'naam uitleg bedrag'; } }
.cv-fin-bedrag { grid-area: bedrag; font-size: 1.125rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--navy-900); }
/* Optionele gegevens */
.cv-meer > summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; font-weight: 650; line-height: 1.4; color: var(--navy-700); border-radius: 8px; }
.cv-meer > summary::-webkit-details-marker { display: none; }
.cv-meer > summary::after { content: ''; flex: none; width: 9px; height: 9px; margin-right: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.cv-meer[open] > summary::after { transform: translateY(2px) rotate(-135deg); }
.cv-meer > summary:hover { color: var(--green-800); }
.cv-meer-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); padding: var(--s2) 0 var(--s2); }
.cv-rij { display: flex; gap: var(--s2); }
.cv-rij input { flex: 1; min-width: 0; text-transform: uppercase; }
.cv-extra input { min-height: 50px; border: 1px solid #7f8c9f; border-radius: 10px; padding: 0 14px; font: inherit; font-weight: 600; color: var(--navy-900); background: #fff; }
.cv-check { min-height: 50px; padding: 0 18px; border-radius: 10px; background: var(--navy-900); color: #fff; }
.cv-check:hover { background: var(--navy-800); }
.cv-check[disabled] { opacity: .6; cursor: progress; }
.cv-keuze { border: 0; margin: 0; padding: 0; min-width: 0; }
.cv-keuze legend { padding: 0; margin-bottom: 4px; font-size: .9375rem; font-weight: 650; }
.cv-opties { display: flex; flex-wrap: wrap; gap: 4px var(--s5); }
.cv-opties label { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.cv-opties input { width: 20px; height: 20px; accent-color: var(--green-700); }

/* Som van de termijnen: bij de looptijd, met vaste ruimte zodat niets verschuift */
.cv-som[hidden] { display: block; visibility: hidden; }
/* Afronding: de knop en de toelichting (zichtbaar, compact) */
.cv-voet { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s3); align-content: start; min-width: 0; }
.cv-som { font-size: .9375rem; line-height: 1.5; font-weight: 600; min-height: 3em; max-width: 44ch; text-wrap: balance; }
.cv-voet .cv-actie { width: 100%; text-align: center; }
.cv-noot { font-size: .875rem; line-height: 1.5; max-width: 62ch; }
.cv-contact { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; font-weight: 650; text-underline-offset: 4px; }

/* Vaste balk op mobiel: maandbedrag en knop, alleen zolang beide in de calculator zelf buiten beeld zijn */
.cv-balk { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); transform: translateY(105%); visibility: hidden; transition: transform .25s var(--ease), visibility 0s .25s; }
.cv-balk.is-zichtbaar { transform: none; visibility: visible; transition: transform .25s var(--ease); }
.cv-balk-tekst { margin: 0; display: grid; line-height: 1.2; flex: none; }
.cv-balk-label { font-size: .75rem; font-weight: 600; }
.cv-balk-bedrag { font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cv-balk-actie { flex: 1; min-width: 0; min-height: 48px; padding: 8px 12px; font-size: .9375rem; white-space: nowrap; }
@media (max-width: 419.98px) {   /* smal scherm: bedrag op een regel boven de knop, zodat de knoptekst nooit afbreekt */
  .cv-balk { flex-direction: column; align-items: stretch; gap: 6px; }
  .cv-balk-tekst { display: block; text-align: center; }
  .cv-balk-label { font-size: .8125rem; }
  .cv-balk-bedrag { font-size: .9375rem; }
}
@media (min-width: 900px) { .cv-balk { display: none; } }
@media (prefers-reduced-motion: reduce) { .cv-balk, .cv-balk.is-zichtbaar, .cv-euro { transition: none; } }
/* Homepage: zolang de calculator of een aanvraagknop van de pagina zelf in beeld is, wijkt de vaste aanvraagknop (nooit twee tegelijk) */
body.cv-actief .sticky-cta { transform: translateY(110%); visibility: hidden; }

/* Aanvraagpagina: samenvatting van de berekening boven het formulier */
.ov { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); padding: var(--s5); border-radius: 18px; margin-bottom: var(--s5); scroll-margin-top: 8px; }
.ov p, .ov dl, .ov dd, .ov h3 { margin: 0; }
.ov-bedrag { display: grid; gap: 6px; align-content: start; }
.ov-kop { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.ov-titel { font-size: 1.0625rem; line-height: 1.3; font-weight: 800; letter-spacing: -.01em; }
.ov-wijzig { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; text-underline-offset: 4px; }
.ov-label { font-size: .875rem; font-weight: 650; }
.ov-groot { font-size: clamp(2.5rem, 10vw, 3.25rem); line-height: 1; font-weight: 800; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ov-groot small { font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.ov-noot { font-size: .875rem; line-height: 1.45; }
.ov-lijst { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; padding-top: var(--s4); border-top: 1px solid var(--ov-lijn); }
.ov-item { display: grid; gap: 2px; min-width: 0; }
.ov-item dt { font-size: .8125rem; line-height: 1.35; }
.ov-item dd { font-size: 1.0625rem; line-height: 1.3; font-weight: 750; font-variant-numeric: tabular-nums; }
.ov-extra .ov-item dd { font-size: .9375rem; font-weight: 650; }
.ov-def { font-size: .875rem; line-height: 1.5; padding-top: var(--s4); border-top: 1px solid var(--ov-lijn); }
.ov-wis { justify-self: start; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; font-size: .9375rem; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
@media (min-width: 560px) {
  .ov { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: var(--s6); padding: var(--s6); }
  .ov-kop, .ov-extra, .ov-def, .ov-wis { grid-column: 1 / -1; }
  .ov-lijst:not(.ov-extra) { padding-top: 0; border-top: 0; align-self: center; }
  .ov-extra { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Aanvraagpagina: de samenvatting sluit aan op het formulier eronder */
.request:has(> .ov) { row-gap: var(--s5); }
.request > .ov { margin-bottom: 0; }

/* Variant B, premium automotive: een donkerblauw podium over de volle breedte met de auto, het maandbedrag en de looptijd als schaal;
   daaronder de invoer op wit, met het label in het veld. */
.cv { border-radius: 22px; overflow: hidden; background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgba(7,42,77,.1), 0 40px 70px -48px rgba(4,26,49,.6); }

/* Podium */
.cv-kop { position: relative; background: var(--navy-950); color: #fff; padding-bottom: var(--s5); }
.cv-foto { aspect-ratio: 21 / 9; }
.cv-foto::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(4,26,49,0) 52%, var(--navy-950) 100%); pointer-events: none; }
.cv-foto figcaption { position: absolute; z-index: 1; right: 12px; top: 10px; padding: 3px 8px; border-radius: 6px; background: rgba(4,26,49,.72); color: #fff; }
.cv-uitkomst { display: grid; gap: 6px; padding: var(--s2) var(--s4) 0; position: relative; z-index: 1; }
.cv-label { color: var(--green-300); }
.cv-groot { color: #fff; }
.cv-groot small { color: rgba(255,255,255,.82); }
.cv-looptijd { padding: var(--s4) var(--s4) 0; position: relative; z-index: 1; }
.cv-kop .cv-som { padding: var(--s3) var(--s4) 0; position: relative; z-index: 1; color: rgba(255,255,255,.9); }
.cv-sel { color: rgba(255,255,255,.82); font-weight: 600; }
/* Looptijd als schaal: een lijn met zes maatstreepjes; de gekozen looptijd krijgt een groene markering */
.cv-looptijden { margin-top: 14px; border-top: 1px solid rgba(255,255,255,.34); }
.cv-lt { min-height: 50px; padding-top: 8px; color: rgba(255,255,255,.78); font-size: 1rem; transition: color .15s; }
.cv-lt::before { content: ''; position: absolute; top: -1px; left: 50%; width: 1px; height: 7px; background: rgba(255,255,255,.55); }
.cv-lt:hover { color: #fff; }
.cv-lt[data-gekozen="true"] { color: #fff; font-weight: 800; font-size: 1.3125rem; }
.cv-lt[data-gekozen="true"]::before { top: -2px; left: 14%; width: 72%; height: 3px; border-radius: 2px; background: var(--green-300); }
.cv-lt:has(input:focus-visible) { outline: 3px solid var(--green-300); outline-offset: -3px; border-radius: 8px; }

/* Invoer: het label staat in het veld */
.cv-in { padding: var(--s6) var(--s4) 0; }
.cv-veld { position: relative; }
.cv-veld > label { position: absolute; z-index: 1; top: 9px; left: 15px; font-size: .8125rem; font-weight: 600; color: var(--muted); pointer-events: none; }
.cv-veld .cv-euro { padding: 24px 0 2px 14px; border-radius: 12px; }
.cv-veld .cv-euro input { min-height: 40px; }
.cv-fin { border-top: 0; padding-top: 0; }

/* Afronding */
.cv-voet { padding: var(--s3) var(--s4) var(--s5); }
.cv-noot { color: var(--muted); }
.cv-contact { color: var(--navy-700); }
.cv-contact:hover { color: var(--green-800); }

.cv-balk { background: var(--navy-950); box-shadow: 0 -14px 30px -18px rgba(4,26,49,.7); }
.cv-balk-label { color: rgba(255,255,255,.8); }
.cv-balk-bedrag { color: #fff; }

@media (min-width: 640px) {
  .cv-uitkomst, .cv-looptijd, .cv-kop .cv-som { padding-inline: var(--s6); }
  .cv-in { padding: var(--s6) var(--s6) 0; }
  .cv-voet { padding: var(--s3) var(--s6) var(--s6); }
  .cv-velden { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
}
@media (min-width: 900px) {
  .cv { --cv-groot: clamp(4.75rem, 7vw, 6.25rem); }
  /* de auto vult de rechterkant van het podium; links loopt de foto uit in het donkerblauw */
  .cv-kop { min-height: 440px; padding: var(--s7); align-content: center; gap: var(--s4); }
  .cv-foto { position: absolute; inset: 0 0 0 34%; aspect-ratio: auto; }
  .cv-foto img { object-position: 70% 58%; }
  .cv-foto::after { background: linear-gradient(90deg, var(--navy-950) 0%, rgba(4,26,49,.6) 16%, rgba(4,26,49,0) 40%), linear-gradient(to top, rgba(4,26,49,.55) 0%, rgba(4,26,49,0) 30%); }
  .cv-foto figcaption { top: auto; right: 16px; bottom: 14px; }
  .cv-uitkomst, .cv-looptijd, .cv-kop .cv-som { padding: 0; max-width: 430px; }
  .cv-kop .cv-som { min-height: 0; }
  .cv-in { padding: var(--s7) var(--s7) 0; }
  .cv-voet { padding: var(--s5) var(--s7) var(--s7); grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s7); align-items: start; }
  .cv-voet .cv-actie { width: auto; grid-column: 2; grid-row: 1 / span 2; min-width: 300px; }
  .cv-noot, .cv-contact { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { .cv-lt { transition: none; } }

/* Aanvraagpagina */
.ov { --ov-lijn: rgba(255,255,255,.22); background: var(--navy-950); color: #fff; }
.ov .ov-titel, .ov-groot { color: #fff; }
.ov-label { color: var(--green-300); }
.ov-noot, .ov-item dt, .ov-def, .ov-groot small { color: rgba(255,255,255,.8); }
.ov-wijzig, .ov-wis { color: #fff; }
.ov-wijzig { text-decoration: underline; }
