/* ==========================================================
   Afsprakenplanner: boekingspagina
   Opmaak overgenomen uit het prototype (prototype/styles.css).
   De accentkleur komt uit de config (zie index.php).
   ========================================================== */

:root {
  /* Afgestemd op de website (JouwWeb-thema): kop #444, tekst #737373. */
  --ink: #444444;
  --text-2: #5c5c5c;
  --muted: #737373;
  --faint: #9aa0ab;
  --line: #e2e5ea;
  --soft: #f4f5f8;
  --grey: #eef0f3;
  --white: #fff;

  --rose: #eea7a7;
  --rose-hover: #d69696;
  --rose-dark: #9c4f4f;
  --rose-soft: #fbe9e9;
  --rose-tekst: var(--ink);
  --green: #1d9a68;
  --green-dark: #157a52;
  --green-soft: #e2f4eb;
  --amber: #e0a01a;
  --amber-soft: #fcefd3;
  --error: #b3261e;

  --font-head: "Maven Pro", sans-serif;
  --font-body: "Lato", system-ui, sans-serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
body.sheet-open { overflow: hidden; }
a { color: var(--rose-dark); }
a:hover { color: var(--ink); }
input[type=range] { accent-color: var(--rose); }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; margin: 0; color: var(--ink); }
h2 { font-size: clamp(32px, 4.5vw, 52px); line-height: 1.05; letter-spacing: -.01em; text-wrap: balance; }
h3 { font-size: 24px; margin-bottom: 16px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.mt { margin-top: 32px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 700;
  padding: 11px 20px;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-lg { padding: 14px 24px; }
.btn-primary { background: var(--rose); border-color: var(--rose); color: var(--rose-tekst); }
.btn-primary:hover { background: var(--rose-hover); border-color: var(--rose-hover); color: var(--rose-tekst); }
.btn-outline { background: var(--white); border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-quiet { background: var(--white); border-color: var(--line); color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-spacer { height: var(--header-h); }
/* In de iframe op de website: die heeft zelf al een kop met logo en menu. */
.ingesloten .site-header, .ingesloten .header-spacer { display: none; }
/* De iframe groeit mee met de inhoud, dus niets mag van de schermhoogte afhangen
   en 'fixed' onderin werkt niet: gewone knoppen in plaats van de balk. */
.ingesloten .planner-section { min-height: 0; }
.ingesloten .bottom-bar, .ingesloten .bottom-spacer { display: none !important; }
.ingesloten .toast { position: absolute; bottom: auto; pointer-events: none; }
@media (max-width: 759px) {
  .ingesloten .panel-actions { display: flex; }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.1; }
.logo:hover { color: var(--ink); }
.logo-name { font-family: var(--font-head); font-weight: 700; font-size: 22px; letter-spacing: -.01em; }
.logo-name span { color: var(--rose-dark); }
.logo-sub { font-size: 13px; color: var(--muted); }
.header-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 2px solid var(--ink); color: var(--ink); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap;
}
.header-link:hover { background: var(--ink); color: var(--white); }
.preview-bar { background: var(--amber-soft); color: var(--ink); font-size: 13px; font-weight: 600; text-align: center; padding: 6px 16px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Intro ---------- */
.planner-section { background: var(--white); padding: clamp(28px, 6vw, 64px) 0 clamp(56px, 9vw, 88px); min-height: calc(100vh - var(--header-h)); }
.planner-intro { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px 56px; align-items: end; margin-bottom: clamp(24px, 4vw, 40px); }
.planner-intro h1 { color: var(--ink); font-size: clamp(32px, 4.5vw, 52px); line-height: 1.05; letter-spacing: -.01em; text-wrap: balance; }
.planner-intro p { color: var(--muted); }
.planner-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 10px; font-size: 15px; font-weight: 700; color: var(--text-2); }
.planner-facts span { display: inline-flex; gap: 6px; }
.planner-facts i { color: var(--green-dark); font-style: normal; }

/* ---------- Planner ---------- */
.booking { background: var(--white); border: 1px solid var(--line); border-radius: 26px; overflow: hidden; box-shadow: 0 18px 40px -28px rgba(0, 0, 0, .25); }
.steps {
  list-style: none; margin: 0; padding: 20px 28px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px;
  border-bottom: 1px solid var(--line);
}
.step { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--muted); }
.step span {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 15px; background: var(--grey); color: var(--muted);
}
.step em { font-style: normal; }
.step.active, .step.done { color: var(--ink); }
.step.active span { background: var(--rose); color: var(--rose-tekst); }
.step.done span { background: var(--green); color: var(--white); font-size: 0; }
.step.done span::before { content: "✓"; font-size: 15px; }

.step-progress { display: none; padding: 16px 16px 14px; border-bottom: 1px solid var(--line); }
.step-progress-text { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.step-progress-text span:last-child { color: var(--muted); font-weight: 600; }
.step-progress-bar { height: 6px; background: var(--grey); border-radius: 99px; overflow: hidden; }
.step-progress-bar div { height: 100%; width: 25%; background: var(--rose); border-radius: 99px; transition: width .3s; }
.step-progress-bar div.complete { background: var(--green); }

.booking-body { display: flex; flex-wrap: wrap; }
.booking-main { flex: 999 1 560px; min-width: 0; padding: clamp(18px, 4vw, 32px); }
.panel { display: none; }
.panel.active { display: block; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.panel-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); }
.panel-actions .spacer { flex: 1; }
.panel-actions .btn-primary { padding: 13px 24px; }

/* Keuzes */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.choice input, .pill input { position: absolute; opacity: 0; pointer-events: none; }
.choice-inner {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  padding: 18px 20px; border-radius: 16px; cursor: pointer;
  border: 2px solid var(--line); background: var(--white); transition: border-color .15s, background .15s;
}
.choice-inner strong { font-size: 17px; }
.choice-inner small { font-size: 14px; color: var(--muted); }
.choice-inner:hover { border-color: #c9cdd4; }
.choice input:checked + .choice-inner { border-color: var(--rose); background: var(--rose-soft); }
.choice input:focus-visible + .choice-inner, .pill input:focus-visible + span { outline: 3px solid var(--rose); outline-offset: 2px; }

.pill-group { display: flex; flex-wrap: wrap; gap: 10px; }
.pill span {
  display: inline-block; font-weight: 600; font-size: 15px; padding: 8px 16px; border-radius: 999px;
  cursor: pointer; border: 2px solid var(--line); background: var(--white); color: var(--ink); transition: .15s;
}
.pill span:hover { border-color: #c9cdd4; }
.pill input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--white); }

.transport-extra { margin-top: 16px; padding: 18px; background: var(--soft); border-radius: 14px; display: flex; flex-direction: column; gap: 14px; }
.transport-extra[hidden], .km-field[hidden] { display: none; }
.km-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.km-field small { font-weight: 400; font-size: 14px; color: var(--muted); }
.km-input { display: flex; gap: 12px; align-items: center; }
.km-input input[type=range] { flex: 1; }
.km-input input[type=number] { width: 90px; padding: 8px 10px; }

/* Kalender */
.cal-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 32px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cal-head strong { font-family: var(--font-head); font-size: 20px; text-transform: capitalize; }
.cal-nav {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); background: var(--white);
  font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink);
}
.cal-nav:hover:not(:disabled) { border-color: var(--ink); }
.cal-nav:disabled { opacity: .35; cursor: default; }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-weekdays { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.cal-day {
  aspect-ratio: 1; border: 0; border-radius: 10px; font: inherit; font-weight: 700; font-size: 15px;
  cursor: pointer; background: var(--green-soft); color: var(--ink);
}
.cal-day.few { background: var(--amber-soft); }
.cal-day:hover:not(:disabled):not(.selected) { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-day:disabled { background: transparent; color: #b7bcc5; cursor: default; }
.cal-day.today { outline: 2px solid var(--ink); outline-offset: -2px; }
.cal-day.selected { background: var(--rose); color: var(--rose-tekst); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 14px; font-size: 13px; color: var(--muted); font-weight: 600; }
.cal-legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-free { background: var(--green); }
.dot-few { background: var(--amber); }
.dot-full { background: #cfd3da; }

.slots h3 { font-size: 20px; margin: 6px 0 16px; }
.slot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.slot-grid .muted { grid-column: 1 / -1; }
.slot {
  font: inherit; font-weight: 700; font-size: 16px; padding: 12px 8px; border-radius: 12px; cursor: pointer;
  border: 2px solid var(--line); background: var(--white); color: var(--ink);
}
.slot small { display: block; font-weight: 500; font-size: 12px; opacity: .8; }
.slot:hover:not(:disabled):not(.selected) { border-color: var(--ink); }
.slot.selected { border-color: var(--rose); background: var(--rose); color: var(--rose-tekst); }
.slot:disabled { border-color: transparent; background: var(--grey); color: var(--faint); text-decoration: line-through; cursor: not-allowed; }

/* Formulier */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.field.full { grid-column: 1 / -1; }
.field[hidden] { display: none; }
input:not([type=radio]):not([type=checkbox]):not([type=range]), select, textarea {
  font: inherit; font-weight: 400; font-size: 16px; color: var(--ink);
  padding: 12px 14px; border: 2px solid var(--line); border-radius: 10px; background: var(--white); width: 100%;
}
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--rose); outline-offset: 1px; }
.field.invalid input, .field.invalid select { border-color: var(--error); background: #fff5f5; }
.field .err { color: var(--error); font-size: 13px; }

/* Overzicht */
.review {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0 24px;
  background: var(--soft); padding: 8px 22px; border-radius: 14px; margin-bottom: 22px;
}
.review > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.review-k { font-size: 13px; color: var(--muted); font-weight: 600; }
.review-v { font-weight: 700; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--text-2); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--rose); margin-top: 3px; flex: none; }

/* Bevestigd */
.success { padding: 16px 0; max-width: 560px; }
.success-icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--green-soft); color: var(--green);
  display: grid; place-items: center; font-size: 30px; font-weight: 700; margin-bottom: 20px;
}
.success h3 { font-size: 32px; letter-spacing: -.01em; margin-bottom: 10px; }
.success > p:first-of-type { font-size: 18px; color: var(--text-2); margin-bottom: 24px; }
.success strong { color: var(--ink); }
.success-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }

