/* onboarding.css — quiz-onboarding (start.php).
   Cards, subtype-grids en wizard-polish. Werkt samen met de bestaande
   .step / .next-step / .prev-step / #progressBar mechaniek. */

:root {
  --ob-accent: #ED394E;
}

/* ---- Card-grid (hoofdcategorie + subtype) ---- */
.ob-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 6px;
}

.ob-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  border: 2px solid var(--theme-color-input-border, #e6e7eb);
  border-radius: 16px;
  background: var(--theme-color-card, #fff);
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  user-select: none;
  min-width: 0;
  overflow: hidden;
}
.ob-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .07);
}
.ob-card .ob-card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--theme-color-input, #f4f5f7);
  color: var(--ob-accent);
}
.ob-card .ob-card__icon svg { width: 20px; height: 20px; }
.ob-card .ob-card__label {
  font-family: "greycliff-cf", sans-serif;
  font-weight: 600;
  font-size: 1.05em;
  line-height: 1.2;
  color: var(--theme-text-color, #1a1c20);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.ob-card .ob-card__sub {
  font-size: .82em;
  color: var(--theme-text-color-gray, #8a8f98);
}

/* radio verstoppen, label = de card */
.ob-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ob-card__check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--theme-color-input-border, #d7d9de);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(.7);
  transition: opacity .18s ease, transform .18s ease;
}
.ob-card__check svg { width: 13px; height: 13px; color: #fff; }

/* toetsenbord-focus zichtbaar maken (radio is visueel verborgen) */
.ob-card:focus-within {
  border-color: var(--ob-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ob-accent) 35%, transparent);
  outline: none;
}

/* geselecteerde card */
.ob-card.is-selected {
  border-color: var(--ob-accent);
  box-shadow: 0 0 0 1px var(--ob-accent);
}
.ob-card.is-selected .ob-card__icon {
  background: var(--ob-accent);
  color: #fff;
}
.ob-card.is-selected .ob-card__check {
  opacity: 1;
  transform: scale(1);
  background: var(--ob-accent);
  border-color: var(--ob-accent);
}

/* ---- Subtype-groepen (conditioneel) ---- */
.ob-subtype-group { display: none; }
.ob-subtype-group.is-active {
  display: block;
  margin-top: 12px;
  animation: ob-reveal .26s cubic-bezier(.22, 1, .36, 1);
}
.ob-subtype-empty {
  padding: 20px;
  border: 1px dashed #d7d9de;
  border-radius: 14px;
  color: #8a8f98;
  text-align: center;
  font-size: .95em;
}

@keyframes ob-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Demo-toggle ---- */
.ob-demo-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #e6e7eb;
  border-radius: 14px;
  margin-bottom: 14px;
}
.ob-demo-toggle .ob-demo-text { flex: 1; }
.ob-demo-toggle .ob-demo-text strong { display: block; color: #1a1c20; }
.ob-demo-toggle .ob-demo-text span { font-size: .85em; color: #8a8f98; }

/* ---- Stap-overgang ---- */
.step.active { animation: ob-step-in .26s cubic-bezier(.22, 1, .36, 1); }
@keyframes ob-step-in {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .ob-card, .ob-card__check, .step.active, .ob-subtype-group.is-active { animation: none; transition: none; }
}

/* ============================================================
   Sprint 5 — twee-koloms layout + telefoon-mockup preview
   ============================================================ */

/* Twee-koloms shell (desktop): formulier links, telefoon rechts */
.ob-shell { width: 100%; }
@media (min-width: 992px) {
  .ob-shell {
    display: flex;
    gap: 48px;
    align-items: flex-start;
    justify-content: center;
  }
  .ob-shell .top-section { flex: 0 1 460px; }
  .ob-preview {
    margin-top: 17vh;
    position: sticky;
    top: 17vh;
    align-self: flex-start;
  }
}

/* De preview-kolom is op mobiel verborgen (daar gebruiken we de mini-preview) */
.ob-preview { display: none; }
@media (min-width: 992px) {
  .ob-preview { display: block; }
}

/* ---- Telefoon-frame ---- */
.ob-phone {
  --ob-accent: #ED394E;
  width: 300px;
  height: 600px;
  background: #0f1115;
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
  position: relative;
}
.ob-phone__notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 22px;
  background: #0f1115;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}
.ob-phone__screen {
  width: 100%;
  height: 100%;
  background: #f6f7f9;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ---- App top-bar (wit, zoals de echte app) ---- */
.ob-app-topbar {
  background: #fff;
  border-bottom: 1px solid #eceef1;
  padding: 30px 12px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ob-tb-ic { width: 17px; height: 17px; color: #3a3d44; flex: none; }
.ob-app-brand { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.ob-app-logo { height: 22px; width: auto; max-width: 80px; border-radius: 4px; object-fit: contain; }
.ob-app-title {
  font-family: "greycliff-cf", sans-serif;
  font-weight: 800;
  font-size: .95em;
  line-height: 1.1;
  color: var(--ob-accent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ob-tb-right { display: flex; align-items: center; gap: 7px; flex: none; }
.ob-tb-bell { position: relative; display: inline-flex; }
.ob-tb-dot { position: absolute; top: -1px; right: -1px; width: 6px; height: 6px; border-radius: 50%; background: #e23a3a; border: 1px solid #fff; }
.ob-tb-flag { width: 15px; height: 11px; border-radius: 2px; background: linear-gradient(#AE1C28 33.3%, #fff 33.3% 66.6%, #21468B 66.6%); }
.ob-tb-avatar { width: 20px; height: 20px; border-radius: 50%; background: #d7d9de; display: grid; place-items: center; color: #fff; }
.ob-tb-avatar svg { width: 12px; height: 12px; }

/* ---- App-body (JS-gerenderd scherm; cross-fade) ---- */
.ob-app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: opacity .15s ease;
}
.ob-app-body::-webkit-scrollbar { width: 0; }

/* ---- Rode page-header (icoon + titel + subtitel) ---- */
.ob-app-header {
  background: var(--ob-accent);
  color: #fff;
  padding: 12px 14px 18px;
  transition: background-color .2s ease;
}
.ob-ah-row { display: flex; align-items: center; gap: 8px; }
.ob-ah-row svg { width: 20px; height: 20px; }
.ob-ah-title { font-family: "greycliff-cf", sans-serif; font-weight: 800; font-size: 1.25em; }
.ob-ah-sub { font-size: .72em; opacity: .92; margin-top: 3px; line-height: 1.25; }

/* ---- Content-area ---- */
.ob-app-content {
  flex: 1;
  padding: 12px;
  margin-top: -8px;
  font-family: "greycliff-cf", sans-serif;
}

/* witte kaart */
.ob-card2 { background: #fff; border-radius: 14px; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); margin-bottom: 10px; }
.ob-pad { padding: 11px 12px; }

/* dashboard — tabs + event-kaart */
.ob-tabs { display: flex; align-items: center; gap: 10px; }
.ob-tab { font-size: .78em; font-weight: 700; color: #9aa0a8; padding: 4px 0; }
.ob-tab.is-active { color: var(--ob-accent); border-bottom: 2px solid var(--ob-accent); }
.ob-tab-filter { width: 14px; height: 14px; color: var(--ob-accent); margin-left: auto; }
.ob-evt { display: flex; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.ob-evt-bar { width: 6px; background: var(--ob-accent); flex: none; }
.ob-evt-body { padding: 11px 12px; flex: 1; min-width: 0; }
.ob-evt-t { font-weight: 800; font-size: .92em; color: #1a1c20; }
.ob-evt-m { font-size: .72em; color: #8a8f98; margin-top: 2px; }
.ob-evt-loc { font-size: .76em; color: #4a4d54; margin-top: 4px; }
.ob-evt-btns { display: flex; gap: 6px; margin: 9px 0; }
.ob-btn-fill { background: var(--ob-accent); color: #fff; border-radius: 8px; padding: 6px 10px; font-size: .72em; font-weight: 700; }
.ob-btn-out { border: 1px solid var(--ob-accent); color: var(--ob-accent); border-radius: 8px; padding: 6px 10px; font-size: .72em; font-weight: 700; }
.ob-evt-att { display: flex; align-items: center; gap: 6px; font-size: .76em; }
.ob-ava-xs { width: 20px; height: 20px; border-radius: 50%; background: #d7d9de; flex: none; }
.ob-att-no { color: var(--ob-accent); font-weight: 700; }

/* wedstrijden — kalender + match-kaarten */
.ob-cal-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: .82em; color: #4a4d54; }
.ob-cal-month { display: inline-flex; align-items: center; gap: 5px; }
.ob-cal-month svg, .ob-cal-nav svg { width: 13px; height: 13px; }
.ob-cal-nav { display: inline-flex; gap: 6px; color: #9aa0a8; }
.ob-cal-strip { display: flex; justify-content: space-between; margin: 10px 0 4px; }
.ob-cd { display: flex; flex-direction: column; align-items: center; gap: 1px; width: 30px; padding: 5px 0; border-radius: 10px; }
.ob-cd b { font-size: .82em; color: #1a1c20; }
.ob-cd i { font-size: .6em; color: #9aa0a8; font-style: normal; }
.ob-cd.is-sel { background: #1a1c20; }
.ob-cd.is-sel b, .ob-cd.is-sel i { color: #fff; }
.ob-sub-row { display: flex; align-items: center; justify-content: space-between; font-size: .8em; font-weight: 700; color: #4a4d54; margin: 12px 0 7px; }
.ob-link { font-size: .72em; font-weight: 600; color: #9aa0a8; text-decoration: underline; }
.ob-match { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; background: #fff; border-radius: 14px; padding: 12px 10px; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.ob-match--feat { background: #15171c; color: #fff; }
.ob-mt { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.ob-mt-logo { width: 26px; height: 26px; border-radius: 50%; background: #f0c000; color: #15171c; font-size: .58em; font-weight: 800; display: grid; place-items: center; flex: none; }
.ob-mt-logo--img { background: transparent; object-fit: contain; border-radius: 6px; }
/* Uitgelichte wedstrijd: breder logo, niet bijgesneden */
.ob-mt-logo--feat { width: 44px; height: 32px; border-radius: 8px; }
.ob-match--feat .ob-mt-logo:not(.ob-mt-logo--img) { background: #fff; }
.ob-mt-name { font-size: .66em; font-weight: 700; line-height: 1.1; }
.ob-mt-time { background: rgba(0, 0, 0, .06); border-radius: 999px; padding: 3px 8px; font-size: .72em; font-weight: 800; }
.ob-match--feat .ob-mt-time { background: rgba(255, 255, 255, .16); }
.ob-mt-loc { grid-column: 1 / -1; text-align: center; font-size: .64em; opacity: .7; margin-top: 6px; }

/* bedrijf — knop + KPI's + planning */
.ob-btn-block { display: flex; align-items: center; justify-content: center; gap: 6px; border: 1.5px solid #1a1c20; border-radius: 12px; padding: 9px; font-size: .8em; font-weight: 700; color: #1a1c20; margin-bottom: 11px; background: #fff; }
.ob-btn-block svg { width: 14px; height: 14px; }
.ob-kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.ob-kpi2 { background: #fff; border-radius: 14px; padding: 11px; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.ob-kpi2-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.ob-kpi2-top span { font-size: .62em; font-weight: 700; color: #9aa0a8; text-transform: uppercase; line-height: 1.2; }
.ob-kpi-ic { width: 15px; height: 15px; flex: none; }
.ob-ic-red { color: #e23a3a; }
.ob-ic-teal { color: #1aa3a3; }
.ob-ic-green { color: #2bb36b; }
.ob-kpi2 b { display: block; font-size: 1.5em; color: #1a1c20; margin-top: 6px; }
.ob-plan-date { font-size: .72em; font-weight: 800; color: var(--ob-accent); margin: 8px 0 5px; }
.ob-plan-row { display: flex; align-items: center; gap: 8px; font-size: .74em; color: #1a1c20; padding: 5px 0; border-top: 1px solid #f0f1f3; }
.ob-plan-time { color: #4a4d54; }
.ob-plan-dot { width: 7px; height: 7px; border-radius: 50%; background: #2bb36b; flex: none; }

.ob-s-hero {
  font-weight: 700;
  font-size: 1.05em;
  color: #1a1c20;
  margin: 2px 0 12px;
}
.ob-s-list { display: flex; flex-direction: column; gap: 9px; }
.ob-s-item {
  background: #fff;
  border-radius: 12px;
  padding: 11px 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.ob-s-item__t { font-weight: 600; font-size: .9em; color: #1a1c20; }
.ob-s-item__m { font-size: .76em; color: #8a8f98; margin-top: 2px; }
.ob-s-pill {
  display: inline-block;
  background: color-mix(in srgb, var(--ob-accent) 14%, #fff);
  color: var(--ob-accent);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: .72em;
  font-weight: 600;
  margin-top: 6px;
}
.ob-s-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.ob-s-kpi {
  background: #fff;
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.ob-s-kpi b { display: block; font-size: 1.3em; color: var(--ob-accent); line-height: 1; }
.ob-s-kpi span { font-size: .66em; color: #8a8f98; }
.ob-s-bar { height: 8px; border-radius: 999px; background: #e7e8ec; overflow: hidden; margin: 8px 0 4px; }
.ob-s-bar > i { display: block; height: 100%; background: var(--ob-accent); }
.ob-s-btn {
  display: block;
  text-align: center;
  background: var(--ob-accent);
  color: #fff;
  border-radius: 10px;
  padding: 10px;
  font-weight: 700;
  font-size: .85em;
  margin-top: 12px;
}

/* ---- Mobiele mini-preview button ---- */
.ob-minipreview {
  display: none;
  position: fixed;
  right: 16px;
  bottom: calc(20px + var(--sa-bottom, env(safe-area-inset-bottom)));
  z-index: 1000;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  background: #0f1115;
  color: #fff;
  font-weight: 700;
  font-size: .9em;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .32);
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  /* Entree: start buiten beeld, slide omhoog na korte delay */
  transform: translateY(calc(100% + 36px));
  animation: ob-btn-entree .6s cubic-bezier(.32, 1, .38, 1) 1.1s forwards,
             ob-btn-float 3s ease-in-out 1.7s infinite;
}
.ob-minipreview svg { width: 16px; height: 16px; flex: none; }
.ob-minipreview__chevron { animation: ob-chevron-bounce .9s ease-in-out 1.8s infinite alternate; }
@media (max-width: 991.98px) {
  .ob-minipreview { display: inline-flex; }
}
/* Entree: slide omhoog vanuit onderkant scherm */
@keyframes ob-btn-entree {
  from { transform: translateY(calc(100% + 36px)); }
  to   { transform: translateY(0); }
}
/* Daarna: zachte float op de box-shadow */
@keyframes ob-btn-float {
  0%, 100% { box-shadow: 0 8px 28px rgba(0, 0, 0, .32); }
  50%       { box-shadow: 0 14px 38px rgba(0, 0, 0, .42), 0 0 0 5px rgba(255, 255, 255, .07); }
}
@keyframes ob-chevron-bounce {
  from { transform: translateY(0); }
  to   { transform: translateY(-4px); }
}

/* ---- Bottom-sheet overlay ---- */
.ob-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(15, 17, 21, 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: background-color .38s ease;
  pointer-events: none;
}
.ob-preview-overlay[hidden] { display: none; }
.ob-preview-overlay.is-open {
  background: rgba(15, 17, 21, .6);
  pointer-events: auto;
}

.ob-preview-sheet {
  width: 100%;
  max-width: 380px;
  background: #1a1c20;
  border-radius: 28px 28px 0 0;
  padding: 0 20px calc(28px + var(--sa-bottom, env(safe-area-inset-bottom)));
  transform: translateY(100%);
  transition: transform .46s cubic-bezier(.32, 1, .38, 1);
  will-change: transform;
  touch-action: pan-x;
}
.ob-preview-overlay.is-open .ob-preview-sheet {
  transform: translateY(0);
}

.ob-preview-handle {
  width: 44px;
  height: 5px;
  background: rgba(255, 255, 255, .22);
  border-radius: 999px;
  margin: 14px auto 18px;
  cursor: grab;
}

.ob-preview-overlay__slot {
  display: flex;
  justify-content: center;
}
.ob-preview-overlay__slot .ob-phone {
  transform: scale(.9);
  transform-origin: top center;
  margin-bottom: calc(-60px * .1); /* corrigeer negatieve ruimte van scale */
}

@media (prefers-reduced-motion: reduce) {
  .ob-minipreview { animation: none; transform: translateY(0); }
  .ob-minipreview__chevron { animation: none; }
  .ob-preview-overlay, .ob-preview-sheet { transition: none; }
}

/* Inline icoon + tekst netjes verticaal gecentreerd (Feather svg = baseline) */
.ob-inline-ic { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.ob-inline-ic svg { width: 16px; height: 16px; }

/* Voorwaarden-checkbox: flex-rij zodat checkbox + tekst altijd op 1 lijn staan */
.ob-check-row { display: flex; align-items: flex-start; gap: 10px; }
.ob-check-row .ob-check-input { flex: none; margin-top: 3px; width: 18px; height: 18px; cursor: pointer; }
.ob-check-row .ob-check-label { flex: 1; font-size: .88em; line-height: 1.45; color: #3a3d44; cursor: pointer; }

/* "(Aangeraden)" badge naast de demo-toggle titel */
.ob-demo-aanbevolen {
  display: inline-block;
  background: color-mix(in srgb, var(--ob-accent) 12%, #fff);
  color: var(--ob-accent);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: .72em;
  font-weight: 700;
  vertical-align: middle;
  margin-left: 6px;
}

/* Aanwezigheidsstatus */
.ob-att-yes { color: #2bb36b; font-weight: 700; }

/* Aangemeld-staat: groene balk links + gevulde checkbox (primary) + muted regel */
.ob-evt--ok .ob-evt-bar { background: #2bb36b; }
.ob-evt-muted { font-size: .7em; color: #9aa0a8; margin: 7px 0 2px; }
.ob-evt-att { margin-top: 5px; }
.ob-att-check {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid #d7d9de;
  display: grid; place-items: center;
  flex: none;
}
.ob-att-check svg { width: 11px; height: 11px; color: transparent; }
.ob-att-check.is-on { background: var(--ob-accent); border-color: var(--ob-accent); }
.ob-att-check.is-on svg { color: #fff; }
