/* ═══════════════════════════════════════════════════════════════
   Gift cards: /cadeau/, /cadeau/bedankt/, /inwisselen/,
   /inwisselen/bevestig/, /herroepen/. Builds on styles.css and voor-wie.css; only
   the pieces those files do not have live here.
   ═══════════════════════════════════════════════════════════════ */

.cd-pagina {
  /* Premium gold, as on the Premium card on /prijzen/ */
  --a: #8F651F;
  --t: #F7DDA0;
  --cd-goud-rand: #E8CF97;
  --cd-goud-licht: #FFF9EC;
  --cd-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
  padding: 56px 0 96px;
}

.cd-wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px;
}

.cd-smal { max-width: 680px; }

.cd-pagina [hidden] { display: none !important; }

/* ── Intro ─────────────────────────────────────────────────────── */

.cd-intro {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
}

.cd-intro .eyebrow { justify-content: center; }

.cd-intro h1 {
  margin: 12px 0 18px;
  font-size: clamp(2.2rem, 4.4vw, 3.3rem);
  text-wrap: balance;
}

.cd-intro .lead { text-wrap: pretty; }

.cd-punten {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 24px;
  margin-top: 22px;
  color: var(--text-secondary);
  font-size: 0.97rem;
}

.cd-punten li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cd-punten .ic {
  width: 18px;
  height: 18px;
  color: var(--brand);
  stroke-width: 2.4;
  vertical-align: 0;
}

/* ── Blocks (white cards) ──────────────────────────────────────── */

.cd-blok {
  padding: 32px;
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow-md), inset 0 0 0 1px var(--border-light);
}

.cd-blok + .cd-blok { margin-top: 20px; }

.cd-blok h2,
.cd-blok legend {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
}

.cd-blok legend {
  /* Floated so the legend sits inside the card instead of on its edge */
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: 6px;
}

.cd-blok legend + * { clear: both; }

.cd-blok-uitleg {
  margin-bottom: 20px;
  color: var(--text-secondary);
  font-size: 0.97rem;
}

fieldset.cd-blok { border: 0; min-width: 0; }

/* ── Order form: one column, as wide as the intro ──────────────── */

.cd-bestel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}

.cd-bestel .cd-blok + .cd-blok { margin-top: 0; }

/* Duration options as large radio cards */
.cd-duren {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
}

.cd-duur {
  position: relative;
  display: block;
  cursor: pointer;
}

/* The native radio stays for keyboard and screen readers, but is hidden */
.cd-duur-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.cd-duur-kaart {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px 20px 18px;
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: inset 0 0 0 1.5px #DED7CC;
  transition: box-shadow 0.2s, background-color 0.2s;
}

.cd-duur:hover .cd-duur-kaart { box-shadow: inset 0 0 0 1.5px var(--brand); }

.cd-duur-input:checked + .cd-duur-kaart {
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 2px var(--brand);
}

