/* CYF Demo Booking (B2B) — v1.0 — zelfde huisstijl als de B2C-wizard, eigen cyfd- prefix */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── AVADA-PROOF: zorg dat [hidden] en onze hide-klassen altijd werken ── */
.cyfd-wrap [hidden]                   { display: none !important; }
.cyfd-wrap .cyfd-pane:not(.is-active) { display: none !important; }

/* ── custom properties ── */
.cyfd-wrap {
  --blue:        #2c78cb;
  --blue-dark:   #1a5aa0;
  --blue-xdark:  #0e3d72;
  --blue-light:  #3caef1;
  --blue-faint:  #eef5fd;
  --green:       #12b76a;
  --green-faint: #ecfdf5;
  --red:         #e03030;
  --red-faint:   #fff0f0;
  --text:        #111827;
  --muted:       #6b7a99;
  --border:      #e4eaf3;
  --bg:          #f7f9fc;
  --white:       #ffffff;
  --shadow:      0 12px 48px rgba(28,78,150,.13);
  --radius:      16px;
  --r-sm:        10px;
  --r-xs:        6px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── wrapper ── */
.cyfd-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 12px 40px;
  /* Maak dit een query-container zodat de wizard reageert op zijn EIGEN breedte
     (bijv. in een smalle Avada-kolom), niet op de schermbreedte */
  container-type: inline-size;
  container-name: cyfd;
}

/* ── card ── */
.cyfd-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  min-height: 560px;
}

/* ══════════════════════ SIDEBAR ══════════════════════ */
.cyfd-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: linear-gradient(160deg, var(--blue-xdark) 0%, var(--blue) 100%);
  color: #fff;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.cyfd-sb-brand { display: flex; align-items: center; gap: 12px; }
.cyfd-sb-icon {
  width: 44px; height: 44px;
  background: #fff;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
  overflow: hidden;
}
.cyfd-sb-icon img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 6px;
  box-sizing: border-box;
  display: block;
}
.cyfd-sb-brand strong { display: block; font-size: 13px; font-weight: 700; line-height: 1.3; }
.cyfd-sb-brand span   { font-size: 11px; opacity: .65; }

