/*
 * Aanmeldpagina's: inloggen, registreren, wachtwoord vergeten en wachtwoord instellen.
 * Gesplitste kaart: links het formulier, rechts een foto met een matglazen tekstkader,
 * op een lichtgroene achtergrond. Kleuren en lettertype volgen de rest van de site (Inter, groen #c1e4c4).
 * Deze pagina's laden alleen dit bestand (niet de Webflow-CSS) en js/forms.js (+ js/auth.js).
 */

:root {
  --auth-black: #050505;
  --auth-text: #1f2328;
  --auth-muted: #6b7280;
  --auth-green: #c1e4c4;
  --auth-green-soft: #e6f4e4;
  --auth-green-text: #23793a;
  --auth-input: #f4f5f7;
  --auth-bg: #e3f2e1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body.auth-body {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 48px 24px;
  overflow-x: hidden;
  background-color: var(--auth-bg);
  color: var(--auth-text);
  font-family: Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* zwevende vlakken op de achtergrond */
.auth-deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-deco span {
  position: absolute;
  display: block;
  border-radius: 36px;
  background-color: rgba(255, 255, 255, .45);
  transform: rotate(-16deg);
}

.auth-deco span:nth-child(1) { width: 320px; height: 300px; top: 6%; left: -70px; background-color: rgba(255, 255, 255, .35); }
.auth-deco span:nth-child(2) { width: 70px; height: 60px; top: -14px; left: 48%; border-radius: 14px; background-color: rgba(255, 255, 255, .9); }
.auth-deco span:nth-child(3) { width: 26px; height: 26px; top: 24%; right: 7%; border-radius: 7px; background-color: #fff; }
.auth-deco span:nth-child(4) { width: 34px; height: 32px; top: 52%; right: 6%; border-radius: 8px; background-color: rgba(255, 255, 255, .6); }
.auth-deco span:nth-child(5) { width: 340px; height: 320px; bottom: -110px; right: 8%; transform: rotate(-24deg); background-color: rgba(255, 255, 255, .3); }
.auth-deco span:nth-child(6) { width: 30px; height: 28px; bottom: 26%; left: 6%; border-radius: 7px; background-color: #fff; }
.auth-deco span:nth-child(7) { width: 46px; height: 46px; bottom: 2%; left: 30%; border-radius: 10px; background-color: rgba(255, 255, 255, .6); }

/* twee schuine streepjes rechtsonder */
.auth-deco::after {
  content: "";
  position: absolute;
  right: 4%;
  bottom: 6%;
  width: 62px;
  height: 64px;
  background: linear-gradient(115deg, transparent 0 28%, #b5dcb8 28% 44%, transparent 44% 56%, #b5dcb8 56% 72%, transparent 72%);
}

/* ------------------------------------------------------------ kaart */
.auth-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  max-width: 960px;
  min-height: 640px;
  overflow: hidden;
  border-radius: 32px;
  background-color: #fff;
  box-shadow: 0 40px 80px -40px rgba(31, 90, 44, .35);
}

.auth-form-side {
  display: flex;
  flex-direction: column;
  padding: 34px 48px 26px;
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-logo img {
  display: block;
  width: auto;
  height: 20px;
}

.auth-back {
  color: var(--auth-muted);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.auth-back:hover {
  color: var(--auth-black);
}

.auth-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 340px;
  margin: 36px auto;
}

.auth-title {
  margin: 0 0 10px;
  color: var(--auth-black);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
  text-align: center;
}

.auth-sub {
  margin: 0 0 30px;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

/* ------------------------------------------------------------ formulier */
.auth-form,
.auth-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-step[hidden] {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background-color: var(--auth-input);
  color: var(--auth-black);
  font: 400 14px/1.2 Inter, Arial, sans-serif;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}

textarea.auth-input {
  height: auto;
  min-height: 84px;
  padding: 12px 16px;
  line-height: 1.5;
  resize: vertical;
}

.auth-input::placeholder {
  color: #8a8f98;
}

.auth-input:focus {
  outline: none;
  border-color: var(--auth-black);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(5, 5, 5, .1);
}

.auth-group-label {
  margin: 6px 0 -4px;
  color: var(--auth-black);
  font-size: 13px;
  font-weight: 500;
}

.auth-link {
  align-self: flex-start;
  margin-top: -4px;
  color: var(--auth-green-text);
  font-size: 13px;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-button {
  width: 100%;
  height: 48px;
  margin-top: 16px;
  border: 0;
  border-radius: 10px;
  background-color: var(--auth-black);
  color: #fff;
  font: 500 15px Inter, Arial, sans-serif;
  cursor: pointer;
  transition: background-color .2s, transform .1s;
  -webkit-appearance: none;
  appearance: none;
}

.auth-button:hover {
  background-color: #262a2f;
}

.auth-button:active {
  transform: translateY(1px);
}

.auth-button:disabled {
  opacity: .6;
  cursor: wait;
}

.auth-button-secondary {
  align-self: center;
  padding: 4px 8px;
  border: 0;
  background: none;
  color: var(--auth-muted);
  font: 400 13px Inter, Arial, sans-serif;
  text-decoration: underline;
  cursor: pointer;
}

.auth-button-secondary:hover {
  color: var(--auth-black);
}

/* keuzes (provincies, diensten) als aanklikbare tegels */
.auth-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-choice {
  position: relative;
  display: block;
}

.auth-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-choice span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 10px;
  background-color: var(--auth-input);
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
  transition: background-color .15s, border-color .15s;
}

.auth-choice span::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid #b8bec6;
  border-radius: 5px;
  background: #fff center / 11px no-repeat;
}

.auth-choice input:checked + span {
  border-color: var(--auth-green-text);
  background-color: var(--auth-green-soft);
}

.auth-choice input:checked + span::before {
  border-color: var(--auth-green-text);
  background-color: var(--auth-green-text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.auth-choice input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(193, 228, 196, .9);
}

.auth-group-error {
  margin: -4px 0 0;
  color: #b42318;
  font-size: 13px;
}

.auth-hint {
  margin: 2px 0 0;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.5;
  cursor: pointer;
}

.auth-check input {
  flex: none;
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--auth-black);
}

.auth-check a,
.auth-alt a,
.auth-footer a {
  color: var(--auth-green-text);
}

/* stappen bij het registreren */
.auth-progress {
  display: flex;
  gap: 6px;
}

.auth-progress span {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background-color: #e5e7eb;
  transition: background-color .25s;
}

.auth-progress span.is-active {
  background-color: var(--auth-green-text);
}

.auth-step-label {
  margin: 10px 0 6px;
  color: var(--auth-muted);
  font-size: 12px;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}

/* meldingen (worden getoond door js/forms.js) */
.w-form-done,
.w-form-fail {
  display: none;
}

.auth-message {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.auth-message:focus {
  outline: none; /* de melding krijgt focus voor schermlezers; geen zwarte rand tonen */
}

.auth-message.w-form-done {
  background-color: var(--auth-green-soft);
  color: #1b5a2b;
}

.auth-message.w-form-fail {
  background-color: #fdecec;
  color: #8a1c1c;
}

/* ------------------------------------------------------------ bedankscherm met groen vinkje
 * Wordt getoond na een geslaagde verzending (js/forms.js zet .is-done op .auth-content).
 * De eindtoestand staat in de gewone stijlen; de animaties vullen alleen de weg ernaartoe in
 * (fill-mode both), zodat alles ook klopt zonder animatie (prefers-reduced-motion).
 * Interactie (meekantelen, klik = opnieuw) zit in js/vinkje.js.
 */
.auth-content.is-done > .auth-title,
.auth-content.is-done > .auth-sub,
.auth-content.is-done > .auth-alt {
  display: none;
}

.auth-message.auth-success {
  margin-top: 0;
  padding: 0;
  background: none;
  color: var(--auth-text);
  text-align: center;
}

.auth-badge {
  --rx: 0deg;
  --ry: 0deg;
  --s: 1;
  position: relative;
  display: block;
  width: 128px;
  height: 128px;
  margin: 0 auto 22px;
  cursor: pointer;
  transform: perspective(420px) rotateX(var(--rx)) rotateY(var(--ry)) scale(var(--s));
  transition: transform .3s cubic-bezier(.2, .8, .3, 1);
  -webkit-tap-highlight-color: transparent;
}

.auth-badge:hover {
  --s: 1.05;
}

.auth-badge:active {
  --s: .96;
}

/* zachte groene halo achter het vinkje */
.auth-badge::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--auth-green-soft) 55%, rgba(230, 244, 228, 0) 72%);
}

.auth-badge-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  overflow: visible;
  filter: drop-shadow(0 10px 16px rgba(35, 121, 58, .28));
}

.auth-badge-circle {
  fill: var(--auth-green-text);
  transform-box: fill-box;
  transform-origin: center;
}

.auth-badge-check {
  fill: none;
  stroke: #fff;
  stroke-width: 4.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 2;
  stroke-dashoffset: 0;
}

.auth-badge-ring,
.auth-badge-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  border: 2px solid var(--auth-green-text);
  border-radius: 50%;
  opacity: 0;
}