.demo-note { margin-top: 24px; font-size: 13px; color: var(--muted); }

/* Samenvatting */
.summary { flex: 1 1 280px; background: var(--soft); padding: 32px 28px; display: flex; flex-direction: column; }
.summary h4 { font-size: 20px; margin-bottom: 12px; }
.sum-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.sum-row span { color: var(--muted); }
.sum-row strong { text-align: right; }
.sum-row strong.empty { color: var(--faint); font-weight: 500; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; }
.sum-total span { font-weight: 700; }
.sum-total strong { font-family: var(--font-head); font-size: 32px; color: var(--rose-dark); white-space: nowrap; }
.sum-total strong small { font-family: var(--font-body); font-size: 15px; font-weight: 700; }
.sum-note { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }

/* Tijden per dagdeel */
.slot-groep + .slot-groep { margin-top: 18px; }
.slot-groep h4 { font-family: var(--font-body); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.slot-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
.laden { color: var(--muted); font-size: 15px; display: flex; align-items: center; gap: 10px; }
.laden::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--rose); animation: draai .7s linear infinite; }
@keyframes draai { to { transform: rotate(360deg); } }
.cal-grid.bezig { opacity: .45; pointer-events: none; }
.choice-inner .choice-omschrijving { color: var(--muted); font-size: 13px; }
.hp-veld { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.field-label { font-weight: 600; font-size: 14px; }
.check.invalid span { color: var(--error); }
.form-fout { margin-top: 16px; padding: 12px 16px; border-radius: 12px; background: #fff5f5; color: var(--error); font-weight: 600; font-size: 15px; }

.slot-noot { margin: 14px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }

/* Haal & breng: adres en afstand */
.hb-uitleg { margin: 0; font-size: 15px; color: var(--text-2); }
.hb-adres { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; max-width: 420px; }
.hb-adres .field input { text-transform: uppercase; }
.hb-adres .field:last-child input { text-transform: none; }
.hb-resultaat {
  position: relative; padding: 14px 16px; border-radius: 14px; background: var(--white);
  border: 2px solid var(--line); display: flex; flex-direction: column; gap: 2px; font-size: 15px;
}
.hb-resultaat p { margin: 0; color: var(--text-2); }
.hb-resultaat .hb-sub { font-size: 14px; color: var(--muted); }
.hb-plek { font-size: 16px; padding-right: 90px; }
.hb-prijs { position: absolute; right: 16px; top: 12px; font-family: var(--font-head); font-weight: 700; font-size: 24px; color: var(--rose-dark); }
.hb-ok { border-color: var(--green); background: var(--green-soft); }
.hb-buiten, .hb-fout { border-color: #f1c4c1; background: #fff5f5; }
.hb-buiten .hb-plek { padding-right: 0; }
.hb-buiten p:first-of-type { color: var(--error); font-weight: 600; }
.hb-onbekend { border-color: var(--amber); background: var(--amber-soft); }
.hb-zoeken { border-style: dashed; }
.hb-bron { margin: 0; font-size: 12px; color: var(--muted); }
.hb-bron a { color: var(--muted); }
@media (max-width: 480px) {
  .hb-plek { padding-right: 0; }
  .hb-prijs { position: static; margin-top: 4px; }
}

/* ---------- Footer ---------- */
.site-footer { background: #f2f2f2; color: var(--muted); padding: 32px 0; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; font-size: 15px; }
.footer-credit { color: var(--faint); }
.site-footer a { color: var(--rose-dark); }

/* ---------- Toast & balken onderin ---------- */
.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 100;
  background: var(--ink); color: var(--white); padding: 14px 22px; border-radius: 999px;
  font-weight: 700; max-width: calc(100% - 32px); text-align: center;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .5);
}
.bottom-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; gap: 12px;
  background: var(--white); border-top: 1px solid var(--line);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 28px -14px rgba(0, 0, 0, .25);
}
.bottom-bar > .btn { flex: 1; padding: 16px; }
.book-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; padding-left: 12px; padding-right: 12px; }
.book-bar-side { display: flex; min-width: 0; }
.book-bar-side.end { justify-content: flex-end; }
.book-bar .btn { min-height: 48px; max-width: 100%; padding: 12px 8px; font-size: 15px; white-space: nowrap; }
.book-bar #barPrev, .book-bar #barNext { padding: 12px 16px; }
.book-bar #barNext.tight { padding: 12px 8px; }
@media (max-width: 370px) { .book-bar .btn { font-size: 14px; } }
.book-bar-total {
  min-width: 84px; padding: 6px 8px; border-radius: 14px; background: var(--rose-soft);
  display: flex; flex-direction: column; align-items: center; text-align: center; line-height: 1.2;
}
.book-bar-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--rose-dark); }
.book-bar-total strong { font-family: var(--font-head); font-weight: 700; font-size: 22px; }
.book-bar-total span:last-child { font-size: 12px; color: var(--ink); white-space: nowrap; }
.bottom-spacer { display: none; }

