/* ==========================================================================
   Beltchecker Brackets: the setup sheet for a logged-out organizer (functions_brackets_funnel.php,
   scripts/bc-bk-funnel.js) and the small profile nudge in the organizer app. The Brackets look (bk-tokens.css
   values) scoped to .bkf, so it can sit on any page (the tour, the language pages) without changing the page's own
   variables (bk-tokens.css would restyle a page in the site's own look, like the language pages; scoped to the sheet,
   not the page). A bottom sheet on a phone, a centred card from 700 px. No size change on hover, shadows without offset.
   ========================================================================== */
.bkf, .bkf-nudge {
  --bg: #07070b; --sheet: #13131b; --ink: #f6f6f9; --ink-2: #d4d4dd; --muted: #8f8f9e;
  --line: rgba(255, 255, 255, 0.09); --line-2: rgba(255, 255, 255, 0.16); --card: rgba(255, 255, 255, 0.045); --card-2: rgba(255, 255, 255, 0.08); --card-3: rgba(255, 255, 255, 0.12);
  --field: rgba(255, 255, 255, 0.06); --cyan: #03c3e3; --violet: #6d5cf0; --green: #22c55e; --on-green: #04170b; --red: #ff4d5e; --amber: #f5b23c;
  --grad: linear-gradient(115deg, #03c3e3 0%, #5b4bd1 42%, #9a3ea8 70%, #e0835a 100%);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}
html[data-theme="light"] .bkf, html[data-theme="light"] .bkf-nudge {
  --bg: #f6f6fa; --sheet: #ffffff; --ink: #101018; --ink-2: #3b3b48; --muted: #5d5d6c;
  --line: rgba(16, 16, 24, 0.08); --line-2: rgba(16, 16, 24, 0.14); --card: rgba(16, 16, 24, 0.03); --card-2: rgba(16, 16, 24, 0.05); --card-3: rgba(16, 16, 24, 0.1);
  --field: #ffffff; --cyan: #0891b2; --green: #16a34a; --red: #e11d48; --amber: #c27a0a; color-scheme: light;
}
html.bkf-lock, html.bkf-lock body { overflow: hidden; }
.bkf[hidden] { display: none !important; }
.bkf { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: flex-end; justify-content: center; font-family: var(--font); color: var(--ink); -webkit-font-smoothing: antialiased; }
.bkf-back { position: absolute; inset: 0; background: rgba(4, 4, 8, 0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: bkf-fade 0.2s ease; }
.bkf-card { position: relative; width: 100%; max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; background: var(--sheet); border: 1px solid var(--line-2); border-bottom: 0;
  border-radius: 24px 24px 0 0; padding: 12px 20px calc(24px + env(safe-area-inset-bottom, 0px)); box-shadow: 0 0 60px rgba(0, 0, 0, 0.45); animation: bkf-up 0.28s cubic-bezier(0.22, 1, 0.36, 1); box-sizing: border-box; }
.bkf-card *, .bkf-card *::before, .bkf-card *::after { box-sizing: border-box; }
.bkf-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad); border-radius: 24px 24px 0 0; }
@media (min-width: 700px) {
  .bkf { align-items: center; padding: 24px; }
  .bkf-card { max-width: 520px; border-radius: 24px; border-bottom: 1px solid var(--line-2); padding: 16px 32px 32px; max-height: calc(100dvh - 48px); }
}
@keyframes bkf-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes bkf-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bkf-card, .bkf-back { animation: none; } }

.bkf-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -8px 8px; }
.bkf-ic { width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.bkf-ic:hover { background: var(--card-2); color: var(--ink); }
.bkf-ic svg, .bkf-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.bkf-dots { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.bkf-dots li { width: 28px; height: 4px; border-radius: 4px; background: var(--card-3); transition: background-color 0.2s; }
.bkf-dots li.on { background: var(--cyan); }

.bkf-step { display: flex; flex-direction: column; gap: 14px; margin: 0; }
.bkf-step[hidden] { display: none; }
.bkf-kick { margin: 0; font: 700 11px/1.2 var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bkf-kick[hidden] { display: none; }
.bkf h2 { margin: 0 0 4px; font: 800 28px/1.1 var(--font) !important; letter-spacing: -0.03em; color: var(--ink) !important; }
.bkf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 380px) { .bkf-two { grid-template-columns: 1fr; } }
.bkf-f { display: flex; flex-direction: column; gap: 6px; margin: 0; min-width: 0; }
.bkf-f > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.bkf-f small { color: var(--muted); font-weight: 500; }
.bkf input:not([type=radio]), .bkf select { width: 100%; height: 52px; min-height: 52px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line-2); background-color: var(--field); color: var(--ink) !important;
  font: 500 17px/1.2 var(--font) !important; outline: none; -webkit-appearance: none; appearance: none; margin: 0; box-shadow: none; }
/* The site's own form styles must not shrink the sheet's fields (17 px also keeps iOS from zooming in) */
.bkf input[type=date] { display: flex; align-items: center; -webkit-appearance: none; appearance: none; text-indent: 0 !important; overflow: hidden; }
.bkf input[type=date]::-webkit-date-and-time-value { text-align: left; color: var(--ink); }
.bkf input[type=date]::-webkit-calendar-picker-indicator { opacity: 0.6; }
.bkf select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 34px; }
.bkf select option { color: #101018; background: #fff; }
.bkf input[type=date] { min-width: 0; }
.bkf input:focus, .bkf select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 25%, transparent); }
.bkf input::placeholder { color: var(--muted); opacity: 0.8; }
.bkf-code { font: 700 28px/1 var(--mono) !important; letter-spacing: 0.4em; text-align: center; }

