/*
 * B&B Dental International Meeting 2026 — Registration Form
 * Design tokens + component styles.
 * All rules are scoped under .beb-form to avoid clashing with the WP theme.
 * The :root tokens are kept at top-level so CSS custom properties cascade
 * naturally (they can be overridden per-instance on .beb-form if needed).
 *
 * Source: Docs/design/B&B Dental Meeting 2026 - Registration.html
 * Tweaks-panel-only rules have been intentionally omitted.
 */

/* ============================================================
   Design tokens — customisation surface
   ============================================================ */
:root {
  --brand-red: #9E1B1C;
  --racing-red: #E2231A;
  --ink: #15171C;
  --ink-2: #3C4049;
  --muted: #777D88;
  --muted-2: #9AA0AB;
  --bg: #E9EBEF;
  --card: #FFFFFF;
  --line: #E2E5EA;
  --line-strong: #CFD3DA;
  --field: #F6F7F9;
  --field-focus: #FFFFFF;
  --green: #1E8A4C;
  --ok: #1E8A4C;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgba(21,23,28,.04), 0 18px 50px -18px rgba(21,23,28,.22);
  --shadow-pop: 0 10px 30px -10px rgba(21,23,28,.28);
  --font-display: "Saira", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, sans-serif;
}

/* ============================================================
   Page scaffold — scoped under .beb-form
   ============================================================ */
