/* ==========================================================================
   wizard.css — de offerte-assistent in drie stappen.

   Aanvulling op site.css; alle kleuren en maten komen uit de tokens daar.
   Dit bestand wordt alleen op /offerte geladen.

   Belangrijkste regel van het hele bestand: de panelen worden UITSLUITEND
   verborgen binnen `.wizard.is-wizard`. Die klasse zet het JavaScript zelf,
   na het laden. Zonder JavaScript blijven de drie fieldsets dus gewoon
   onder elkaar staan en werkt het formulier in één keer.
   ========================================================================== */

/* ==========================================================================
   1. STAPPENBALK
   ========================================================================== */
.wizard { display: block; }

.wizard__steps {
  display: flex; flex-wrap: wrap; gap: .5rem;
  list-style: none; margin: 0 0 1rem; padding: 0;
  counter-reset: stap;
}
.wizard__steps li {
  display: flex; align-items: center; gap: .55rem;
  flex: 1 1 auto; min-width: 0;
  font-size: .9rem; font-weight: 700; color: #8299A0;
  transition: color .3s;
}
.wizard__steps li span {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--ovw-rand); color: #6E8C8E;
  font-family: var(--ovw-titel-font); font-size: .9rem;
  transition: background-color .3s, color .3s, transform .3s var(--ovw-soepel);
}
.wizard__steps li.is-active { color: var(--ovw-titel); }
.wizard__steps li.is-active span {
  background: var(--ovw-primair); color: #042b30;
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(25, 193, 182, .35);
}
.wizard__steps li.is-done { color: var(--ovw-accent-alt); }
.wizard__steps li.is-done span { background: var(--ovw-accent-alt); color: #fff; }
/* Het vinkje vervangt het cijfer zodra de stap achter de rug is. */
.wizard__steps li.is-done span { font-size: 0; }
.wizard__steps li.is-done span::after { content: '\2713'; font-size: .95rem; }

.wizard__progress {
  height: 5px; border-radius: 999px; overflow: hidden;
  background: var(--ovw-rand); margin-bottom: 2rem;
}
.wizard__progress-bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--ovw-primair), var(--ovw-accent-alt));
  border-radius: 999px;
  transition: width .45s var(--ovw-soepel);
}

@media (max-width: 560px) {
  /* Op een smal scherm past de tekst niet; de cijfers volstaan om te tonen
     hoe ver je bent. */
  .wizard__steps li { flex: 0 0 auto; font-size: 0; gap: 0; }
  .wizard__steps li span { font-size: .9rem; }
  .wizard__steps li.is-done span::after { font-size: .95rem; }
  .wizard__steps { justify-content: center; gap: .75rem; margin-bottom: 1.25rem; }
}

/* ==========================================================================
   2. PANELEN
   ========================================================================== */
.wizard__panel {
  border: 0; padding: 0; margin: 0 0 1.5rem; min-width: 0;
}
.wizard__panel legend {
  font-family: var(--ovw-titel-font); font-weight: 700;
  font-size: clamp(1.25rem, 1.1rem + .7vw, 1.6rem);
  color: var(--ovw-titel); padding: 0; margin-bottom: .5rem;
}

/* Zonder JavaScript staat alles onder elkaar; met JavaScript toont het
   script één paneel tegelijk. Vandaar de afhankelijkheid van .is-wizard. */
.wizard.is-wizard .wizard__panel { display: none; }
.wizard.is-wizard .wizard__panel.is-active { display: block; animation: wizard-in .4s var(--ovw-soepel); }
.wizard.is-wizard .wizard__panel[hidden] { display: none; }

/* Zonder JavaScript krijgt elk paneel een eigen kader, anders lopen de drie
   stappen visueel in elkaar over. */
.wizard:not(.is-wizard) .wizard__panel {
  border: 1px solid var(--ovw-rand);
  border-radius: var(--ovw-radius);
  padding: 1.5rem;
}
.wizard:not(.is-wizard) .wizard__nav { display: none; }
.wizard:not(.is-wizard) .wizard__panel:last-of-type .wizard__nav { display: flex; }
.wizard:not(.is-wizard) [data-volgende],
.wizard:not(.is-wizard) [data-vorige] { display: none; }
/* De stappenbalk zegt niets zinnigs als alles tegelijk zichtbaar is. */
.wizard:not(.is-wizard) .wizard__steps,
.wizard:not(.is-wizard) .wizard__progress { display: none; }

@keyframes wizard-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.wizard__rassure {
  background: var(--ovw-licht);
  border-left: 3px solid var(--ovw-primair);
  border-radius: 0 var(--ovw-radius-sm) var(--ovw-radius-sm) 0;
  padding: .85rem 1.1rem; margin: 0 0 1.75rem;
  font-size: .93rem;
}
.wizard__rassure strong { color: var(--ovw-accent); }