.auth-badge-sparks i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background-color: var(--auth-green-text);
  opacity: 0;
}

.auth-badge-sparks i:nth-child(even) {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  background-color: #7cc489;
}

/* de animaties (spelen bij het tonen en opnieuw na een klik) */
.auth-badge.is-anim::before { animation: vinkje-halo .6s cubic-bezier(.2, .8, .3, 1.2) both; }
.auth-badge.is-anim .auth-badge-circle { animation: vinkje-pop .55s cubic-bezier(.2, .8, .3, 1.3) .05s both; }
.auth-badge.is-anim .auth-badge-check { animation: vinkje-teken .42s cubic-bezier(.6, 0, .3, 1) .4s both; }
.auth-badge.is-anim .auth-badge-ring { animation: vinkje-golf .9s ease-out .55s both; }
.auth-badge.is-anim .auth-badge-ring + .auth-badge-ring { animation-delay: .72s; }
.auth-badge.is-anim .auth-badge-sparks i { animation: vinkje-vonk .75s cubic-bezier(.15, .7, .3, 1) .6s both; }
.auth-badge-pulse { animation: vinkje-adem 2.8s ease-out 1.8s infinite; }

@keyframes vinkje-halo {
  from { transform: scale(.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes vinkje-pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.14); }
  80% { transform: scale(.95); }
  100% { transform: scale(1); }
}