.beb-form {
  font-family: var(--font-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Box model reset (scoped). The prototype relied on a global
   `* { box-sizing: border-box }`; without it, width:100% inputs + padding
   overflow their container. Scoped to .beb-form so it never touches the theme. */
.beb-form,
.beb-form *,
.beb-form *::before,
.beb-form *::after { box-sizing: border-box; }

.beb-form .page {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 28px) 24px;
}

/* ---------- Shell card ---------- */
.beb-form .shell {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid rgba(21,23,28,.05);
}

/* ---------- Banner ---------- */
.beb-form .banner { position: relative; display: block; background: #0c0e12; }
.beb-form .banner img { display: block; width: 100%; height: auto; }
.beb-form .banner__rule {
  height: 6px;
  background: linear-gradient(90deg, var(--brand-red) 0%, var(--racing-red) 55%, #ff5a36 100%);
}

/* ---------- Top utility bar ---------- */
.beb-form .topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px clamp(18px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
}
.beb-form .topbar__meta {
  font-family: var(--font-display);
  font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 10px;
  min-width: 0; /* allow the meta to yield space in narrow containers */
}
.beb-form .topbar__meta b { color: var(--ink); font-weight: 700; }
.beb-form .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--racing-red); display: inline-block; }

.beb-form .lang {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line-strong); border-radius: 999px;
  overflow: hidden; background: var(--field);
  flex: none; /* never shrink in the topbar, or the trailing button clips */
}
.beb-form .lang button { white-space: nowrap; }
.beb-form .lang button {
  font-family: var(--font-display); font-weight: 600; letter-spacing: .08em;
  font-size: 12px; padding: 7px 14px; border: 0; background: transparent;
  color: var(--muted); cursor: pointer; transition: .15s;
}
.beb-form .lang button.on { background: var(--ink); color: #fff; }

/* Topbar on small screens: meta takes the full first line and wraps cleanly;
   the IT/EN toggle drops to its own line, right-aligned, never clipped. */
@media (max-width: 520px) {
  .beb-form .topbar { flex-wrap: wrap; row-gap: 10px; }
  .beb-form .topbar__meta {
    flex: 1 1 100%;
    flex-wrap: wrap; row-gap: 4px;
    font-size: 11px; letter-spacing: .1em;
  }
  .beb-form .lang { margin-left: auto; }
}

/* ---------- Body padding ---------- */
.beb-form .body { padding: clamp(22px, 3.4vw, 40px) clamp(18px, 3.6vw, 40px) clamp(24px, 3vw, 38px); }

/* ---------- Stepper ---------- */
.beb-form .stepper { display: flex; align-items: flex-start; gap: 0; margin-bottom: 30px; }
.beb-form .step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; position: relative; }
.beb-form .step__track {
  position: absolute; top: 17px; left: 0; right: 0; height: 2px; background: var(--line-strong); z-index: 0;
}
.beb-form .step:first-child .step__track { left: 50%; }
.beb-form .step:last-child .step__track { right: 50%; }
.beb-form .step__track > i { display: block; height: 100%; width: 0; background: var(--racing-red); transition: width .4s ease; }
.beb-form .step__num {
  position: relative; z-index: 1;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  background: #fff; border: 2px solid var(--line-strong); color: var(--muted-2);
  transition: .25s;
}
.beb-form .step__label {
  font-family: var(--font-display); font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; font-size: 11.5px; color: var(--muted-2); text-align: center;
  transition: .2s;
}
.beb-form .step.active .step__num { border-color: var(--ink); background: var(--ink); color: #fff; }
.beb-form .step.active .step__label { color: var(--ink); }
.beb-form .step.done .step__num { border-color: var(--racing-red); background: var(--racing-red); color: #fff; }
.beb-form .step.done .step__label { color: var(--ink-2); }

/* ---------- Section heads ---------- */
.beb-form .sec-kicker {
  font-family: var(--font-display); font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; font-size: 12px; color: var(--racing-red); margin: 0 0 8px;
}
.beb-form .sec-title {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.005em;
  font-size: clamp(26px, 4.4vw, 34px); line-height: 1.08; margin: 0; color: var(--ink);
}
.beb-form .sec-note {
  margin: 14px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 56ch;
}

/* ---------- Fields ---------- */
.beb-form .fields { display: flex; flex-direction: column; gap: 22px; margin-top: 28px; }
.beb-form .field { display: flex; flex-direction: column; gap: 9px; }
.beb-form .field__label {
  display: flex; align-items: baseline; gap: 8px;
  font-weight: 600; font-size: 15px; color: var(--ink);
}
.beb-form .field__label .req { color: var(--racing-red); font-weight: 700; }
.beb-form .field__label .opt { color: var(--muted-2); font-weight: 500; font-size: 12.5px; letter-spacing: .02em; }
.beb-form .field__help { margin: -2px 0 2px; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

.beb-form .input,
.beb-form .select {
  width: 100%; font-family: var(--font-body); font-size: 16px; color: var(--ink);
  background: var(--field); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 15px; transition: border-color .15s, background .15s, box-shadow .15s;
  appearance: none;
  -webkit-appearance: none;
}
.beb-form .input::placeholder { color: var(--muted-2); }
.beb-form .input:focus,
.beb-form .select:focus {
  outline: none; background: var(--field-focus); border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(21,23,28,.07);
}
.beb-form .select-wrap { position: relative; }
.beb-form .select-wrap::after {
  content: ""; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: translateY(-65%) rotate(45deg); pointer-events: none;
}
.beb-form .select { padding-right: 40px; cursor: pointer; }

/* invalid */
.beb-form .field.invalid .input,
.beb-form .field.invalid .select { border-color: var(--racing-red); background: #fff6f5; }
.beb-form .field.invalid .opt-row { border-color: #f1c4c0; }
.beb-form .field__err {
  color: var(--brand-red); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px;
}
.beb-form .field__err::before {
  content: "!"; display: grid; place-items: center;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--racing-red); color: #fff; font-size: 11px; font-weight: 800;
}

/* ---------- Choice rows (checkbox / radio) ---------- */
.beb-form .choices { display: flex; flex-direction: column; gap: 8px; }
.beb-form .choices.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 520px) { .beb-form .choices.cols { grid-template-columns: 1fr; } }
.beb-form .opt-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; min-height: 50px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--field); cursor: pointer; transition: .14s; user-select: none;
  font-size: 15.5px; color: var(--ink-2);
}
.beb-form .opt-row:hover { border-color: var(--line-strong); background: #fff; }
.beb-form .opt-row.sel { border-color: var(--ink); background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 0 rgba(21,23,28,.04); }
.beb-form .opt-row input { position: absolute; opacity: 0; pointer-events: none; }
.beb-form .mark {
  flex: none; width: 22px; height: 22px; border: 2px solid var(--line-strong);
  display: grid; place-items: center; transition: .14s; background: #fff;
}
.beb-form .mark.box { border-radius: 6px; }
.beb-form .mark.circle { border-radius: 50%; }
.beb-form .opt-row.sel .mark { border-color: var(--racing-red); background: var(--racing-red); }
.beb-form .mark svg { width: 13px; height: 13px; opacity: 0; transform: scale(.6); transition: .14s; }
.beb-form .opt-row.sel .mark svg { opacity: 1; transform: scale(1); }
.beb-form .mark .dotc { width: 8px; height: 8px; border-radius: 50%; background: #fff; opacity: 0; transform: scale(.4); transition: .14s; }
.beb-form .opt-row.sel .mark .dotc { opacity: 1; transform: scale(1); }

.beb-form .other-wrap { margin-top: 2px; }
.beb-form .other-wrap .input { background: #fff; }

.beb-form .note-inline {
  margin-top: 4px; display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(226,35,26,.06); border: 1px solid rgba(226,35,26,.16);
  color: var(--brand-red); font-size: 13.5px; line-height: 1.5; font-weight: 500;
}
.beb-form .note-inline svg { flex: none; margin-top: 1px; }

/* ---------- Intro ---------- */
.beb-form .intro__kicker {
  font-family: var(--font-display); font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; font-size: 12px; color: var(--racing-red); margin: 0 0 14px;
}
.beb-form .intro__title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em;
  font-size: clamp(30px, 5.6vw, 44px); line-height: 1.04; margin: 0; color: var(--ink);
}
.beb-form .intro__sub { margin: 12px 0 0; font-size: 17px; color: var(--brand-red); font-weight: 600; }
.beb-form .intro__body { margin: 22px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-2); max-width: 60ch; }
.beb-form .facts {
  margin: 30px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
}
@media (max-width: 520px) { .beb-form .facts { grid-template-columns: 1fr; } }
.beb-form .fact { background: #fff; padding: 18px 20px; }
.beb-form .fact__k {
  font-family: var(--font-display); font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; font-size: 11px; color: var(--muted); margin: 0 0 7px;
}
.beb-form .fact__v { font-size: 16px; font-weight: 600; color: var(--ink); margin: 0; line-height: 1.35; }

/* ---------- Actions / navigation ---------- */
.beb-form .actions {
  margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.beb-form .actions.end { justify-content: flex-end; }
.beb-form .btn {
  font-family: var(--font-display); font-weight: 700; letter-spacing: .04em;
  font-size: 15px; padding: 14px 26px; border-radius: var(--radius-sm); border: 1.5px solid transparent;
  cursor: pointer; transition: .16s; display: inline-flex; align-items: center; gap: 10px;
}
.beb-form .btn:active { transform: translateY(1px); }
.beb-form .btn--primary { background: var(--racing-red); color: #fff; box-shadow: 0 8px 20px -8px rgba(226,35,26,.6); }
.beb-form .btn--primary:hover { background: #c81d12; }
.beb-form .btn--dark { background: var(--ink); color: #fff; }
.beb-form .btn--dark:hover { background: #000; }
.beb-form .btn--ghost { background: transparent; color: var(--ink-2); border-color: var(--line-strong); }
.beb-form .btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.beb-form .btn svg { width: 16px; height: 16px; }

.beb-form .privacy { margin-top: 18px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.beb-form .privacy a { color: var(--brand-red); font-weight: 600; }

/* ---------- Confirmation ---------- */
.beb-form .confirm { text-align: center; padding: 14px 0 6px; }
.beb-form .confirm__badge {
  width: 74px; height: 74px; border-radius: 50%; margin: 0 auto 22px;
  display: grid; place-items: center; background: rgba(30,138,76,.1); border: 2px solid rgba(30,138,76,.3);
}
.beb-form .confirm__kicker {
  font-family: var(--font-display); font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; font-size: 12px; color: var(--ok); margin: 0 0 10px;
}
.beb-form .confirm__title {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 5vw, 40px);
  margin: 0; color: var(--ink); letter-spacing: -.01em;
}
.beb-form .confirm__body { margin: 16px auto 0; max-width: 52ch; color: var(--ink-2); font-size: 16px; line-height: 1.6; }

.beb-form .summary {
  text-align: left; margin: 32px 0 0; border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden;
}
.beb-form .summary__head {
  font-family: var(--font-display); font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; font-size: 12px; color: var(--muted);
  padding: 14px 20px; background: var(--field); border-bottom: 1px solid var(--line);
}
.beb-form .srow {
  display: grid; grid-template-columns: 200px 1fr; gap: 16px;
  padding: 13px 20px; border-bottom: 1px solid var(--line); font-size: 15px;
}
.beb-form .srow:last-child { border-bottom: 0; }
@media (max-width: 520px) {
  .beb-form .srow { grid-template-columns: 1fr; gap: 3px; padding: 12px 16px; }
}
.beb-form .srow__k { color: var(--muted); font-weight: 500; }
.beb-form .srow__v { color: var(--ink); font-weight: 600; }
.beb-form .confirm__see {
  margin: 28px 0 0; font-family: var(--font-display); font-weight: 600;
  letter-spacing: .04em; color: var(--brand-red); font-size: 15px;
}
.beb-form .confirm__actions {
  margin-top: 26px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

/* ---------- Footer credit ---------- */
.beb-form .credit { text-align: center; margin-top: 22px; font-size: 12px; color: var(--muted-2); letter-spacing: .02em; }
.beb-form .credit b { color: var(--muted); font-weight: 600; }

/* ---------- Entrance animation ---------- */
/* Opacity is never animated to 0 — if an unfocused tab freezes the animation
   at frame 0, content must still be visible. Only a gentle slide is animated. */
.beb-form .fade-step { opacity: 1; animation: bebFadeUp .34s ease; }
@keyframes bebFadeUp { from { transform: translateY(9px); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .beb-form .fade-step { animation: none; } }

/* ---------- Print ---------- */
@media print {
  .beb-form .topbar,
  .beb-form .actions,
  .beb-form .confirm__actions,
  .beb-form .credit { display: none !important; }
}

/* ---------- Language selection (initial screen) ---------- */
.beb-form .beb-langpick { text-align: center; padding: 8px 0 4px; }
.beb-form .beb-langpick__title { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.beb-form .beb-langpick__title .beb-langpick__l2 { color: var(--muted); font-weight: 600; font-size: .55em; letter-spacing: .01em; }
.beb-form .beb-langpick__opts { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.beb-form .beb-langpick__btn { min-width: 210px; font-size: 17px; padding: 16px 30px; }
@media (max-width: 520px) { .beb-form .beb-langpick__btn { min-width: 0; width: 100%; } }

/* ---------- Visa "Other" date range (From / To) ---------- */
.beb-form .beb-daterange { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.beb-form .beb-daterange__field { display: flex; flex-direction: column; gap: 6px; }
.beb-form .beb-daterange__field .field__label { font-size: 13px; }
@media (max-width: 520px) { .beb-form .beb-daterange { grid-template-columns: 1fr; } }

/* ---------- Honeypot anti-bot field (visually hidden, not display:none) ---------- */
.beb-form .beb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