.wizard__req { color: #B33; font-weight: 700; }
.wizard__opt { font-weight: 400; color: #8299A0; font-size: .85em; }

.wizard__rij {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem; margin-bottom: 1.2rem;
}
.wizard__rij .ovw-veld--kort { max-width: 150px; }
@media (max-width: 560px) {
  .wizard__rij .ovw-veld--kort { max-width: none; }
}

.wizard__nav {
  display: flex; flex-wrap: wrap; gap: .8rem;
  justify-content: space-between; align-items: center;
  margin-top: 2rem; padding-top: 1.5rem;
  border-top: 1px solid var(--ovw-rand);
}
.wizard__slot { margin-top: 1.25rem; }

.ovw-btn.is-bezig { opacity: .7; cursor: progress; }
.ovw-btn[disabled] { pointer-events: none; }

/* ==========================================================================
   3. KEUZEKNOPPEN

   Het blijven echte radio-inputs. Ze worden visueel verborgen maar niet
   uit de tabvolgorde gehaald: zo blijft pijltjesnavigatie binnen de groep
   werken, en tekent de focusring rond het label.
   ========================================================================== */
.keuzegroep { border: 0; padding: 0; margin: 0 0 1.6rem; min-width: 0; }
.keuzegroep legend {
  font-weight: 800; font-size: .9rem; color: var(--ovw-titel);
  padding: 0; margin-bottom: .55rem; font-family: var(--ovw-font);
}
.keuzegroep--inline { margin-bottom: 0; }

.keuzeraster { display: grid; gap: .6rem; }
.keuzeraster--2 { grid-template-columns: repeat(2, 1fr); }
.keuzeraster--3 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.keuzeraster--4 { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

.keuze {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  padding: 1rem .75rem; text-align: center;
  border: 2px solid var(--ovw-rand); border-radius: var(--ovw-radius-sm);
  background: #fff; cursor: pointer;
  font-size: .9rem; font-weight: 600; color: var(--ovw-titel);
  transition: border-color .25s, background-color .25s, transform .25s var(--ovw-soepel), box-shadow .25s;
}
.keuze--compact { flex-direction: row; justify-content: center; padding: .7rem .8rem; font-size: .87rem; }

.keuze input {
  position: absolute; opacity: 0;
  width: 100%; height: 100%; top: 0; left: 0; margin: 0;
  cursor: pointer;
}
.keuze__ico { font-size: 1.35rem; color: var(--ovw-accent-alt); line-height: 1; }
.keuze__tekst { line-height: 1.25; }

.keuze:hover { border-color: var(--ovw-primair); transform: translateY(-2px); }
.keuze.is-gekozen {
  border-color: var(--ovw-primair);
  background: var(--ovw-licht);
  box-shadow: 0 6px 18px rgba(25, 193, 182, .18);
}
.keuze.is-gekozen .keuze__ico { color: var(--ovw-primair-donker); }

/* De focusring hoort rond het hele label, niet rond de onzichtbare input. */
.keuze:focus-within { outline: 3px solid var(--ovw-primair); outline-offset: 2px; }

/* ==========================================================================
   4. FOTO'S
   ========================================================================== */
.dropzone {
  position: relative;
  border: 2px dashed var(--ovw-rand); border-radius: var(--ovw-radius);
  background: var(--ovw-licht);
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: border-color .25s, background-color .25s;
}
.dropzone.is-drag { border-color: var(--ovw-primair); background: #E8F8F6; }
.dropzone.has-files { padding-bottom: 1rem; }

/* De file-input wordt visueel verborgen maar blijft bereikbaar met het
   toetsenbord — anders is er geen enkele manier om zonder muis foto's toe
   te voegen. */
.dropzone input[type="file"] {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.dropzone input[type="file"]:focus-visible + .dropzone__hint {
  outline: 3px solid var(--ovw-primair); outline-offset: 4px; border-radius: var(--ovw-radius-sm);
}

.dropzone__hint { display: grid; gap: .3rem; justify-items: center; font-size: .92rem; color: #6E8C8E; }
.dropzone__hint strong { color: var(--ovw-titel); }
.dropzone__ico { font-size: 1.8rem; color: var(--ovw-accent-alt); }
.dropzone__hint small { font-size: .8rem; }

.dropzone__browse {
  background: none; border: 0; padding: 0;
  color: var(--ovw-accent-alt); font: inherit; font-weight: 700;
  text-decoration: underline; cursor: pointer;
}
.dropzone__browse:hover { color: var(--ovw-primair-donker); }

.dropzone__fout {
  margin: .9rem 0 0; padding: .55rem .9rem;
  background: #FDECEC; border-left: 3px solid #D64545; border-radius: var(--ovw-radius-sm);
  color: #7A2020; font-size: .86rem; font-weight: 600; text-align: left;
}

.dropzone__previews {
  display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center;
  list-style: none; margin: 1.1rem 0 0; padding: 0;
}
.dropzone__previews:empty { margin: 0; }

.preview {
  position: relative; width: 104px;
  border-radius: var(--ovw-radius-sm); overflow: hidden;
  background: #fff; border: 1px solid var(--ovw-rand);
  box-shadow: var(--ovw-schaduw);
}
.preview img { display: block; width: 100%; height: 78px; object-fit: cover; }
.preview__geen {
  display: grid; place-items: center; height: 78px;
  background: var(--ovw-rand-zacht); color: #6E8C8E;
  font-size: .75rem; font-weight: 800; letter-spacing: .06em;
}
.preview__naam {
  display: block; padding: .3rem .4rem;
  font-size: .68rem; color: #6E8C8E;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.preview__weg {
  position: absolute; top: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%; border: 0;
  background: rgba(10, 57, 67, .85); color: #fff;
  font-size: 1rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: background-color .2s, transform .2s;
}
.preview__weg:hover { background: #D64545; transform: scale(1.1); }

/* ==========================================================================
   5. FOUTEN
   ========================================================================== */
.ovw-veld.has-error input,
.ovw-veld.has-error select,
.ovw-veld.has-error textarea {
  border-color: #D64545;
  box-shadow: 0 0 0 3px rgba(214, 69, 69, .14);
}

/* ==========================================================================
   6. BEPERKTE BEWEGING
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .wizard.is-wizard .wizard__panel.is-active { animation: none; }
  .wizard__progress-bar,
  .wizard__steps li span,
  .keuze,
  .preview__weg { transition: none; }
}
