/* ==========================================================================
   Beltchecker Brackets: the shared building blocks (UI sweep steps 7 and 8, approved 28 Nov 2026), loaded after
   styles/bk-tokens.css on every Brackets page (bkUiHead). Markup: functions_brackets_comp.php and scripts/bc-bk-comp.js.
   bkEmptyState (.bk-empty), bkSearchAthlete (.bk-search), bkList (.bk-row), bkTicket (.bk-ticket).
   Colours come from the page's tokens, so the same block sits in a light page and a dark staff screen.
   Nothing changes size on hover: state is colour and outline only.
   ========================================================================== */

/* ---------------------------------------------------------------- bkEmptyState */
.bk-empty { display: grid; justify-items: center; gap: 10px; padding: 28px 16px; text-align: center; color: var(--muted); }
.bk-empty-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--card-2, rgba(127, 127, 127, 0.1)); color: var(--ink-2, currentColor); }
.bk-empty-ico svg { width: 26px; height: 26px; }
.bk-empty p { margin: 0; max-width: 34ch; font-size: var(--fs-md, 15px); line-height: 1.45; color: var(--ink-2, inherit); }
.bk-empty .bkb { margin-top: 4px; }

/* ---------------------------------------------------------------- bkSearchAthlete */
.bk-search { position: relative; display: flex; align-items: center; width: 100%; min-width: 0; }
.bk-search svg { position: absolute; left: 14px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.bk-search { flex: 1 1 220px; }
label.bk-search > input[type=search] { width: 100%; min-width: 0; min-height: 48px; padding: 0 14px 0 44px; border-radius: var(--r-sm, 12px); border: 1px solid var(--line-2, rgba(127, 127, 127, 0.3)); background: var(--field, var(--card, transparent)); color: inherit; font: 500 16px/1.2 var(--font, inherit); outline: none; -webkit-appearance: none; appearance: none; }
label.bk-search > input::placeholder { color: var(--muted); }
label.bk-search > input[type=search]:focus { border-color: var(--cyan, #03c3e3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan, #03c3e3) 25%, transparent); }
.bk-search input::-webkit-search-decoration { -webkit-appearance: none; }

/* ---------------------------------------------------------------- bkList: one athlete row */
.bk-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bk-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 12px; border-radius: var(--r-md, 16px); background: var(--card, transparent); border: 1px solid var(--line, rgba(127, 127, 127, 0.18)); color: inherit; text-decoration: none; text-align: left; font: inherit; width: 100%; box-sizing: border-box; }
a.bk-row, button.bk-row { cursor: pointer; }
a.bk-row:hover, button.bk-row:hover { background: var(--card-2, rgba(127, 127, 127, 0.08)); }
a.bk-row:focus-visible, button.bk-row:focus-visible { outline: 3px solid var(--cyan, #03c3e3); outline-offset: 2px; }
.bk-row[hidden] { display: none; }
.bk-row-av { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--grad, #6d5cf0); color: #fff; font: 800 14px var(--font, inherit); letter-spacing: 0.02em; }
.bk-row-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bk-row-t { display: grid; gap: 2px; min-width: 0; flex: 1; }
.bk-row-t b { font-weight: 700; font-size: var(--fs-md, 15px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-row-t small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--fs-sm, 13px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-row-belt { flex: none; width: 18px; height: 6px; border-radius: 2px; background: var(--b, #999); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); }
.bk-row-kid { display: inline-block; padding: 1px 6px; border-radius: 999px; background: var(--card-2, rgba(127, 127, 127, 0.12)); color: var(--muted); font: 700 11px var(--font, inherit); vertical-align: 2px; }
.bk-row .bk-tag { flex: none; }
.bk-row-m { flex: none; color: var(--muted); font: 600 var(--fs-sm, 13px) var(--mono, ui-monospace, monospace); font-variant-numeric: tabular-nums; }
.bk-row.is-done { border-color: color-mix(in srgb, var(--green, #22c55e) 40%, transparent); }
.bk-row.is-bad { border-color: color-mix(in srgb, var(--red, #ff4d5e) 60%, transparent); background: color-mix(in srgb, var(--red, #ff4d5e) 8%, transparent); }
.bk-row.is-out { opacity: 0.55; }

/* A flat list inside a card: dividers instead of boxes (the app's Entrants) */
.bk-rows.is-flat { gap: 0; }
.bk-rows.is-flat .bk-row { border: 0; border-bottom: 1px solid var(--line, rgba(127, 127, 127, 0.14)); border-radius: 0; background: none; min-height: 52px; padding: 6px 4px; }
.bk-rows.is-flat .bk-row:last-child { border-bottom: 0; }
.bk-rows.is-flat button.bk-row:hover { background: var(--card-2, rgba(127, 127, 127, 0.08)); }
.bk-row.is-you { background: color-mix(in srgb, var(--cyan, #03c3e3) 8%, transparent); }
.bk-rows.is-flat .bk-row.is-you { background: color-mix(in srgb, var(--cyan, #03c3e3) 8%, transparent); border-radius: 10px; }

/* ---------------------------------------------------------------- bkTicket: the living ticket */
.bk-ticket { display: grid; gap: 12px; justify-items: center; padding: 18px; border-radius: var(--r-2xl, 28px); border: 1px solid var(--line-2, rgba(127, 127, 127, 0.3)); background: var(--card, transparent); text-align: center; }
.bk-tk-k { margin: 0; font: 700 var(--fs-xs, 12px) var(--mono, ui-monospace, monospace); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.bk-tk-qr { padding: 10px; border-radius: 18px; background: #fff; line-height: 0; }
.bk-tk-qr img { display: block; width: min(56vw, 200px); height: auto; aspect-ratio: 1; }
.bk-tk-code { display: grid; gap: 2px; margin: 0; }
.bk-tk-code small { color: var(--muted); font-size: var(--fs-xs, 12px); }
.bk-tk-code b { font: 800 22px var(--mono, ui-monospace, monospace); letter-spacing: 0.14em; }
.bk-tk-who { display: grid; gap: 2px; }
.bk-tk-who b { font-size: var(--fs-2xl, 22px); letter-spacing: -0.02em; }
.bk-tk-who small { color: var(--muted); font-size: var(--fs-sm, 13px); }
.bk-tk-day { display: grid; gap: 6px; justify-items: center; width: 100%; padding-top: 10px; border-top: 1px solid var(--line, rgba(127, 127, 127, 0.18)); }
.bk-tk-day ol { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.bk-tk-day li i { display: block; width: 22px; height: 6px; border-radius: 3px; background: var(--card-3, rgba(127, 127, 127, 0.25)); }
.bk-tk-day li.s-done i { background: var(--green, #22c55e); }
.bk-tk-day li.s-now i { background: var(--cyan, #03c3e3); box-shadow: 0 0 0 2px color-mix(in srgb, var(--cyan, #03c3e3) 35%, transparent); }
.bk-tk-day li.s-missed i, .bk-tk-day li.s-open i { background: var(--amber, #f5b23c); }
.bk-tk-day p { margin: 0; font-size: var(--fs-sm, 13px); color: var(--ink-2, inherit); }
.bk-tk-day p.bk-tk-miss { margin-top: 6px; padding: 7px 10px; border-radius: 10px; background: rgba(229, 72, 77, 0.14); color: #e5484d; font-weight: 700; }
.bk-tk-day p.bk-tk-miss::before { content: "!"; display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 7px; border-radius: 50%; background: #e5484d; color: #fff; font-size: 12px; vertical-align: -3px; }
.bk-tk-in { color: var(--green, #22c55e); font-weight: 700; font-size: var(--fs-sm, 13px); }
/* Small (next to the route in Your day): the QR on the left, the code and the name beside it */
.bk-ticket.is-compact { grid-template-columns: 96px 1fr; grid-template-areas: "qr k" "qr code" "qr who" "qr foot"; justify-items: start; align-items: center; gap: 2px 14px; padding: 12px; text-align: left; border-radius: var(--r-lg, 18px); }
.bk-ticket.is-compact .bk-tk-qr { grid-area: qr; padding: 6px; border-radius: 12px; }
.bk-ticket.is-compact .bk-tk-qr img { width: 84px; }
.bk-ticket.is-compact .bk-tk-k { grid-area: k; letter-spacing: 0.06em; }
.bk-ticket.is-compact .bk-tk-code { grid-area: code; }
.bk-ticket.is-compact .bk-tk-code small { display: none; }
.bk-ticket.is-compact .bk-tk-who { grid-area: who; }
.bk-ticket.is-compact .bk-tk-who b { font-size: var(--fs-md, 15px); }
.bk-ticket.is-compact > :last-child:not(.bk-tk-who):not(.bk-tk-code) { grid-area: foot; margin-top: 4px; }
/* Inside a card that already has its frame (the app's Me tab) */
.card > .bk-ticket { border: 0; padding: 0; background: none; }
.bk-ticket .wbtns { justify-content: center; }
.bk-ticket > .muted { margin: 0; }
@media print {
	.bk-ticket { border: 1px solid #000; background: #fff; color: #000; break-inside: avoid; }
	.bk-tk-k, .bk-tk-code small, .bk-tk-who small, .bk-tk-day p { color: #333; }
	.bk-tk-day li i { background: #ddd; } .bk-tk-day li.s-done i, .bk-tk-day li.s-now i { background: #000; box-shadow: none; }
}

/* Live match lists (scripts/bc-bk-sync.js, point 23): what just changed (a time moved, a new opponent, a result)
   lights up for a few seconds, a colour and a ring only (no size change); "Updated 8 s ago" under a live list. */
.bk-chg { animation: bk-chg 4.5s ease-out; border-radius: 8px; }
@keyframes bk-chg { 0%, 35% { background-color: rgba(245, 197, 66, 0.26); box-shadow: 0 0 0 2px rgba(245, 197, 66, 0.6); } 100% { background-color: transparent; box-shadow: 0 0 0 2px rgba(245, 197, 66, 0); } }
@media (prefers-reduced-motion: reduce) { .bk-chg { animation: none; background-color: rgba(245, 197, 66, 0.18); } }
.bk-ago { margin: 10px 0 0; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--muted, #8b8d98); text-align: center; }
.bk-ago::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #22c55e; vertical-align: 1px; }
.bk-ago.is-stale::before { background: #f5b23c; }
/* ---------------------------------------------------------------- bkTicket: the living pass (point 16c, 29 Nov 2026)
   A holographic card in the colour of the day (--h, bkTicketDayHue), the photo and the one ticket QR code on a white
   panel at full contrast (no clock, no rotating code: Christian, 29 Nov 2026). Only transform and opacity animate
   (composited: 60 fps on older phones). Sized to fit a 390 x 844 phone with the tab bar: photo, name, check-in, QR code,
   short code and the Wallet buttons on one screen. Reduced motion: the sheen stands still. Unfolded (two panes): who on
   the left, the QR code on the right, nothing on the hinge. */
.bk-ticket.is-live { --lp-ink: #fff; position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 12px; justify-items: stretch; align-content: start; padding: 16px 16px 18px;
	border: 0; border-radius: var(--r-2xl, 28px); color: var(--lp-ink); text-align: center; background: hsl(var(--h) 62% 26%);
	box-shadow: 0 18px 50px -18px hsl(var(--h) 80% 30% / 0.65), inset 0 0 0 1px rgba(255, 255, 255, 0.16); contain: layout paint; }
.card > .bk-ticket.is-live { padding: 16px 16px 18px; background: hsl(var(--h) 62% 26%); }
.bk-lp-holo { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; pointer-events: none;
	background: linear-gradient(150deg, hsl(var(--h) 78% 38%) 0%, hsl(calc(var(--h) + 38) 72% 26%) 52%, hsl(calc(var(--h) - 34) 74% 22%) 100%); }
.bk-lp-holo i { position: absolute; inset: -60%; will-change: transform; backface-visibility: hidden; }
/* The guilloche: fine rings that turn slowly (a printed pass can not move) */
.bk-lp-pat { opacity: 0.55; background:
	repeating-radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.075) 0 1px, transparent 1.5px 11px),
	repeating-conic-gradient(from 0deg at 50% 50%, rgba(255, 255, 255, 0.05) 0deg 2deg, transparent 2deg 9deg);
	animation: bk-lp-turn 48s linear infinite; }
/* The sheen: a band of light with a rainbow edge that sweeps over the card */
.bk-lp-sheen { opacity: 0.9; mix-blend-mode: soft-light; background: linear-gradient(112deg, transparent 38%, rgba(255, 255, 255, 0.55) 46%, hsl(calc(var(--h) + 150) 100% 72% / 0.55) 50%, hsl(calc(var(--h) + 260) 100% 70% / 0.45) 53%, transparent 61%);
	animation: bk-lp-sweep 5.5s cubic-bezier(.45, .05, .55, .95) infinite alternate; }
@keyframes bk-lp-turn { to { transform: rotate(360deg); } }
@keyframes bk-lp-sweep { from { transform: translate3d(-28%, -8%, 0); } to { transform: translate3d(28%, 8%, 0); } }
.bk-lp-a, .bk-lp-b { display: grid; gap: 10px; justify-items: center; min-width: 0; }
.bk-lp-day { justify-self: start; display: inline-flex; align-items: center; min-height: 22px; margin-bottom: 4px; padding: 0 9px; border-radius: 999px; background: hsl(var(--h) 90% 88%); color: hsl(var(--h) 70% 18%);
	font: 700 11px/1 var(--mono, ui-monospace, monospace); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
.bk-lp-t { margin: 0; font: 700 12px var(--mono, ui-monospace, monospace); letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.8; }
.bk-lp-id { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 14px; width: 100%; text-align: left; }
.bk-lp-ph { position: relative; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: rgba(255, 255, 255, 0.18); }
.bk-lp-ph > b { font: 800 24px var(--font, inherit); letter-spacing: 0.02em; }
.bk-lp-ph img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); border-radius: 50%; object-fit: cover; }
/* A ring of light that turns around the photo: a cut-out photo on a still card is easy to see */
.bk-lp-ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, #fff, hsl(calc(var(--h) + 120) 100% 75%), transparent 40%, #fff 60%, hsl(calc(var(--h) + 240) 100% 75%), #fff);
	-webkit-mask: radial-gradient(circle, transparent 32px, #000 33px); mask: radial-gradient(circle, transparent 32px, #000 33px); animation: bk-lp-turn 6s linear infinite; will-change: transform; }
.bk-lp-who { display: grid; gap: 1px; min-width: 0; }
.bk-lp-who > b { font-size: var(--fs-xl, 20px); line-height: 1.15; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.bk-lp-who small { font-size: 12.5px; line-height: 1.3; opacity: 0.88; }
.bk-lp-who .bk-lp-ac { font-weight: 700; font-size: var(--fs-sm, 13px); opacity: 1; }
.bk-lp-kid { display: inline-block; padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); font: 700 11px var(--font, inherit); vertical-align: 3px; letter-spacing: 0; }
/* the checks of the day on the pass (bkTicketChecks): icon chips in the Check tool's colours, filled when done */
.bk-lp-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bk-lp-checks li { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px 0 4px; border-radius: 999px; background: rgba(0, 0, 0, .28); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); font-size: var(--fs-sm, 13px); color: #fff; }
.bk-lp-checks i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--c); color: var(--c); font-style: normal; }
.bk-lp-checks svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.bk-lp-checks b { font-weight: 750; }
.bk-lp-checks span { font-weight: 800; font-variant-numeric: tabular-nums; }
.bk-lp-checks .is-done i, .bk-lp-checks .is-free i { background: var(--c); color: #06070b; }
.bk-lp-checks .is-bad { border-color: #ff4d5e; }
.bk-lp-checks .is-bad i { background: #ff4d5e; border-color: #ff4d5e; color: #fff; }
/* The QR code: black on white at full contrast (a page can not turn the screen brighter), a fixed square that gives way
   on a short screen (Safari's bars) so the short code and the Wallet buttons still fit above the tab bar */
.bk-lp-qr { display: grid; place-items: center; width: max(180px, min(66vw, 264px, calc(100dvh - 420px))); aspect-ratio: 1; padding: 6px; border-radius: 18px; background: #fff; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.5); }
.bk-lp-qr img { display: block; width: 100%; height: 100%; }
.bk-ticket.is-live .bk-tk-code b { font-size: 20px; }
.bk-ticket.is-live .bk-tk-code small { color: inherit; opacity: 0.75; }
.bk-ticket.is-live .wbtns { justify-content: center; margin-top: 2px; }
@media (prefers-reduced-motion: reduce) {
	.bk-lp-holo i, .bk-lp-ring { animation: none; }
	.bk-lp-sheen { transform: translate3d(-6%, -2%, 0); }
}
/* Two panes (a book foldable unfolded, a tablet on its side): who left, the QR code right, the hinge between */
html.fold-book .bk-ticket.is-live { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: calc(var(--fold-gap, 0px) + 36px); align-items: center; }
html.fold-book .bk-lp-qr { width: min(40vw, 300px, calc(100dvh - 300px)); }
@media print { .bk-lp-holo { display: none; } .bk-ticket.is-live { background: #fff; color: #000; box-shadow: none; border: 1px solid #000; } }