/* ---------- Mobiel (< 760px) ---------- */
@media (max-width: 759px) {
  .steps, .summary, .panel-actions { display: none; }
  .step-progress { display: block; }
  .pill span { min-height: 44px; display: inline-flex; align-items: center; }
  .cal-nav { width: 44px; height: 44px; }
  .bottom-spacer { display: block; height: 84px; background: #f2f2f2; }
  .toast { bottom: 104px; }
  .logo-sub { display: none; }
}

@media (min-width: 760px) {
  .bottom-bar { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Losse pagina's (afspraak bekijken, privacy) ---------- */
.los { max-width: 760px; margin: 0 auto; }
.los .booking-main h1 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -.01em; margin-bottom: 8px; }
.los .booking-main h2 { font-size: 20px; margin: 26px 0 8px; }
.los .booking-main p, .los .booking-main li { color: var(--text-2); }
.los .booking-main ul { padding-left: 20px; margin: 0 0 12px; }
.los-status { display: inline-block; font-size: 14px; font-weight: 700; padding: 4px 12px; border-radius: 99px; margin-bottom: 14px; background: var(--green-soft); color: var(--green); }
.los-status-nieuw { background: #fcefd3; color: #8a5a00; }
.los-status-geannuleerd { background: var(--grey); color: var(--muted); }
.los-acties { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 8px; }
.los-melding { background: var(--soft); border-radius: 14px; padding: 14px 18px; margin: 0 0 20px; font-weight: 600; }
.privacy-uitklap { margin-top: 28px; }
.privacy-uitklap:focus { outline: none; }
.los .booking-main #privacyKop { font-size: clamp(24px, 3.5vw, 32px); margin: 0 0 8px; }
.privacy-noot { font-size: 14px; color: var(--muted); margin: 12px 0 0 32px; }

/* ---------- Afspraak verzetten (afspraak.php?verzetten=1) ---------- */
.verzet { margin-top: 28px; padding-top: 4px; border-top: 1px solid var(--line); }
.verzet .cal-layout { margin: 18px 0 8px; }
.cal-day.huidig:not(.selected) { box-shadow: inset 0 0 0 2px var(--rose); }
.slot.slot-huidig:disabled { border: 2px dashed var(--rose); background: var(--white); color: var(--ink); text-decoration: none; }
.verzet .btn:disabled { opacity: .45; cursor: not-allowed; }
.verzet-fout { background: var(--rose-soft); color: var(--rose-dark); border-radius: 12px; padding: 12px 16px; font-weight: 600; margin: 14px 0 0; }

/* ---------- Logo (geüpload in het beheer) ---------- */
.logo-img { display: block; height: 48px; width: auto; max-width: min(240px, 55vw); object-fit: contain; }
@media (max-width: 759px) { .logo-img { height: 40px; } }
