/* BokBok's pre-order wheel (wheel.js): the day and the time, side by side on the sheet, the pick held in a ticket band.
   Checkout's white sheet, in site.css's colours (--red, --ink, --muted) and type (--display for the picked time). */

/* One row's height, the one source for the CSS here, for wheel.js (it reads it once per wheel) and for a page that tucks the
   wheel under its label: a thumb's tap. Five rows show, the band holds the middle one. */
:root { --bbw-row: 44px; }

/* No box (the Director, 24 Nov: "just have the time and date wheel instead of it having a border"): the two wheels sit on the
   white sheet and their rows melt into it at the top and bottom. The time gets the wider column, so "As soon as we can" stays on
   one line from a 320 px phone up. A thumb can't select text or flash a tap highlight on it: it is a control, not words to copy. */
.bbw { --split: 44%; position: relative; display: grid; grid-template-columns: var(--split) minmax(0, 1fr); height: calc(5 * var(--bbw-row));
  isolation: isolate; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }

/* The band is a ticket: a white strip raised off the sheet, a thin red edge, and a perforation with two bites where the day
   and the time meet. It sits under the rows, so the picked words ride across it. */
.bbw-band { position: absolute; z-index: 1; left: 0; right: 0; top: calc(2 * var(--bbw-row)); height: var(--bbw-row); overflow: hidden; border-radius: 12px; background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--red), 0 10px 18px -12px rgb(19 19 19 / .5), 0 2px 5px -3px rgb(19 19 19 / .18); }
.bbw-band::before { content: ""; position: absolute; left: var(--split); top: 9px; bottom: 9px; margin-left: -.75px; border-left: 1.5px dashed rgb(135 39 27 / .3); }
.bbw-band i { position: absolute; left: var(--split); width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1.5px var(--red); }
.bbw-band i:first-child { top: -6px; }
.bbw-band i:last-child { bottom: -6px; }

/* Each wheel: the drawn drum underneath, the real (see-through) list on top where the finger is. The drum fades to the sheet's
   white at the top and bottom (a mask, so it melts into whatever the sheet is, with no panel behind it). The column is the time's
   container, so "As soon as we can" can size itself to it. A tap anywhere on the column rolls that row in (wheel.js). */
.bbw-col { position: relative; z-index: 2; min-width: 0; container-type: inline-size; cursor: pointer; }
.bbw-drum { position: absolute; inset: 0; overflow: hidden; perspective: 600px; pointer-events: none;
  -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); }
.bbw-row { position: absolute; left: 0; right: 0; top: calc(2 * var(--bbw-row)); height: var(--bbw-row); display: flex; align-items: center; justify-content: center;
  padding: 0 6px; color: var(--ink); backface-visibility: hidden; }
.bbw-txt { display: inline-flex; align-items: baseline; justify-content: center; gap: 5px; font-weight: 700; font-size: 17px; line-height: 1.1;
  white-space: nowrap; }
/* The picked time in the display type, large: "12:30" with a small "PM". Rows away from the band are drawn smaller. */
.bbw-big .bbw-txt b { font: 400 30px/1 var(--display); letter-spacing: .015em; }
.bbw-big .bbw-txt small, .bbw-big .bbw-txt em { font-size: 12px; font-weight: 700; letter-spacing: .08em; }
/* "As soon as we can" in the same display type as the times, so in the band it outweighs the faded time under it. It fills
   most of its column (the column's width, 100cqi, less the row's padding) up to the times' size: 19 px at 320, 24 px from 390
   up, and still one line on a 256 px screen. 16 px text where a browser has no container units. */
.bbw-asap .bbw-txt { font: 400 16px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
@supports (width: 1cqi) { .bbw-asap .bbw-txt { font-size: min(24px, 11.4cqi); } }

/* The list: the browser's own scroll and snap (native momentum), no scrollbar. It covers only the band and a row each side (the
   middle three rows): a swipe that starts on the outer rows is the sheet's, so a thumb scrolling checkout isn't caught by the
   wheel. A pull past its first or last row goes on to the sheet too (no overscroll-behavior). */
.bbw-list { position: absolute; inset: var(--bbw-row) 0; padding: var(--bbw-row) 0; overflow-x: hidden; overflow-y: scroll; scroll-snap-type: y mandatory;
  overflow-anchor: none; scrollbar-width: none; touch-action: pan-y pinch-zoom; border-radius: 12px; }
.bbw-list::-webkit-scrollbar { display: none; }
.bbw-list.bbw-free { scroll-snap-type: none; } /* while wheel.js rolls it to a row */
/* While the sheet is still moving (a flick's momentum), a touch on the wheel is the sheet's: the lists stop taking it, and keep
   where they are */
.bbw-pass .bbw-list { overflow-y: hidden; }
/* Focus: ink, held off the list, so it never reads as part of the red ticket */
.bbw-list:focus { outline: none; }
.bbw-list:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; } /* 2px + 2px clears the label above (it leaves its last 4px clear) */
.bbw-opt { height: var(--bbw-row); overflow: hidden; scroll-snap-align: center; color: transparent; white-space: nowrap; }

/* A full time (it already holds its limit of orders; the Director, 1 Dec 2026) stays on the wheel but can't be ordered: struck
   through, in the muted ink, with a "Full" tag, so it never rests on colour or the strike alone. The note under the wheel takes
   the line's place when one is picked. */
.bbw-full .bbw-txt b, .bbw-full .bbw-txt small { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.bbw-txt em { align-self: center; padding: 3px 7px; border-radius: 99px; background: rgb(135 39 27 / .12); color: #87271b; line-height: 1; font-style: normal; text-transform: uppercase; }
.bbw-note { min-height: 22px; margin: 10px 0 0; color: #87271b; font-size: 15px; font-weight: 700; line-height: 22px; }
.bbw-line[hidden], .bbw-note[hidden] { display: none; }

/* The line under the wheel: "Delivery on Wed 25 Nov at 12:30 PM". Its words flip like a board; the line keeps its height
   when it is empty ("As soon as we can"), so nothing under it jumps. */
.bbw-line { display: flex; flex-wrap: wrap; column-gap: .3em; min-height: 22px; margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 22px; }
.bbw-seg { position: relative; height: 22px; overflow-x: visible; overflow-y: clip; }
.bbw-seg > span { display: block; white-space: nowrap; }
.bbw-seg > .bbw-out { position: absolute; top: 0; left: 0; }
.bbw-seg:nth-child(3), .bbw-seg:nth-child(5) { color: var(--ink); font-weight: 700; }
.bbw-live { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* wheel.js draws every frame itself: no CSS transitions on its parts (site.css's motion-off rule would otherwise turn each
   frame's transform into a throwaway .01ms transition) */
.bbw *, .bbw-line * { transition-property: none; }