.cyfd-sb-steps { display: flex; flex-direction: column; gap: 4px; }
.cyfd-sb-step {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  cursor: default;
  transition: background .2s, opacity .2s;
  opacity: .45;
}
.cyfd-sb-step.is-active { background: rgba(255,255,255,.15); opacity: 1; }
.cyfd-sb-step.is-done   { opacity: .75; cursor: pointer; }
.cyfd-sb-step.is-done:hover { background: rgba(255,255,255,.1); opacity: 1; }
.cyfd-sb-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
  transition: border-color .2s, background .2s;
}
.cyfd-sb-step.is-active .cyfd-sb-num { background: #fff; color: var(--blue); border-color: #fff; }
.cyfd-sb-step.is-done .cyfd-sb-num   { background: rgba(255,255,255,.2); border-color: transparent; }
.cyfd-sb-num-check { display: none; }
.cyfd-sb-step.is-done .cyfd-sb-num-check { display: inline; }
.cyfd-sb-step.is-done .cyfd-sb-num-digit { display: none; }
.cyfd-sb-label { font-size: 13px; font-weight: 500; }

.cyfd-sb-badges { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.cyfd-sb-badge { display: flex; align-items: center; gap: 8px; font-size: 12px; opacity: .8; }
.cyfd-sb-badge::before {
  content: '✓';
  width: 18px; height: 18px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; flex-shrink: 0;
}

/* ══════════════════════ MAIN ══════════════════════ */
.cyfd-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.cyfd-progress-mob { display: none; padding: 16px 20px 0; gap: 6px; }
.cyfd-pmob-bar { height: 4px; border-radius: 2px; flex: 1; background: var(--border); transition: background .3s; }
.cyfd-pmob-bar.is-active { background: var(--blue); }

#cyfd-form { flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; }

.cyfd-pane {
  flex: 1;
  padding: 36px 36px 28px;
  display: none;
  flex-direction: column;
}
.cyfd-pane.is-active { display: flex; animation: cyfd-slide-in .28s cubic-bezier(.22,.68,0,1.05) both; }
.cyfd-pane.is-leaving { animation: cyfd-slide-out .22s ease forwards; }
@keyframes cyfd-slide-in  { from { opacity:0; transform:translateX(28px); } to { opacity:1; transform:none; } }
@keyframes cyfd-slide-out { from { opacity:1; transform:none; } to { opacity:0; transform:translateX(-20px); } }

.cyfd-pane-title { font-size: 22px; font-weight: 800; color: var(--text); margin: 0 0 4px; }
.cyfd-pane-sub   { font-size: 14px; color: var(--muted); margin: 0 0 28px; }

/* ══════════════════════ FORMULIERVELDEN ══════════════════════ */
.cyfd-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.cyfd-contact-full { grid-column: 1 / -1; }

.cyfd-field-label {
  display: block;
  font-size: 12px; font-weight: 700;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 6px;
}
.cyfd-req { color: var(--red); }
.cyfd-optional { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }

/* Rand met box-shadow-ring i.p.v. border: Avada overschrijft 'border' met !important,
   maar laat box-shadow ongemoeid — zo is de rand altijd zichtbaar. */
.cyfd-wrap .cyfd-field-input,
.cyfd-wrap .cyfd-field-textarea {
  display: block; width: 100%;
  padding: 11px 14px;
  border: 1.5px solid transparent !important;
  border-radius: var(--r-xs) !important;
  font-size: 14px; font-family: inherit;
  color: var(--text);
  outline: none;
  transition: box-shadow .15s;
  box-sizing: border-box;
  background: var(--white) !important;
  box-shadow: inset 0 0 0 1.5px #8ea3c6 !important;
}
.cyfd-wrap .cyfd-field-input:focus,
.cyfd-wrap .cyfd-field-textarea:focus {
  box-shadow: inset 0 0 0 1.5px var(--blue), 0 0 0 3px rgba(44,120,203,.18) !important;
}
.cyfd-wrap .cyfd-field-textarea { resize: vertical; min-height: 80px; }
.cyfd-select { cursor: pointer; appearance: auto; }

/* ── interesse-chips ── */
.cyfd-interest-block { margin: 6px 0 4px; }
.cyfd-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cyfd-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  background: var(--white);
  transition: border-color .15s, background .15s;
  user-select: none;
}
.cyfd-chip:hover { border-color: var(--blue-light); background: var(--blue-faint); }
.cyfd-chip.is-selected { border-color: var(--blue); background: var(--blue-faint); }
.cyfd-chip-label { font-size: 13px; font-weight: 600; color: var(--text); }
.cyfd-chip-check {
  width: 16px; height: 16px;
  background: var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: transparent; font-size: 10px; flex-shrink: 0;
  transition: background .15s, color .15s;
}
.cyfd-chip.is-selected .cyfd-chip-check { background: var(--blue); color: #fff; }

/* sector-knoppen: één kiesbaar; hele groep rood als er niets gekozen is */
.cyfd-sector-chips.cyfd-invalid .cyfd-chip { border-color: var(--red); }

/* invulveld bij "Overige" (sector) en "Iets anders" (interesse) */
.cyfd-sector-other,
.cyfd-interest-other { margin-top: 10px; }

/* KvK-veld met ophaalknop */
.cyfd-kvk-row { display: flex; gap: 8px; align-items: stretch; }
.cyfd-kvk-row .cyfd-field-input { flex: 1; }
.cyfd-kvk-btn { padding: 11px 20px; white-space: nowrap; box-shadow: none; }
.cyfd-kvk-status { margin-top: 8px; font-size: 13px; }
.cyfd-kvk-status.is-loading { color: var(--muted); font-style: italic; }
.cyfd-kvk-status.is-ok    { color: var(--green); font-weight: 600; }
.cyfd-kvk-status.is-error { color: var(--red); }
.cyfd-kvk-status.is-info  { color: var(--muted); }

/* rood-markering voor lege verplichte velden */
.cyfd-wrap .cyfd-field-input.cyfd-invalid,
.cyfd-wrap .cyfd-field-textarea.cyfd-invalid {
  box-shadow: inset 0 0 0 1.5px var(--red), 0 0 0 3px rgba(224,48,48,.18) !important;
}

/* privacy */
.cyfd-privacy {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 16px 0 0;
  font-size: 13px; color: var(--muted);
}
.cyfd-privacy input { width: 16px; height: 16px; margin-top: 1px; flex-shrink: 0; }
.cyfd-privacy a { color: var(--blue); }

/* ══════════════════════ KALENDER ══════════════════════ */
.cyfd-date-time { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.cyfd-cal-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.cyfd-cal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: var(--blue); color: #fff;
}
.cyfd-cal-month { font-size: 14px; font-weight: 700; }
.cyfd-cal-nav {
  width: 30px; height: 30px;
  border: none; background: rgba(255,255,255,.2); color: #fff;
  border-radius: 6px; cursor: pointer; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; line-height: 1;
}
.cyfd-cal-nav:hover { background: rgba(255,255,255,.3); }

.cyfd-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); padding: 8px; gap: 2px; }
.cyfd-cal-dayname {
  text-align: center; font-size: 11px; font-weight: 700;
  color: var(--muted); padding: 6px 0; text-transform: uppercase;
}
.cyfd-cal-dayname.is-sun { color: var(--red); }

