/* ============================================================
   EventRegistration — Modern Theme v4
   Werkt met de bestaande <br> tags — geen aanpassingen aan PHP nodig
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600&family=Plus+Jakarta+Sans:wght@600;700&display=swap');

:root {
  --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --color-bg:       #FAFAF8;
  --color-surface:  #FFFFFF;
  --color-border:   #E8E6E1;
  --color-text:     #1A1A18;
  --color-muted:    #6B6860;
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.07);
  --shadow-md:  0 4px 16px rgba(0,0,0,.08);
  --max-width:  680px;
  --side-pad:   24px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  height: 100%;
}
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--side-pad) 60px;
  overflow-x: hidden;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

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

/* ── Alle custom tags als block ─────────────────────────── */
h, h1, p, p1, p2, p3, p4, p5, p6,
f, f1, f1ags_icon, header_image {
  display: block;
}

/* ── <br> werkt NORMAAL — geen onderdrukking ────────────── */
/* De <br> tags in de PHP zorgen voor de regelopbouw.
   We laten ze gewoon hun werk doen en stylen eromheen.    */

/* ── Header-banner ──────────────────────────────────────── */
header_image {
  display: block;
  margin: 0 calc(-1 * var(--side-pad)) 24px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: clip;
}
header_image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  max-height: 320px;
}

/* ── Taalvlaggen ────────────────────────────────────────── */
f1ags_icon {
  display: flex;
  gap: 10px;
  margin: 0 0 16px;
}
f1ags_icon input[type="image"] {
  width: 36px;
  height: 24px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .15s, transform .15s;
}
f1ags_icon input[type="image"]:hover {
  border-color: var(--color-border);
  transform: scale(1.08);
}

/* ── h — evenementnaam ──────────────────────────────────── */
h {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

/* ── h1 — koppen / foutmeldingen ────────────────────────── */
h1 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid currentColor;
  background: color-mix(in srgb, currentColor 8%, transparent);
}

/* ── p1 — veldlabels ────────────────────────────────────── */
p1 {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
  line-height: 1.4;
  margin-top: 12px;
}

p1:first-child {
  margin-top: 0;
}

/* ── p3 — bodytekst ─────────────────────────────────────── */
p3 {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text);
  margin-bottom: 4px;
}

/* ── p2, p4, p5, p6 ─────────────────────────────────────── */
p2 { font-size: 0.875rem; color: var(--color-muted); }
p4 { font-size: 0.75rem; color: var(--color-muted); }
p5 { font-size: 1.0625rem; }
p6 { font-size: 0.6875rem; color: var(--color-muted); }

/* ── p — standaard tekst ────────────────────────────────── */
p { font-size: 1rem; line-height: 1.65; color: var(--color-text); }

/* ── Formulier-card ─────────────────────────────────────── */
form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin: 8px 0 20px;
  max-width: 100%;
  width: 100%;
}

/* ── Veld-wrappers ──────────────────────────────────────── */
f  { display: block; }
f1 { display: block; }

/* Submit-knop: ruimte erboven en eronder */
f1 input[type="submit"],
f1 input[type="SUBMIT"],
f1 input[type="button"] {
  margin-top: 20px;
  margin-bottom: 28px;
}

/* ── Text-inputs ────────────────────────────────────────── */
input[name$="_post"]:not([type="hidden"]):not([type="radio"]):not([type="image"]):not([type="submit"]) {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: 48px !important;
  padding: 0 14px !important;
  font-family: var(--font-body) !important;
  font-size: 0.9375rem !important;
  color: var(--color-text) !important;
  background: var(--color-bg) !important;
  border: 1.5px solid var(--color-border) !important;
  border-radius: var(--radius-sm) !important;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
input[name$="_post"]:not([type="hidden"]):not([type="radio"]):not([type="image"]):not([type="submit"]):focus {
  border-color: var(--color-text) !important;
  box-shadow: 0 0 0 3px rgba(26,26,24,.08) !important;
  background: #fff !important;
}

/* ── Radio-buttons ──────────────────────────────────────── */
input[type="radio"], input[type="RADIO"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-text);
  cursor: pointer;
  margin-right: 8px;
  vertical-align: middle;
}

