/* BESTAND-VERSIE 18 (2026-08-05) - Zomer BBQ 2026 Notenboomstraat */
/* ============================================================
   Kleurenblind-veilig palet (gebaseerd op Okabe-Ito):
   - Diepblauw voor acties en "in orde"
   - Vermiljoen (oranjerood) voor fouten
   - Amber enkel als warm accent (totaal, chips)
   Blauw <-> amber/vermiljoen blijft onderscheidbaar bij alle
   gangbare vormen van kleurenblindheid. Status wordt bovendien
   nooit door kleur alleen gedragen: meldingen dragen een symbool.
   ============================================================ */

:root {
  --ink: #1d2129;             /* blauwzwart, tekst */
  --muted: #5f6672;
  --paper: #f5f6f4;           /* neutraal licht */
  --card: #ffffff;
  --line: #e2e4e0;

  --action: #0072b2;          /* Okabe-Ito blauw: knoppen, focus */
  --action-deep: #075985;
  --action-soft: rgba(0, 114, 178, 0.14);

  --ember: #f2a33c;           /* amber accent, vooral op donker */
  --ember-text: #8a5a00;      /* amber donker genoeg voor op licht */

  --ok: #075985;   --ok-bg: #e5f1f9;    /* "in orde" = blauw */
  --bad: #9a3412;  --bad-bg: #fdeee5;   /* fout = vermiljoen */
  --warn: #7c5200; --warn-bg: #fdf3d8;  /* let op = amber */

  --radius: 20px;
  --shadow: 0 1px 2px rgba(29, 33, 41, 0.05), 0 14px 34px rgba(29, 33, 41, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(1100px 420px at 50% -160px, #e6edf3 0%, rgba(230, 237, 243, 0) 70%),
    var(--paper);
}

.page { max-width: 760px; margin: 0 auto; padding: 26px 16px 40px; }

/* ---------- Hero ---------- */
.hero { margin-bottom: 26px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 12.5px; font-weight: 700; color: var(--action); margin: 0 0 4px;
}
.hero h1 {
  font-family: "Bricolage Grotesque", "Instrument Sans", sans-serif;
  font-size: clamp(38px, 9vw, 58px);
  font-weight: 800; line-height: 1.02; letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.lead { font-size: 17px; color: var(--muted); margin: 0 0 18px; max-width: 560px; }

/* Event-info als chips */
.event-card {
  display: flex; flex-wrap: wrap; gap: 8px;
  background: none; border: none; box-shadow: none; padding: 0;
}
.event-card strong, .event-card span {
  display: inline-flex; align-items: center;
  padding: 9px 15px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--ink);
}
.event-card strong {
  background: var(--ink); border-color: var(--ink); color: var(--ember); font-weight: 700;
}

/* ---------- Kaarten & titels ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 16px;
}
h2 {
  font-family: "Bricolage Grotesque", "Instrument Sans", sans-serif;
  font-size: 21px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 14px;
}
.section-title { margin-bottom: 6px; }
.section-title h2 { margin-bottom: 4px; }
.section-title p { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; }
.card-note { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; }

/* ---------- Velden ---------- */
.grid { display: grid; gap: 14px; }
label { display: flex; flex-direction: column; gap: 7px; font-weight: 600; font-size: 14.5px; }
input, textarea {
  width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 16px; font-family: inherit; background: #fff; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus {
  outline: none; border-color: var(--action);
  box-shadow: 0 0 0 4px var(--action-soft);
}
input.invalid { border-color: var(--bad); border-width: 2px; background: #fffaf7; }
.grid label > input, .grid label > .stepper { margin-top: auto; }
textarea { resize: vertical; }

/* Stepper rond aantal-velden */
.stepper {
  display: flex; align-items: stretch;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.stepper:focus-within { border-color: var(--action); box-shadow: 0 0 0 4px var(--action-soft); }
.stepper:has(input.invalid) { border-color: var(--bad); background: #fffaf7; }
.stepper input {
  border: none; border-radius: 0; text-align: center;
  min-width: 0; flex: 1; padding: 12px 4px; background: transparent;
}
.stepper input:focus { box-shadow: none; }
.step-btn {
  min-width: 46px; width: 46px; padding: 0; border: none; border-radius: 0;
  background: var(--paper); color: var(--action-deep);
  font-size: 20px; font-weight: 700; line-height: 1; cursor: pointer;
  transition: background 0.12s;
}
.step-btn:active { background: var(--line); }

.checkbox { flex-direction: row; align-items: flex-start; gap: 10px; margin: 16px 0; font-size: 15px; font-weight: 500; line-height: 1.45; }
.checkbox input { width: 20px; height: 20px; accent-color: var(--action); flex: none; margin: 1px 0 0; }
.msg-preview {
  font-family: ui-monospace, monospace; font-size: 13px; font-weight: 700;
  background: var(--paper); border: 1px solid var(--line);
  padding: 2px 7px; border-radius: 7px; word-break: break-all;
}

/* ---------- Meldingen: kleur + symbool, nooit kleur alleen ---------- */
.notice {
  padding: 12px 14px; border-radius: 12px; margin-bottom: 14px;
  font-weight: 600; font-size: 14.5px;
}
.notice.compact { margin: 14px 0 0; }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.ok::before { content: "\2713\00a0\00a0"; font-weight: 800; }   /* ✓ */
.notice.bad::before { content: "\2715\00a0\00a0"; font-weight: 800; }  /* ✕ */
.notice.warn::before { content: "!\00a0\00a0"; font-weight: 800; }
.notice.hidden { display: none; }
.hidden { display: none; }
form.hidden { display: none; }

/* ---------- Vleeskeuze ---------- */
.meat-grid { display: grid; gap: 10px; }
.meat-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 10px 10px 14px; background: #fcfcfb;
}
.meat-row span { font-weight: 600; font-size: 15px; }
.meat-row .stepper { flex: none; width: 148px; }
.meat-row .stepper input { font-size: 15px; }
.meat-row .step-btn { min-width: 42px; width: 42px; }

.readonly-grid { display: grid; gap: 10px; }
.readonly-row {
  display: flex; justify-content: space-between; align-items: center;
  border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fcfcfb;
}
.readonly-row span { font-weight: 600; font-size: 15px; }
.readonly-row strong {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 22px; color: var(--action-deep);
}

/* ---------- Betaling / QR ---------- */
.payment-card.hidden { display: none; }
.payment-layout { display: grid; gap: 20px; justify-items: center; }
.qr-box {
  width: 216px; min-height: 216px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 16px; background: #fff; padding: 10px;
}
.payment-details { width: 100%; }
.payment-details p { margin: 9px 0; font-size: 16px; }
.mini-btn {
  min-width: 0; width: auto; padding: 5px 12px; margin-left: 4px;
  font-size: 13px; font-weight: 700;
  background: #fff; color: var(--action-deep);
  border: 1.5px solid var(--line); border-radius: 9px; cursor: pointer;
  vertical-align: middle; transition: background 0.12s, border-color 0.12s;
}
.mini-btn:hover { border-color: var(--action); }
.mini-btn.copied, button.copied {
  background: var(--action-deep) !important; color: #fff !important; border-color: var(--action-deep) !important;
}
.mini-btn.copied::before, button.copied::before { content: "\2713\00a0"; }
.qr-download { display: block; margin: 10px auto 0; }
.same-phone-hint { font-size: 13.5px; color: var(--muted); font-weight: 400; }
.payload-fallback {
  display: none; margin-top: 14px; min-height: 130px;
  font-family: ui-monospace, monospace; font-size: 13px;
}
.payload-fallback.visible { display: block; }

/* ---------- Knoppen ---------- */
button {
  border: 1.5px solid transparent; border-radius: 14px; padding: 13.5px 20px;
  background: var(--action); color: #fff;
  font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  transition: transform 0.08s, filter 0.15s, opacity 0.15s;
}
button:hover:not(:disabled) { filter: brightness(1.1); }
button:active:not(:disabled) { transform: scale(0.985); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button:focus-visible { outline: 3px solid var(--action-soft); outline-offset: 2px; }

/* ---------- Toegangspoort ---------- */
.gate-row { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.gate-row input { text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; text-align: center; }
.gate-row button { padding-top: 0; padding-bottom: 0; min-height: 52px; }
button#unlockBtn { background: linear-gradient(135deg, var(--action), var(--action-deep)); }

/* ---------- Totaalbalk (mobiel: compact) ---------- */
.summary {
  background: linear-gradient(150deg, #232833 0%, #1a1f28 60%, #1d232e 100%);
  border: none; color: #fff;
  box-shadow: 0 18px 44px rgba(29, 33, 41, 0.3);
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 16px;
}
.summary h2 {
  color: rgba(255, 255, 255, 0.65); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; margin: 0;
}
.summary p {
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: 26px; font-weight: 800; margin: 0;
  color: var(--ember);
}
.summary small { display: none; color: rgba(255, 255, 255, 0.6); font-size: 13px; }
.button-row { display: flex; flex-direction: column; gap: 8px; }
.button-row button { width: 100%; padding: 11px 14px; font-size: 15px; }
button#emailBtn { background: linear-gradient(135deg, var(--action), var(--action-deep)); }
button#qrBtn { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.3); }
.sticky { position: sticky; bottom: 10px; z-index: 10; }

/* Reserveknop onder de balk, in lichte stijl */
.backup-row { text-align: center; margin-top: 14px; }
button#copyRegistrationBtn {
  background: #fff; color: var(--action-deep);
  border-color: var(--line); padding: 10px 18px; font-size: 14.5px;
}
button#copyRegistrationBtn:hover:not(:disabled) { border-color: var(--action); filter: none; }

.mailto-hint { color: var(--muted); font-size: 13.5px; text-align: center; margin: 14px 6px 0; }

/* ---------- Breder scherm ---------- */
@media (min-width: 640px) {
  .page { padding: 40px 20px 60px; }
  .card { padding: 26px; }
  .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .meat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readonly-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-layout { grid-template-columns: 230px 1fr; align-items: center; justify-items: start; }
  .summary { flex-direction: row; justify-content: space-between; align-items: center; gap: 24px; padding: 22px 26px; }
  .summary h2 { font-size: 15px; text-transform: none; letter-spacing: 0.02em; margin-bottom: 2px; }
  .summary p { font-size: 38px; margin-bottom: 4px; }
  .summary small { display: block; }
  .summary .button-row { flex: none; width: 280px; }
  .summary .button-row button { padding: 13.5px 20px; font-size: 16px; }
  .section-title { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; }
  .section-title p { margin: 0; }
  .gate-row { flex-direction: row; }
  .gate-row input { flex: 1; text-align: left; }
  button#unlockBtn { min-width: 170px; }
}

/* ---------- Toegankelijkheid ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