.bkf-who { border: 0; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.bkf-who legend { padding: 0; margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.bkf-opts { display: flex; flex-direction: column; gap: 8px; }
.bkf-opt { position: relative; display: block; margin: 0; cursor: pointer; }
.bkf-opt input { position: absolute; opacity: 0; pointer-events: none; }
.bkf-opt span { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--card); transition: border-color 0.15s, background-color 0.15s; }
.bkf-opt span::before { content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); background: transparent; transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s; }
.bkf-opt b { font-size: 16px; font-weight: 600; color: var(--ink); }
.bkf-opt:hover span { background: var(--card-2); }
.bkf-opt input:checked + span { border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 10%, transparent); }
.bkf-opt input:checked + span::before { border-color: var(--cyan); background: var(--cyan); box-shadow: inset 0 0 0 3px var(--sheet); }
.bkf-opt input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }
.bkf-pane { display: flex; flex-direction: column; gap: 12px; }
.bkf-pane[hidden] { display: none; }

.bkf-pick { position: relative; }
.bkf-pick input.is-picked { border-color: var(--green); padding-left: 40px; background-image: radial-gradient(circle at 20px 50%, var(--green) 6px, transparent 7px); }
.bkf-list { display: flex; flex-direction: column; margin-top: 6px; border-radius: 14px; overflow: hidden; }
.bkf-list:empty { display: none; }
.bkf-list:not(:empty) { border: 1px solid var(--line-2); }
.bkf-list button[data-id] { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border: 0; border-bottom: 1px solid var(--line); background: var(--sheet); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.bkf-list button[data-id]:last-child { border-bottom: 0; }
.bkf-list button[data-id]:hover { background: var(--card-2); }
.bkf-list b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bkf-list small { display: block; font-size: 13px; color: var(--muted); }
.bkf-list span:last-child { min-width: 0; }
.bkf-logo { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--card-3); display: grid; place-items: center; font-weight: 700; overflow: hidden; color: var(--ink-2); }
.bkf-logo img { width: 100%; height: 100%; object-fit: cover; }
.bkf-none { margin: 0; padding: 14px; font-size: 14px; color: var(--muted); background: var(--sheet); }

.bkf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 4px; padding: 0 20px; border-radius: 18px; border: 1px solid transparent;
  font: 700 17px/1.15 var(--font); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: filter 0.15s, opacity 0.15s; }
.bkf-btn.go { background: var(--grad); background-origin: border-box; color: #fff; box-shadow: 0 0 30px color-mix(in srgb, var(--violet) 40%, transparent); }
.bkf-btn:hover { filter: brightness(1.08); }
.bkf-btn:disabled { opacity: 0.6; cursor: default; filter: none; }
.bkf-btn.is-busy { color: transparent; position: relative; }
.bkf-btn.is-busy::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; animation: bkf-spin 0.7s linear infinite; }
@keyframes bkf-spin { to { transform: rotate(360deg); } }
.bkf-btn:focus-visible, .bkf-link:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; }
.bkf-alt { margin: 0; text-align: center; font-size: 15px; color: var(--muted); }
.bkf-link { border: 0; background: none; padding: 8px 4px; color: var(--cyan); font: 600 15px/1.2 var(--font); cursor: pointer; }
.bkf-link:disabled { color: var(--muted); cursor: default; }
.bkf-fine { margin: 0; text-align: center; font-size: 12px; color: var(--muted); }
.bkf-fine a { color: inherit; text-decoration: underline; }
.bkf-sent { margin: -4px 0 0; color: var(--ink-2) !important; font-size: 16px; overflow-wrap: anywhere; }
.bkf-err { margin: 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--red) 14%, transparent); color: var(--red); font-size: 14px; font-weight: 600; }
.bkf-warn { margin: 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--amber) 14%, transparent); color: var(--amber); font-size: 14px; }
.bkf-err[hidden], .bkf-warn[hidden] { display: none; }
.bkf-cap:empty { display: none; }
.bkf-cap { display: flex; justify-content: center; min-height: 78px; }

/* ---------------------------------------------------------------- the nudge in the organizer app */
.bkf-nudge { position: fixed; z-index: 90; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(560px, calc(100% - 32px)); box-sizing: border-box;
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 16px; border-radius: 16px; background: var(--sheet); border: 1px solid var(--line-2); color: var(--ink);
  font: 500 15px/1.3 var(--font); box-shadow: 0 0 40px rgba(0, 0, 0, 0.4); }
.bkf-nudge[hidden] { display: none; }
.bkf-nudge b { flex: 1; min-width: 0; font-weight: 600; }
.bkf-nudge-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--amber); }
.bkf-nudge-go { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 12px; background: var(--card-3); color: var(--ink) !important; font-weight: 700; text-decoration: none; }
.bkf-nudge-x { flex: none; min-height: 40px; padding: 0 10px; border: 0; background: none; color: var(--muted); font: 600 14px/1 var(--font); cursor: pointer; }
.bkf-nudge-x:hover, .bkf-nudge-go:hover { filter: brightness(1.1); }