/* ── Sessietabel ────────────────────────────────────────── */
table {
  width: 100% !important;
  border-collapse: collapse;
  margin: 4px 0 8px;
}
td {
  font-family: var(--font-body) !important;
  font-size: 0.9rem !important;
  color: var(--color-text) !important;
  padding: 10px 6px !important;
  vertical-align: middle;
  border-bottom: 1px solid var(--color-border);
  width: auto !important;
  height: auto !important;
}
td:first-child { padding-left: 0 !important; }
td:last-child {
  text-align: right;
  font-size: 0.8125rem !important;
  color: var(--color-muted) !important;
  white-space: nowrap;
  padding-right: 0 !important;
}
tr:hover td { background: #F5F4F0; }

/* ── Submit-knop ────────────────────────────────────────── */
input[type="submit"], input[type="SUBMIT"], input[type="button"] {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 56px !important;
  padding: 14px 24px !important;
  font-family: var(--font-body) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  cursor: pointer;
  border-radius: var(--radius-md) !important;
  border: none !important;
  box-shadow: var(--shadow-md) !important;
  transition: opacity .15s, transform .1s;
}
input[type="submit"]:hover, input[type="button"]:hover { opacity: .88; }
input[type="submit"]:active, input[type="button"]:active { transform: scale(.99); }

/* ── Image-knop (vlaggen) ───────────────────────────────── */
input[type="image"] {
  cursor: pointer;
  border-radius: var(--radius-sm);
}

/* ── Links ──────────────────────────────────────────────── */
a { color: var(--color-text); text-decoration: underline; text-underline-offset: 3px; word-break: break-all; overflow-wrap: break-word; }
a:hover { opacity: .65; }

/* ── HR ─────────────────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 20px 0;
}

/* ── Inline font-kleur tags ─────────────────────────────── */
p1 font { font-size: 0.75rem; font-weight: 500; }

/* ── Mobiel ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  :root { --side-pad: 16px; }
  body { padding-bottom: 40px; }
  h { font-size: 1.4rem; }
  form { padding: 16px 14px; border-radius: var(--radius-md); }
  header_image {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    margin-bottom: 16px;
  }
  header_image img { max-height: 200px; }
  input[type="submit"] {
    min-height: 52px !important;
    font-size: 0.9375rem !important;
  }
  td { font-size: 0.85rem !important; }
}

@media (max-width: 380px) {
  :root { --side-pad: 12px; }
  h { font-size: 1.25rem; }
}

@media print {
  body { max-width: 100%; padding: 0; }
  form { box-shadow: none; border: 1px solid #ccc; }
  input[type="submit"] { display: none !important; }
}

/* ── Telefoonnummer veld ─────────────────────────────────── */
.phone-field-wrap {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.phone-country {
  height: 48px;
  padding: 0 10px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6860' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  transition: border-color .15s;
}

.phone-country:focus {
  border-color: var(--color-text);
}

.phone-number {
  flex: 1;
  height: 48px !important;
  padding: 0 14px !important;
  font-family: var(--font-body) !important;
  font-size: 0.9375rem !important;
  color: var(--color-text) !important;
  background: var(--color-bg) !important;
  border: 1.5px solid var(--color-border) !important;
  border-radius: var(--radius-sm) !important;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
  width: auto !important;
}

.phone-number:focus {
  border-color: var(--color-text) !important;
  box-shadow: 0 0 0 3px rgba(26,26,24,.08) !important;
  background: #fff !important;
}

@media (max-width: 400px) {
  .phone-country { font-size: 0.8rem; padding-right: 24px; }
}

/* ── Headertext binnen formulier ────────────────────────── */
.form-header {
  font-size: 0.9375rem;
  line-height: 1.7;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-border);
}

.form-header p3 {
  margin: 0;
}

/* header-block: alleen nog voor foutpagina */
.header-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ── Facebook pixel en tracking images ─────────────────── */
img[src*="facebook.com"],
img[src*="facebook.net"],
img[width="1"],
img[height="1"] {
  display: block;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  overflow: hidden;
}
/* ── Evenementnaam bovenaan formulier ───────────────────── */
h.form-title {
  margin-top: 0;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}
/* ── h als eerste element in header-block ───────────────── */
.header-block > h:first-child {
  margin-top: 0;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}
/* ── Sessietabel scrollbaar bij veel sessies ────────────── */
.session-scroll-wrap {
  position: relative;
  margin: 4px 0 0;
}

/* Ruimte na de sessietabel zodat form-rand zichtbaar is */
.session-scroll-wrap + * {
  margin-top: 16px;
}

.session-scroll {
  overflow-y: auto;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #6B6860 #F0EEE9;
  margin-bottom: 20px;
}

/* Scrollbar alleen actief als JS de class toevoegt */
.session-scroll.scrollable {
  max-height: 400px;
}

/* Schaduw onderaan om aan te geven dat er meer is */
.session-scroll-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.95));
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  pointer-events: none;
}

.session-scroll table {
  margin: 0;
  border-radius: 0;
}

.session-scroll td {
  border-bottom: 1px solid var(--color-border);
}

.session-scroll tr:last-child td {
  border-bottom: none;
}

/* Scrollbar styling */
.session-scroll::-webkit-scrollbar {
  width: 8px;
}
.session-scroll::-webkit-scrollbar-track {
  background: var(--color-bg);
  border-radius: 4px;
}
.session-scroll::-webkit-scrollbar-thumb {
  background: var(--color-text);
  border-radius: 4px;
}
.session-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--color-muted);
}

/* Hint tekst onder de tabel */
.session-scroll-hint {
  font-size: 0.75rem;
  color: var(--color-muted);
  text-align: center;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
/* ── iOS Safari bounce fix ──────────────────────────────── */
@supports (-webkit-touch-callout: none) {
  html, body {
    overscroll-behavior-y: none;
    height: 100%;
  }
}