@keyframes vinkje-teken {
  from { stroke-dashoffset: 1.05; }
  to { stroke-dashoffset: 0; }
}

@keyframes vinkje-golf {
  from { transform: scale(1); opacity: .5; }
  to { transform: scale(1.75); opacity: 0; }
}

@keyframes vinkje-adem {
  0% { transform: scale(1); opacity: .22; }
  70%, 100% { transform: scale(1.5); opacity: 0; }
}

@keyframes vinkje-vonk {
  0% { transform: rotate(calc(var(--i) * 36deg)) translateY(-34px) scale(0); opacity: 1; }
  45% { transform: rotate(calc(var(--i) * 36deg)) translateY(-52px) scale(1); opacity: 1; }
  100% { transform: rotate(calc(var(--i) * 36deg)) translateY(-62px) scale(0); opacity: 0; }
}

/* tekst en stappen schuiven er na het vinkje in */
.auth-success > :not(.auth-badge) {
  animation: vinkje-in .5s cubic-bezier(.2, .8, .3, 1) both;
}

.auth-success > :nth-child(2) { animation-delay: .5s; }
.auth-success > :nth-child(3) { animation-delay: .6s; }
.auth-success > :nth-child(4) { animation-delay: .72s; }
.auth-success > :nth-child(5) { animation-delay: .84s; }

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

