/* ==========================================================================
   Gettoweb – prijscalculator.css
   Enkel voor /prijscalculator. Bouwt verder op de tokens en bouwstenen
   uit site.css (kleuren, fonts, radii, .card, .form, .field, .alert, .btn).
   ========================================================================== */

/* Indeling: stappen links, samenvatting rechts (onder elkaar op mobiel) ---- */
.calc {
  display: grid;
  gap: 24px;
  align-items: start;
}
.calc-main {
  display: grid;
  gap: 20px;
  min-width: 0;
}

/* Stap (fieldset) ---------------------------------------------------------- */
.calc-step {
  min-width: 0;
  margin: 0;
  padding: clamp(20px, 3vw, 36px);
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}
/* legend als gewone blok-kop: float haalt hem uit de standaard fieldset-rand */
.calc-step > legend {
  position: relative;
  float: left;
  width: 100%;
  min-height: 40px;
  padding: 0 0 0 54px;
}
.calc-step > legend + * { clear: both; }
.calc-step-num {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--green-950);
  font-family: var(--font-display);
  font-size: 1.125rem;
  line-height: 1;
}
.calc-step h2 {
  padding-top: 5px;
  font-size: clamp(1.3125rem, 1.15rem + 0.8vw, 1.75rem);
  line-height: 1.2;
}
.calc-help {
  padding-top: 8px;
  color: var(--muted);
  font-size: 1rem;
}

/* Keuzekaarten (radio en checkbox) ----------------------------------------- */
.calc-options {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}
.calc-option {
  position: relative;
  min-width: 0;
  padding: 18px;
  border: 2px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
  transition: border-color 0.15s, background-color 0.15s;
}
.calc-option:hover { border-color: var(--green-800); }
.calc-option input {
  position: absolute;
  left: 18px;
  top: 19px;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--green-900);
}
.calc-option label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  min-height: 24px;
  padding-left: 34px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
}
/* de hele kaart is klikbaar via het label */
.calc-option label::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-md);
}
.calc-option-name { overflow-wrap: anywhere; }
.calc-option-price {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--green-950);
  font-size: 0.8125rem;
  white-space: nowrap;
}

/* gekozen kaart + zichtbare focus */
.calc-option:has(input:checked) {
  border-color: var(--green-900);
  background: var(--cream);
  background: color-mix(in srgb, var(--lime) 16%, var(--white));
}
.calc-option:has(input:focus-visible) {
  outline: 3px solid var(--green-900);
  outline-offset: 3px;
}
@supports selector(:has(*)) {
  .calc-option input:focus-visible { outline: none; }
}

/* omschrijving uit de database (kan <br> en <ul> bevatten) */
.calc-desc {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.calc-desc p + p,
.calc-desc ul,
.calc-desc ol { margin-top: 10px; }
.calc-desc ul,
.calc-desc ol { display: grid; gap: 6px; }
.calc-desc li {
  position: relative;
  padding-left: 18px;
}
.calc-desc li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--green-900);
}
.calc-desc a {
  position: relative;
  z-index: 1;
  color: var(--green-900);
}

/* Extra pagina's (schuifbalk) ---------------------------------------------- */
.calc-range { margin-top: 22px; }
.calc-range-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.calc-range-top label { font-weight: 600; }
.calc-range-value {
  min-width: 2ch;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  color: var(--green-900);
  text-align: right;
}
.calc-range input[type="range"] {
  display: block;
  width: 100%;
  height: 32px;
  margin: 10px 0 0;
  accent-color: var(--green-900);
  cursor: pointer;
}
.calc-range input[type="range"]:focus-visible {
  outline: 3px solid var(--green-900);
  outline-offset: 2px;
  border-radius: 999px;
}
.calc-range-scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.875rem;
}
.calc-range-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Contactgegevens en verzenden --------------------------------------------- */
.calc-contact { margin-top: 22px; }
.calc-req { color: var(--green-900); }
.calc-contact .alert:focus { outline: none; }
.calc-actions {
  display: grid;
  gap: 10px;
}
.calc-submit { width: 100%; }
.calc-submit svg {
  flex: none;
  width: 20px;
  height: 20px;
}
.calc-submit[disabled] {
  opacity: 0.65;
  cursor: progress;
}
.calc-actions .form-note { text-align: center; }
.calc-points {
  margin-top: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--muted);
}
.calc-points strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
}

/* Samenvatting -------------------------------------------------------------- */
.calc-summary { min-width: 0; }
.calc-summary h2 { font-size: 1.5rem; }
.calc-summary-badge {
  margin-bottom: 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.3;
}
.card--green > .calc-summary-badge {
  color: var(--lime);
  opacity: 1;
}
.calc-summary-list {
  margin-top: 18px;
  font-size: 1rem;
  overflow-wrap: anywhere;
}
.calc-totals {
  display: grid;
  gap: 16px;
  margin: 22px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line-light);
}
.calc-totals dt {
  font-size: 0.875rem;
  opacity: 0.8;
}
.calc-totals dd {
  margin: 2px 0 0;
  font-family: var(--font-display);
  line-height: 1.1;
  color: var(--lime);
}
.calc-total { font-size: 2.25rem; }
.calc-monthly { font-size: 1.5rem; }
.calc-summary-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line-light);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* Bredere schermen ---------------------------------------------------------- */
@media (min-width: 640px) {
  .calc-options--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 860px) {
  .calc-options--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .calc {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 28px;
  }
  .calc-summary {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow-y: auto;
  }
}
/* drie kaarten naast de samenvatting worden te smal: pas vanaf een ruim scherm */
@media (min-width: 1000px) and (max-width: 1179px) {
  .calc-options--3 { grid-template-columns: 1fr; }
}
