/* IncassoKostenBerekenen.nl — sitespecifieke opmaak (na /_content/IFlow.Gedeeld/css/basis.css geladen).
   Desktop-first; zelfde breakpoints als basis.css. */

/* ---------- Header: lange naam in twee kleuren ---------- */

.brand__sub { color: var(--brand); }

/* Alternatieve, kortere tekst voor smalle schermen */
.kort { display: none; }

/* ---------- Hero: tekst met daaronder het formulier over de volle breedte ---------- */

.hero--calc { padding: 40px 0 44px; }
.hero--calc .hero__lead { max-width: 780px; margin-bottom: 24px; }

/* Alle invoer op één rij (desktop); elk veld heeft een label erboven en eventueel een hint eronder. */
.calc-bar {
  background: var(--surface); color: var(--ink); border-radius: 14px; padding: 20px 24px 18px;
  box-shadow: var(--shadow-lg);
}
.calc-bar__fields {
  display: grid; gap: 16px 20px; align-items: start;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .85fr) auto;
}
/* De knop staat op de hoogte van de invoervelden: ruimte vrijhouden ter hoogte van de labels. */
.calc-bar__submit { padding-top: calc(14px * 1.6 + 6px); }  /* regelhoogte label + gap van .field */
.calc-bar__submit .btn { min-width: 140px; }
.calc-bar .alert { margin: 16px 0 0; }
.calc-bar .alert p { margin: 0; }
.field__hint { font-size: 13px; line-height: 1.4; color: var(--muted); }
.field__optional { font-weight: 400; color: var(--muted); }

/* Keuzes (bedrijf/consument, btw ja/nee) als twee knoppen naast elkaar */
.segmented-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.segmented-field > legend { padding: 0; margin-bottom: 0; float: left; width: 100%; }
.segmented-field > legend + * { clear: both; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.segmented__item { position: relative; cursor: pointer; }
.segmented__item + .segmented__item { border-left: 1px solid var(--line-strong); }
.segmented__item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented__item span {
  display: grid; place-items: center; min-height: 42px; padding: 6px 12px;
  font-weight: 600; color: var(--ink-2); background: var(--surface); transition: background .15s, color .15s;
}
.segmented__item:hover span { background: var(--brand-50); }
.segmented__item input:checked + span { background: var(--brand); color: #fff; }
.segmented__item input:focus-visible + span { outline: 3px solid rgba(140, 16, 52, .45); outline-offset: -3px; }

/* ---------- Resultaat ---------- */

.totals--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
/* Bovenkant gelijk met de zijbalk; onderaan ruimte tot de uitleg (valt samen met de marge van een advertentie). */
.main > .result { margin-top: 0; margin-bottom: 40px; }
.result__text { margin: 14px 0 0; color: var(--ink-2); }
.result .alert { margin: 16px 0 0; }

.table--schijven tbody tr.is-unused td { color: var(--muted); }
.table--schijven tfoot tr.is-step th, .table--schijven tfoot tr.is-step td { font-weight: 400; background: var(--surface); border-top: 1px solid var(--line); }
.table--schijven tfoot tr.is-step:first-child th, .table--schijven tfoot tr.is-step:first-child td { border-top: 2px solid var(--line-strong); }
.table--schijven tfoot tr.is-step + tr.is-total th, .table--schijven tfoot tr.is-step + tr.is-total td { border-top: 1px solid var(--line-strong); }

.rente {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg);
}
.rente__amount { margin: 0; font-size: 17px; }
.rente__amount strong { font-size: 24px; color: var(--brand); font-variant-numeric: tabular-nums; margin-right: 4px; }
.rente__meta { margin: 2px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- Uitleg ---------- */

.staffel-wrap { max-width: 560px; margin-bottom: 1em; }
.table--staffel tfoot th, .table--staffel tfoot td { font-weight: 600; }
.table--staffel tfoot tr + tr th, .table--staffel tfoot tr + tr td { border-top: 1px solid var(--line); }

/* ---------- Zijbalk ---------- */

.side-card__note { margin: 8px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

/* ======================================================================
   Kleinere schermen
   ====================================================================== */

@media (max-width: 1199px) {
  .totals--4 .total { --total-size: 22px; }
}

@media (max-width: 1199px) {
  .calc-bar__fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .calc-bar__submit { grid-column: 1 / -1; padding-top: 0; }
  .calc-bar__submit .btn { width: 100%; }
}

@media (max-width: 860px) {
  .topbar__label { display: none; }
  .totals--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .totals--4 { grid-template-columns: 1fr; }
  .hero--calc { padding: 28px 0 32px; }
  .calc-bar { padding: 18px 16px; }
  .calc-bar__fields { grid-template-columns: minmax(0, 1fr); }
  .rente .btn { width: 100%; white-space: normal; }
}

@media (max-width: 480px) {
  .brand__name { font-size: 17px; }
  .lang { display: none; }
  .kort { display: inline; }
  .table--schijven th, .table--schijven td { padding: 8px 6px; }
  .table--schijven th:first-child, .table--schijven td:first-child { padding-left: 10px; }
  .table--schijven th:last-child, .table--schijven td:last-child { padding-right: 10px; }
}

@media (max-width: 350px) {
  .brand__name { font-size: 15px; }  /* lange naam naast het menu-icoon op 320 px */
}

/* ---------- Afdrukken: alleen het resultaat ---------- */

@media print {
  .hero, .prose, .faq, .cta-band { display: none !important; }
  .rente { background: none; border: 1px solid #bbb; }
  .totals--4 { grid-template-columns: repeat(4, 1fr); }
}