.cd-duur-input:focus-visible + .cd-duur-kaart {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

.cd-duur-naam {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

.cd-duur-prijs {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: lining-nums;
  color: var(--text-primary);
}

.cd-duur-noot {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* The round tick in the top right corner */
.cd-duur-kaart::after {
  content: '';
  position: absolute;
  top: 18px;
  right: 18px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px #CFC7BA;
  background: var(--card);
}

.cd-duur-input:checked + .cd-duur-kaart::after {
  box-shadow: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat,
    var(--brand);
}

.cd-duur-label {
  /* Sits on the top edge, like the label on the Premium card */
  position: absolute;
  top: -11px;
  left: 16px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #8F651F;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Fields */
.cd-veld + .cd-veld { margin-top: 20px; }

.cd-veld label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--text-primary);
}

.cd-veld label .cd-optioneel {
  font-weight: 400;
  color: var(--text-muted);
}

.cd-veld input,
.cd-veld textarea {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-primary);
  background: #FFFFFF;
  border: 1.5px solid #D1C9BD;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cd-veld textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

.cd-veld input::placeholder,
.cd-veld textarea::placeholder { color: #A39A8F; }

.cd-veld input:focus,
.cd-veld textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}

.cd-veld input[aria-invalid="true"],
.cd-veld textarea[aria-invalid="true"] {
  border-color: var(--warm);
  background: #FFFDFC;
}

.cd-hint {
  margin-top: 7px;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* Mail the card to the recipient: a checkbox that opens two fields.
   The selectors carry .cd-blok/.cd-veld to outrank the field and legend
   styles above, which are meant for text inputs and block headings. */
.cd-blok .cd-vink,
.cd-veld .cd-keuze {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 0.97rem;
  font-weight: 400;
  color: var(--text-primary);
  cursor: pointer;
}

.cd-blok .cd-vink { font-weight: 600; }

.cd-blok .cd-vink input,
.cd-veld .cd-keuze input {
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  accent-color: var(--brand);
  cursor: pointer;
}

.cd-stuur-velden {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #EDE6DB;
}

fieldset.cd-wanneer { border: 0; padding: 0; min-width: 0; }

.cd-blok .cd-wanneer legend {
  float: none;
  margin-bottom: 10px;
  font-family: var(--font-body);
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1.4;
}

.cd-veld .cd-keuze + .cd-keuze { margin-top: 10px; }

.cd-datum { margin-top: 14px; }

.cd-veld .cd-datum input { max-width: 240px; }

.cd-teller {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cd-teller.is-bijna { color: var(--warm); }

.cd-veldfout {
  margin-top: 7px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--warm);
}

.cd-veldfout:empty { display: none; }

.cd-code-invoer {
  font-family: var(--cd-mono) !important;
  font-size: 1.12rem !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cd-code-invoer::placeholder { text-transform: none; letter-spacing: 0.04em; }

/* Total and pay button */
.cd-totaal {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border-light);
}

.cd-totaal-wat { color: var(--text-secondary); }

.cd-totaal-wat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
}

.cd-totaal-prijs {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: lining-nums;
  white-space: nowrap;
}

.cd-knop {
  border: 0;
  min-width: 220px;
}

.cd-knop[disabled] {
  opacity: 0.65;
  cursor: progress;
  transform: none;
}

.cd-knop .ic {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
  vertical-align: 0;
}

.cd-kleine {
  margin-top: 14px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.cd-kleine a,
.cd-tekst a,
.cd-melding a,
.cd-veldfout a {
  color: var(--brand-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Error or notice box; stays out of the way while empty */
.cd-melding {
  margin-bottom: 20px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--tint-terracotta);
  border: 1px solid #EED6C6;
  color: var(--warm-deep);
  font-size: 0.97rem;
  line-height: 1.55;
}

.cd-melding:empty {
  /* Kept in the layout (not display: none) so screen readers announce it */
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

/* ── The card, on the thank-you page ───────────────────────────── */

.cd-bon {
  position: relative;
  padding: 30px 28px 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--cd-goud-licht) 0%, #FFFFFF 60%);
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px var(--cd-goud-rand);
  overflow: hidden;
}

.cd-bon-kop {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 22px;
}

.cd-bon-kop img { width: 30px; height: 30px; }

.cd-bon-soort {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--a);
  text-align: right;
}

.cd-bon-voor {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

.cd-bon-duur {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.cd-bon-tekst {
  margin-top: 20px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--text-primary);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.cd-bon-teken {
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.cd-bon-klaar {
  max-width: 440px;
  margin: 32px auto 0;
  text-align: left;
}

.cd-bon-codevak {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 18px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1.5px dashed var(--cd-goud-rand);
}

.cd-bon-codetekst { flex: 1 1 auto; }

/* QR code: dark on white with its own quiet zone, readable on the gold */
.cd-bon-qr {
  flex: 0 0 auto;
  margin: 0;
  text-align: center;
}

.cd-bon-qr svg {
  display: block;
  width: 92px;
  height: 92px;
  border-radius: 8px;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px var(--cd-goud-rand);
}

.cd-bon-qr path { fill: #2B2621; }

.cd-bon-qr figcaption {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.cd-bon-codekop {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--a);
}

/* One line; when the QR code no longer fits beside it, it moves below */
.cd-bon-codevak .cd-code {
  margin: 8px 0 2px;
  font-size: clamp(1rem, 4vw, 1.15rem);
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow-wrap: normal;
}

.cd-bon-geldig {
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ── Questions and the closing line ────────────────────────────── */

.cd-vragen { margin-top: 72px; }

.cd-vragen .vw-intro h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }

.cd-slot {
  margin-top: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cd-slot a {
  color: var(--brand);
  font-weight: 600;
  border-bottom: 1px solid currentColor;
}

/* ── Thank-you and redeem pages ───────────────────────────────── */

.cd-midden { text-align: center; }

.cd-midden h1 {
  margin: 12px 0 16px;
  font-size: clamp(2rem, 4vw, 2.9rem);
  text-wrap: balance;
}

.cd-midden h1:focus { outline: none; }

/* Headings get focus from script when the page state changes; no ring */
.cd-pagina h1[tabindex="-1"]:focus-visible,
.cd-pagina h2[tabindex="-1"]:focus-visible { outline: none; }

.cd-midden .lead { text-wrap: pretty; }

.cd-tekst {
  color: var(--text-secondary);
  line-height: 1.65;
}

.cd-tekst + .cd-tekst,
.lead + .cd-tekst { margin-top: 12px; }

.cd-tekst b { color: var(--text-primary); font-weight: 600; }

.cd-knoppen {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}

.cd-knoppen.is-links { justify-content: flex-start; margin-top: 18px; }

/* The code, large */
.cd-code {
  display: block;
  margin: 14px 0 6px;
  font-family: var(--cd-mono);
  font-size: clamp(1.2rem, 5.4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1.3;
  color: var(--text-primary);
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
}

.cd-kopieer-status {
  min-height: 1.4em;
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--brand-deep);
  font-weight: 500;
}

/* Numbered steps */
.cd-stappen {
  list-style: none;
  counter-reset: stap;
  display: grid;
  gap: 14px;
  margin-top: 18px;
  text-align: left;
}

.cd-stappen li {
  counter-increment: stap;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  color: var(--text-secondary);
  line-height: 1.55;
}

.cd-stappen li::before {
  content: counter(stap);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 600;
  font-size: 0.95rem;
}

.cd-stappen li > span { padding-top: 5px; }

.cd-stappen b { color: var(--text-primary); font-weight: 600; }

.cd-stappen a {
  color: var(--brand-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cd-adres {
  font-weight: 600;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

/* Waiting: a calm, slowly turning ring */
.cd-wacht {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 20px 0 8px;
}

.cd-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--brand-light);
  border-top-color: var(--brand);
  animation: cd-draai 1.1s linear infinite;
}

@keyframes cd-draai {
  to { transform: rotate(360deg); }
}

/* Small round icon above a result */
.cd-teken {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
}

.cd-teken .ic {
  width: 30px;
  height: 30px;
  stroke-width: 2;
  vertical-align: 0;
}

.cd-teken.is-goud { background: #F8EBCB; color: #8F651F; }
.cd-teken.is-warm { background: var(--tint-terracotta); color: var(--warm); }

.cd-kader {
  margin-top: 28px;
  padding: 26px 28px;
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-md), inset 0 0 0 1px var(--border-light);
  text-align: left;
}

.cd-kader h2 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.cd-kader .cd-kader-tweede { margin-top: 22px; }

/* Redeem form */
.cd-inwissel-form { margin-top: 8px; text-align: left; }

.cd-inwissel-form .cd-knop { margin-top: 26px; }

/* ── Withdrawing (/herroepen/, and the button on /cadeau/) ─────── */

.cd-herroepen {
  margin-top: 40px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.55;
}

.cd-herroepen .btn { margin-top: 14px; }

.cd-kader .cd-herroepen { margin-top: 18px; text-align: left; }

.hr-aankoop { margin-bottom: 20px; }

.hr-gegevens {
  list-style: none;
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.hr-gegevens li:first-child {
  color: var(--text-primary);
  font-weight: 600;
}

.hr-gegevens li:empty { display: none; }

.hr-staat {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--tint-terracotta);
  color: var(--warm-deep);
  font-size: 0.95rem;
  line-height: 1.55;
}

.cd-blok h2 + .cd-melding,
.cd-blok h2 + .cd-veld { margin-top: 18px; }

.hr-hint-invoer { max-width: 220px; }

.hr-verklaring { margin-top: 24px; }

.cd-inwissel-form .hr-verklaring + .cd-knop { margin-top: 14px; }

.hr-model .cd-tekst { margin-top: 6px; }

.hr-modeltekst {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px dashed #C9C4B8;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.6;
}

.hr-modeltekst .hr-model-titel {
  color: var(--text-primary);
  font-weight: 600;
}

.hr-modeltekst ul {
  list-style: none;
  display: grid;
  gap: 4px;
  margin-top: 10px;
}

.hr-modeltekst li::before { content: '– '; }

.cd-midden .hr-geen-mail { margin-top: 20px; text-align: left; }

/* ── Phone width ───────────────────────────────────────────────── */

@media (max-width: 680px) {
  .cd-pagina { padding: 32px 0 64px; }
  .cd-wrap { padding: 0 16px; }
  .cd-intro { margin-bottom: 28px; }
  .cd-punten { flex-direction: column; align-items: center; gap: 8px; }

  .cd-blok { padding: 24px 18px; border-radius: var(--radius-lg); }
  .cd-duren { gap: 16px 10px; }
  .cd-duur-kaart { padding: 16px 14px 14px; border-radius: var(--radius-md); }
  .cd-duur-kaart::after { top: 14px; right: 12px; width: 20px; height: 20px; }
  .cd-duur-naam { font-size: 1.1rem; padding-right: 22px; }
  .cd-duur-prijs { font-size: 1.45rem; }
  .cd-duur-noot { font-size: 0.8rem; }
  .cd-duur-label { left: 10px; font-size: 0.62rem; padding: 2px 8px; letter-spacing: 0.04em; }

  .cd-totaal-prijs { font-size: 1.8rem; }
  .cd-knop { width: 100%; min-width: 0; }
  .cd-knoppen .btn { width: 100%; }

  .cd-bon { padding: 24px 20px 20px; }
  .cd-kader { padding: 22px 18px; }
  .cd-vragen { margin-top: 52px; }
  .cd-vragen .vw-faq summary { font-size: 1.08rem; padding-right: 44px; }
  .cd-vragen .vw-faq details > p { padding-right: 0; }
}

/* ── Less motion ───────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .cd-ring {
    animation: none;
    border-top-color: var(--brand-light);
    background: radial-gradient(circle, var(--brand) 0 5px, transparent 6px);
  }

  .cd-duur-kaart,
  .cd-veld input,
  .cd-veld textarea { transition: none; }
}
