/*
 * Live forms. landing.css owns the shell; this file adds the states a real
 * form needs: chosen cards, a working wizard, and submission feedback.
 */

.form-req {
  color: var(--primary);
  font-weight: 700;
}

.form-error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #b42318;
  font-size: 12.5px;
}

.form-error svg {
  width: 14px;
  height: 14px;
}

.form-field--capped {
  max-width: 100%;
}

/*
 * Een keuzegroep is een fieldset, en die komt met een eigen rand en padding uit
 * de browser. Die rand liep als een kader om de kaarten heen met de legend er
 * doorheen geprikt.
 */
.form-field--choice {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.form-field--choice > legend {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 0;
}

.form-field--choice > .form-hint {
  margin: -4px 0 10px;
}

.form-body + .form-body {
  border-top: 1px solid var(--border-soft);
}

.form-shell.is-wizard .form-body + .form-body {
  border-top: 0;
}

.form-section__head {
  margin-bottom: 4px;
}

.form-section__kicker {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-section__title {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.form-section__lead {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.55;
}

.form-progress {
  list-style: none;
  margin: 0;
}

/* Zonder JavaScript is de balk een leugen: alle velden staan dan gewoon onder elkaar. */
.form-shell--steps:not(.is-wizard) .form-progress {
  display: none;
}

.form-shell--steps:not(.is-wizard) .form-section__kicker {
  display: none;
}

.form-progress__label {
  min-width: 0;
}

/* ---------------------------------------------------------------
 * Choice cards
 * --------------------------------------------------------------- */

.form-choice {
  display: grid;
  gap: 10px;
}

.form-choice--2 {
  grid-template-columns: 1fr 1fr;
}

/* Drie keuzes horen op één rij: in twee kolommen blijft de derde kaart als
   losse helft achter en lijkt die belangrijker dan de andere twee. */
.form-choice--3 {
  grid-template-columns: repeat(auto-fit, minmax(228px, 1fr));
}

.form-choice__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.form-choice__card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 100%;
  margin: 0;
  padding: 16px 16px 16px 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form-choice__card:hover {
  border-color: var(--border-strong);
}

.form-choice__card:has(.form-choice__input:focus-visible) {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.form-choice__card:has(.form-choice__input:checked) {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: 0 0 0 3.5px var(--primary-ring);
}

.form-choice__mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: transparent;
}

.form-choice__mark svg {
  width: 12px;
  height: 12px;
}

.form-choice__card:has(.form-choice__input:checked) .form-choice__mark {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.form-choice__copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.form-choice__title {
  font-size: 15px;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.01em;
}

.form-choice__sub {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
}

/* ---------------------------------------------------------------
 * Wizard: without JS the whole form stays visible
 * --------------------------------------------------------------- */

.form-nav__back,
.form-nav__next {
  display: none;
}

.form-shell.is-wizard .form-progress {
  display: flex;
}

.form-shell.is-wizard [data-panel]:not(.is-current) {
  display: none;
}

.form-shell.is-wizard .form-nav__back,
.form-shell.is-wizard .form-nav__next {
  display: inline-flex;
}

.form-shell.is-wizard.is-first .form-nav__back {
  visibility: hidden;
  pointer-events: none;
}

.form-shell.is-wizard:not(.is-last) .form-foot__submit {
  display: none;
}

.form-shell.is-wizard.is-last .form-nav__next {
  display: none;
}

.form-foot__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.form-foot__hint a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.form-foot__hint a:hover {
  text-decoration: underline;
}

.form-foot .btn svg {
  width: 16px;
  height: 16px;
}

/* ---------------------------------------------------------------
 * Verzendstatus
 * --------------------------------------------------------------- */

.btn:disabled {
  cursor: default;
}

.btn.is-busy {
  pointer-events: none;
}

/* De pijl maakt plaats voor de spinner, zodat de knop niet van maat verspringt. */
.btn.is-busy svg {
  display: none;
}

.btn.is-busy::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0.85;
  animation: adore-spin 0.6s linear infinite;
}

@keyframes adore-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn.is-busy::after {
    animation-duration: 2.4s;
  }
}

/* ---------------------------------------------------------------
 * Submission feedback
 * --------------------------------------------------------------- */

/*
 * De pagina landt na het verzenden op een anker. Zonder marge schuift dat
 * anker onder de vaste navigatie.
 */
#adore-bevestiging,
#adore-melding,
#adore-form {
  scroll-margin-top: 120px;
}

.form-done {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl, 20px);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.form-done:focus {
  outline: none;
}

.form-done__badge {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.form-done__badge svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.5;
}

.form-done__title {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.form-done__lead {
  max-width: 46ch;
  margin: 12px auto 0;
  color: var(--text-secondary);
  font-size: 16.5px;
  line-height: 1.6;
}

.form-done__ref {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 0;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--text-tertiary);
  font-size: 13px;
}

.form-done__ref code {
  padding: 4px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.form-done__note {
  margin: 10px 0 0;
  color: var(--text-tertiary);
  font-size: 13px;
}

.form-done__steps {
  display: grid;
  gap: 14px;
  margin: 32px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--border-soft);
  list-style: none;
  text-align: left;
}

.form-done__steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 14.5px;
  line-height: 1.55;
}

.form-done__num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
}

.form-done__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.form-done__foot {
  margin: 20px 0 0;
  color: var(--text-tertiary);
  font-size: 13px;
}

.form-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px 20px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg, 12px);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 14.5px;
  line-height: 1.55;
}

.form-alert svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.form-alert strong {
  display: block;
}

.form-alert code {
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-soft);
  font-size: 13px;
}

.form-alert--ok {
  border-left: 3px solid var(--accent);
}

.form-alert--ok svg {
  color: var(--accent);
}

.form-alert--err {
  border-left: 3px solid #c0392b;
}

.form-alert--err svg {
  color: #c0392b;
}

.form-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 720px) {
  .form-choice--2,
  .form-choice--3 {
    grid-template-columns: 1fr;
  }

  .form-foot {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .form-foot__actions,
  .form-foot .btn {
    width: 100%;
    justify-content: center;
  }

  .form-done__actions .btn {
    width: 100%;
    justify-content: center;
  }
}
