/* CoolMail aanmelden en wachtwoord herstellen (#29423), bovenop inbox.css (loginpagina, ontwerp A).
   Alleen layout: alles gebeurt in de browser. */

/* ---------- Testbalk / infobalk ---------- */
.portaal-page { height: auto; align-content: start; padding-top: 0; }
.testbalk, .infobalk {
  justify-self: stretch;
  margin: 0 -16px 22px;
  padding: 9px 16px;
  font-size: .9rem;
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  background: var(--dad);
  border-bottom: var(--line);
}
.infobalk { font-weight: 500; background: var(--white); }
.portaal-wrap { width: min(640px, 100%); }
.portaal h1 { max-width: none; }
.portaal .env-hand { margin-top: 0; }

/* ---------- Stappen als postzegels ---------- */
.zegels {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.zegels[hidden] { display: none; }
.zegel {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-height: 78px;
  padding: 9px 4px;
  text-align: center;
  color: var(--ink);
  background: var(--paper);
  outline: 2px solid var(--ink);
  outline-offset: -7px;
  -webkit-mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle 3px, #0000 96%, #000) -5px -5px / 10px 10px;
          mask: linear-gradient(#000 0 0) content-box, radial-gradient(circle 3px, #0000 96%, #000) -5px -5px / 10px 10px;
  opacity: .55;
  transition: opacity .15s, transform .15s;
}
.zegel-nr { font-size: 1.35rem; font-weight: 800; line-height: 1; }
.zegel-naam { max-width: 100%; font-size: .78rem; font-weight: 800; line-height: 1.15; -webkit-hyphens: manual; hyphens: manual; }
.zegel.is-nu { background: var(--c); opacity: 1; transform: rotate(-3deg); }
.zegel.is-klaar { background: var(--white); opacity: .9; }
.zegel.is-klaar .zegel-nr::after { content: " ✓"; font-size: 1rem; }

/* ---------- Stap ---------- */
.stap { position: relative; display: grid; gap: 14px; }
.stap[hidden] { display: none; }
.stap:focus { outline: none; }
.stap-titel { font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.stap-tekst { font-weight: 500; }
.field label, .field > span:first-child { font-weight: 700; font-size: .88rem; }
.field select {
  padding: 11px 36px 11px 12px;
  font: 600 1rem var(--font);
  color: var(--ink);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2316133d' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 12px center / 12px 8px;
  border: var(--line);
  border-radius: 12px;
  -webkit-appearance: none;
          appearance: none;
}
.field select:focus { outline: 3px solid var(--c); outline-offset: 1px; background-color: var(--white); }
.optioneel { font-weight: 500; color: rgba(22, 19, 61, .7); }
.veld-uitleg { font-size: .82rem; font-weight: 500; color: rgba(22, 19, 61, .78); }
.veld-uitleg.is-goed::before { content: "✓ "; font-weight: 800; color: #0d8a50; }
.veld-fout { font-size: .85rem; font-weight: 700; color: #c0180b; }
.veld-fout[hidden] { display: none; }
.veld-fout::before { content: "✕ "; }
.field input[aria-invalid="true"] { border-color: #c0180b; background: #fff1ef; }

.adres-rij { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.adres-at { font-size: 1.3rem; font-weight: 800; }
.adres-voorbeeld { font-size: .95rem; font-weight: 500; overflow-wrap: anywhere; }
.adres-voorbeeld b { font-weight: 800; }

.stap-knoppen {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.knop-volgende {
  margin-left: auto;
  padding: 12px 24px;
  font-size: 1.05rem; font-weight: 800;
  color: var(--white);
  background: var(--red);
  border: var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-hard);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
.knop-volgende:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--ink); }
.knop-volgende:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.knop-volgende:disabled { cursor: not-allowed; opacity: .4; box-shadow: var(--shadow-small); }
.knop-terug {
  display: inline-block;
  padding: 10px 18px;
  font-size: .95rem; font-weight: 800;
  color: var(--ink);
  text-decoration: none;
  background: var(--white);
  border: var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-small);
}
.knop-terug:hover { background: var(--paper); }
a.knop-link { display: inline-block; text-decoration: none; }
/* Honeypot: buiten beeld, niet voor mensen en niet voor schermlezers. */
.hp-veld { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.knop-volgende.is-bezig { cursor: progress; opacity: .7; }
.knop-klein {
  padding: 7px 14px;
  font-size: .88rem; font-weight: 800;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink);
}
.knop-klein:hover { background: var(--c); }

.vink {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: .92rem;
  font-weight: 600;
  cursor: pointer;
}
.vink input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--cobalt); cursor: pointer; }

/* ---------- Onder 16 ---------- */
.onder16 { display: grid; gap: 14px; padding: 14px; background: #fffaf0; border: 2px dashed rgba(22, 19, 61, .35); border-radius: 14px; }
.onder16[hidden] { display: none; }
.onder16 .notice { margin: 0; }

/* ---------- Herstelcodes ---------- */
.codes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  margin: 0;
  padding: 16px 16px 16px 40px;
  background: var(--paper);
  border: var(--line);
  border-radius: 14px;
  list-style: decimal;
  font-weight: 700;
}
.codes code { font: 800 1.12rem/1.3 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .06em; }
.codes-knoppen { display: flex; flex-wrap: wrap; gap: 10px; }
.codes-melding { min-height: 1.2em; font-size: .88rem; font-weight: 700; color: #0d8a50; }

/* ---------- Klaar ---------- */
.klaar-adres {
  padding: 12px 16px;
  font-size: 1.3rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  background: var(--c);
  border: var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-small);
}
.klaar-lijst { display: grid; gap: 4px; }
.klaar-lijst li::before { content: "✈ "; color: var(--cobalt); }
.stap-klaar .notice { margin: 0; }

/* ---------- Herstel: keuzes ---------- */
.keuzes { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.keuze {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  background: var(--paper);
  border: var(--line);
  border-radius: 14px;
  cursor: pointer;
}
.keuze.is-uit { cursor: not-allowed; opacity: .55; }
.keuze.is-uit input { cursor: not-allowed; }
.keuze:has(input:checked) { background: var(--c); box-shadow: var(--shadow-small); }
.keuze input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--cobalt); cursor: pointer; }
.keuze b { display: block; }
.keuze small { display: block; margin-top: 2px; font-size: .85rem; font-weight: 500; }
.code-veld { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace !important; letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Login: links ---------- */
.pw-vergeten { justify-self: start; margin-top: -6px; font-size: .88rem; font-weight: 700; }

/* =================================================================
   Datepicker
   ================================================================= */
.dp { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.dp input { letter-spacing: .04em; }
.dp-knop {
  display: grid; place-items: center;
  width: 48px;
  background: var(--white);
  border: var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-small);
}
.dp-knop svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.dp-knop:hover, .dp.is-open .dp-knop { background: var(--c); }
.dp-pop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20;
  width: 320px;
  padding: 12px;
  font-weight: 600;
  background: var(--white);
  border: var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-hard);
}
.dp-pop[hidden] { display: none; }
.dp-pop.is-rechts { left: auto; right: 0; }
.dp-pop.is-smal { position: fixed; left: 8px; right: 8px; width: auto; }
.dp-uitleg { margin-bottom: 6px; font-size: .78rem; font-weight: 700; color: rgba(22, 19, 61, .7); text-align: center; }
.dp-kop { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 6px; margin-bottom: 8px; }
.dp-pijl {
  height: 36px;
  font-size: 1.4rem; font-weight: 800; line-height: 1;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 10px;
}
.dp-pijl:disabled { opacity: .3; cursor: not-allowed; }
.dp-titel { display: block; text-align: center; font-weight: 800; font-size: 1rem; }
.dp-titel-knop { padding: 6px 8px; background: none; border: 2px solid transparent; border-radius: 10px; }
.dp-titel-knop:hover { background: var(--paper); border-color: var(--ink); }
.dp-titel-knop::after { content: " ▾"; font-size: .8em; }
.dp-grid { display: grid; gap: 4px; }
.dp-rij { display: grid; gap: 4px; }
.dp-jaar .dp-rij, .dp-maand .dp-rij { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dp-dag .dp-rij { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dp-dagnamen span { padding: 4px 0; font-size: .75rem; font-weight: 800; text-align: center; text-transform: uppercase; color: rgba(22, 19, 61, .6); }
.dp-cel {
  min-height: 40px;
  padding: 0;
  font-size: .95rem; font-weight: 700;
  background: var(--white);
  border: 2px solid transparent;
  border-radius: 10px;
}
.dp-jaar .dp-cel, .dp-maand .dp-cel { min-height: 48px; background: var(--paper); }
.dp-cel:hover:not(:disabled) { border-color: var(--ink); }
.dp-cel:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 1px; }
.dp-cel.is-nu { border-color: rgba(22, 19, 61, .35); border-style: dashed; }
.dp-cel.is-gekozen { color: var(--white); background: var(--cobalt); border-color: var(--ink); }
.dp-cel:disabled { opacity: .28; cursor: not-allowed; }

@media (max-width: 560px) {
  .testbalk, .infobalk { margin: 0 -10px 16px; font-size: .82rem; }
  .zegels { gap: 6px; }
  .zegel { min-height: 64px; padding: 8px 9px; }
  .zegel-nr { font-size: 1.1rem; }
  .zegel-naam { font-size: .66rem; }
  .adres-rij { grid-template-columns: minmax(0, 1fr) auto; }
  .adres-rij select { grid-column: 1 / -1; }
  .codes { grid-template-columns: minmax(0, 1fr); padding-left: 36px; }
  .knop-volgende { flex: 1 1 auto; }
  .dp-cel { min-height: 42px; }
}
@media (max-width: 340px) {
  .zegel-naam { font-size: .58rem; }
}

/* Afdrukken: alleen de herstelcodes */
@media print {
  .testbalk, .infobalk, .hp-veld, .login-logo, .login-links, .zegels, .env-hand, .env-sub, .portaal h1, .stap-titel ~ .stap-tekst,
  .codes-knoppen, .codes-melding, .vink, .stap-knoppen, .stap:not([data-stap="4"]) { display: none !important; }
  .login-page, .envelope { border: 0 !important; box-shadow: none !important; outline: 0 !important; background: #fff !important; padding: 0 !important; }
  .envelope::before { display: none; }
  .codes { border: 1px solid #000; }
}