.auth-success-title {
  margin: 0 0 8px;
  color: var(--auth-black);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.auth-success-text {
  margin: 0;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* "zo gaat het verder": kleine tijdlijn */
.auth-next {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.auth-next li {
  position: relative;
  display: flex;
  gap: 14px;
  padding-bottom: 16px;
}

.auth-next li:last-child {
  padding-bottom: 0;
}

/* verbindingslijn tussen de bolletjes */
.auth-next li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 2px;
  left: 13px;
  width: 2px;
  border-radius: 2px;
  background-color: #e5e7eb;
}

.auth-next li.is-done::after {
  background-color: var(--auth-green);
}

.auth-next-dot {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid #d6dadf;
  border-radius: 50%;
  background-color: #fff;
  color: var(--auth-muted);
  font-size: 12px;
  font-weight: 600;
}

.auth-next li.is-done .auth-next-dot {
  border-color: var(--auth-green-text);
  background: var(--auth-green-text) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.auth-next li.is-current .auth-next-dot {
  border-color: var(--auth-green-text);
  color: var(--auth-green-text);
  box-shadow: 0 0 0 4px var(--auth-green-soft);
}

.auth-next strong {
  display: block;
  margin-top: 4px;
  color: var(--auth-black);
  font-size: 14px;
  font-weight: 500;
}

.auth-next small {
  display: block;
  margin-top: 2px;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.5;
}

.auth-next b {
  color: var(--auth-text);
  font-weight: 500;
  overflow-wrap: anywhere; /* lange adressen alleen breken als ze echt niet op één regel passen */
}

.auth-button-link {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 26px;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .auth-success *,
  .auth-success *::before,
  .auth-success *::after,
  .auth-success > * {
    animation: none !important;
  }

  .auth-badge {
    transition: none;
  }
}

.auth-alt {
  margin: 34px 0 0;
  color: var(--auth-text);
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

.auth-alt a {
  text-decoration: none;
}

.auth-alt a:hover {
  text-decoration: underline;
}

.auth-footer {
  color: #9aa0a6;
  font-size: 11px;
  text-align: center;
}

.auth-footer a {
  color: inherit;
}

/* onzichtbaar spamveld */
.hp-field {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ------------------------------------------------------------ foto met matglas */
.auth-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 40px 48px;
  background-color: #dfe7df;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover; /* de foto zelf staat als background-image in de HTML van elke pagina */
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .18) 100%);
}

.auth-glass {
  position: relative;
  width: min(340px, 100%);
  padding: 28px 30px 32px;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 16px;
  background-color: rgba(120, 120, 120, .28);
  color: #fff;
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  backdrop-filter: blur(18px) saturate(1.1);
  box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .4);
}

.auth-glass-icon {
  display: block;
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255, 255, 255, .95);
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-30deg);
  animation: auth-draai 2.4s cubic-bezier(.45, .15, .55, .85) infinite;
}

@keyframes auth-draai {
  from { transform: rotate(-30deg); }
  to { transform: rotate(330deg); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-glass-icon {
    animation: none;
  }
}

.auth-glass h2 {
  margin: 18px 0 10px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  text-shadow: 0 1px 14px rgba(0, 0, 0, .25);
}

.auth-glass p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .25);
}

/* ------------------------------------------------------------ kleinere schermen */
@media screen and (max-width: 900px) {
  .auth-card {
    grid-template-columns: 1fr;
    max-width: 520px;
    min-height: 0;
  }

  .auth-visual {
    display: none;
  }
}

@media screen and (max-width: 520px) {
  body.auth-body {
    align-items: flex-start;
    padding: 16px;
  }

  .auth-card {
    border-radius: 24px;
  }

  .auth-form-side {
    padding: 24px 20px 20px;
  }

  .auth-content {
    margin: 28px auto;
  }

  .auth-title {
    font-size: 26px;
  }

  /* iOS zoomt in op velden met tekst kleiner dan 16px */
  .auth-input {
    font-size: 16px;
  }

  .auth-choices {
    grid-template-columns: 1fr;
  }
}