.cyfd-cal-cell {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; border-radius: 6px; cursor: pointer;
  transition: background .12s, color .12s; font-weight: 500;
}
.cyfd-cal-cell:hover:not(.is-disabled):not(.is-selected) { background: var(--blue-faint); color: var(--blue); }
.cyfd-cal-cell.is-disabled { color: var(--border); cursor: default; font-weight: 400; }
.cyfd-cal-cell.is-sun.is-disabled,
.cyfd-cal-cell.is-holiday { color: #fca5a5; text-decoration: line-through; }
.cyfd-cal-cell.is-selected { background: var(--blue); color: #fff; font-weight: 700; }
.cyfd-cal-cell.is-today:not(.is-selected) { color: var(--blue); font-weight: 700; }

.cyfd-cal-chosen {
  padding: 10px 16px; background: var(--blue-faint);
  font-size: 13px; color: var(--blue); font-weight: 600;
  min-height: 38px; display: flex; align-items: center;
}

/* time slot sectie */
.cyfd-time-section { min-width: 0; }
.cyfd-time-title { font-size: 14px; font-weight: 700; color: var(--text); margin: 0 0 12px; }
.cyfd-slots-hint { font-size: 13px; color: var(--muted); padding: 12px 0; margin: 0; }
.cyfd-slots-loading { font-style: italic; }

.cyfd-dyn-slots {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  max-height: 400px; overflow-y: auto;
}
.cyfd-dyn-slot {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-xs);
  background: var(--white);
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; text-align: center;
  transition: border-color .15s, background .15s, color .15s;
  color: var(--text);
}
.cyfd-dyn-slot:hover:not(.is-active) { border-color: var(--blue-light); background: var(--blue-faint); color: var(--blue); }
.cyfd-dyn-slot.is-active { border-color: var(--blue); background: var(--blue); color: #fff; }

/* ══════════════════════ SAMENVATTING ══════════════════════ */
.cyfd-summary-box {
  margin: 0 0 22px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.cyfd-sum-head {
  background: var(--bg);
  padding: 12px 16px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted);
}
.cyfd-sum-row {
  display: flex; justify-content: space-between;
  padding: 10px 16px; font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.cyfd-sum-row:last-child { border-bottom: none; }
.cyfd-sum-label { color: var(--muted); }
.cyfd-sum-val   { font-weight: 600; color: var(--text); text-align: right; max-width: 60%; }

/* ══════════════════════ NAV KNOPPEN ══════════════════════ */
.cyfd-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 28px;
}
.cyfd-nav-right { justify-content: flex-end; }
.cyfd-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 8px;
  font-size: 14px; font-weight: 700; font-family: inherit;
  cursor: pointer; border: none;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.cyfd-btn:active { transform: scale(.98); }
.cyfd-btn:disabled { opacity: .55; cursor: default; transform: none; }
.cyfd-btn-primary { background: var(--blue); color: #fff; box-shadow: 0 4px 14px rgba(44,120,203,.35); }
.cyfd-btn-primary:hover:not(:disabled) { background: var(--blue-dark); box-shadow: 0 4px 18px rgba(44,120,203,.45); }
.cyfd-btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid var(--border); }
.cyfd-btn-ghost:hover { background: var(--bg); border-color: var(--muted); }

/* ══════════════════════ ERROR ══════════════════════ */
.cyfd-error {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--red-faint);
  border: 1px solid #fca5a5;
  border-radius: var(--r-xs);
  color: var(--red); font-size: 13px; margin-top: 14px;
}
.cyfd-error::before { content: '⚠'; }

/* ══════════════════════ SUCCESS ══════════════════════ */
.cyfd-pane.is-active.cyfd-success-pane {
  display: flex; align-items: center; justify-content: center;
  flex: 1; padding: 48px 36px;
}
.cyfd-success { text-align: center; max-width: 420px; }
.cyfd-success-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 32px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.cyfd-success h2 { font-size: 24px; font-weight: 800; color: var(--text); margin: 0 0 10px; }
.cyfd-success p  { font-size: 15px; color: var(--muted); line-height: 1.6; margin: 0 0 10px; }
.cyfd-success a  { color: var(--blue); font-weight: 600; }

/* ══════════════════════ RESPONSIVE ══════════════════════ */
/* Op basis van de CONTAINERBREEDTE: zodra de wizard-kolom smaller wordt dan ~740px
   verbergen we de blauwe sidebar en stapelen we alles in één nette kolom.
   Zo ziet het er goed uit op volle breedte én in een smalle kolom. */
@container cyfd (max-width: 740px) {
  .cyfd-card { flex-direction: column; }
  .cyfd-sidebar { display: none; }
  .cyfd-progress-mob { display: flex; }
  .cyfd-pane { padding: 24px 22px 20px; }
  .cyfd-date-time { grid-template-columns: 1fr; }
  .cyfd-contact-grid { grid-template-columns: 1fr; }
  .cyfd-contact-full { grid-column: auto; }
}

/* Kleine schermen: rand-tot-rand (padding op de wrap kan niet via @container) */
@media (max-width: 700px) {
  .cyfd-wrap { padding: 0 0 32px; }
  .cyfd-card { border-radius: 0; }
}
