/* (15 November, v1, fix 5) SUPERSEDED IN PART: the owner chose the globe at the bottom LEFT (a 44 px round button like the sun button, with a faded rest look); the glass strip below is gone, #cuebar is now only a holder (see the fix 5 block). The history that follows is kept for the record. */
/* (12 November, cue v7: the bottom strip) A slim glass strip along the bottom edge of every page: the home of the Cue globe (at its left end) and of the dynamic UI that comes later (the empty slot, .cb-slot).
   The owner: "Keep a bottom horizontal strip separate for dynamic UI ... an empty slot ... a CUE logo at the bottom left ... a slightly constant bottom bar ... so it wouldn't hamper the existing set of UI and UX".
   34 px of free floor exists on every page (the lowest control ends at y = 765 of 800), so the strip is 34 px tall (plus the safe area), takes no pointer events itself (only the Cue button does) and never moves, covers or resizes anything.
   Markup: static in index.html, the first child of #ui, so every other control of #ui paints above it. Script: js/cue/cuebar.js (the arrival and window.__cueBar). The Cue button and the island are js/cue/cue.js and css/cue/cue.css.
   Every rule here starts "body #ui > #cuebar:not(#zz-)": the showroom's own "#ui > [id]" rules (fade, hide, transition) have two ids, these have three and win. */

/* ---------- (15 November, v1, fix 5) the globe at the bottom LEFT: the strip's glass is gone; #cuebar is a zero-height, pointer-less holder at the screen's foot (so the __cueBar slots and every hide rule below still work) ----------
   The seat is the 44 px round home of the Cue button: its left edge on the Back button's column (--edge-1 + safe-left), its centre on the bottom control row's centre line (the same centre as the dial and the sun button: --pad + 3.8rem + safe-bottom above the screen's foot),
   mirroring the sun and dial on the right. The arrival is a short fade (no slide: the island's geometry reads the button's box). */
body #ui > #cuebar:not(#zz-) {
  --cb-o: 1; --cue-seat: 44px;
  --cue-disc: rgba(72, 72, 78, .56); --cue-disc-on: rgb(72, 72, 78); --cue-ring: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 1px 2px rgba(0, 0, 0, .22); --cue-ring-on: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 1px 2px rgba(0, 0, 0, .30);   /* the dark pages: like the sun button's grey disc, see-through at rest */
  --cue-g: .68; --cue-gs: .78;   /* the globe at rest: opacity, saturation */
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; box-sizing: border-box; margin: 0; height: 0; padding: 0;
  display: block; pointer-events: none; opacity: 0; visibility: visible; transition: opacity .42s var(--ease-out, cubic-bezier(.22, 1, .36, 1)), visibility 0s; }
body #ui > #cuebar.on:not(#zz-) { opacity: 1; }
/* the light pages: the paper levels, and the four map levels while the sun dial is on Day (the same switch as the sun button: css/tokens.css, body.glass-day): white, like the sun button */
body:is([data-level="home"], [data-level="choose"], [data-level="walk"], [data-level="price"], [data-level="summary"]) #ui > #cuebar:not(#zz-),
body.glass-day:is([data-level="century"], [data-level="city"], [data-level="market"], [data-level="area"]) #ui > #cuebar:not(#zz-) {
  --cue-disc: rgba(255, 255, 255, .62); --cue-disc-on: #fff; --cue-ring: 0 0 0 .5px rgba(22, 22, 27, .10), 0 1px 2px rgba(22, 22, 27, .10); --cue-ring-on: var(--mf-sh-thumb, 0 0 0 .5px rgba(22, 22, 27, .10), 0 1px 2px rgba(22, 22, 27, .14), 0 2px 6px -2px rgba(22, 22, 27, .18)); }

/* the seat: where the 44 px button lives */
#cuebar .cb-seat { position: absolute; left: calc(var(--edge-1, var(--pad, 24px)) + var(--safe-l, 0px)); bottom: calc(var(--pad, 24px) + 3.8rem + var(--safe-b, 0px) - var(--cue-seat) / 2); width: var(--cue-seat); height: var(--cue-seat); pointer-events: none; opacity: var(--cb-o); transition: opacity .2s var(--ease-out, cubic-bezier(.22, 1, .36, 1)); }
/* the slots: empty and invisible, kept for dynamic UI (window.__cueBar.set(x, "left" | "right")): a 34 px band along the foot (the left slot starts clear of the globe). They take no taps while empty */
#cuebar .cb-slot { position: absolute; bottom: var(--safe-b, 0px); height: 34px; min-width: 0; display: flex; align-items: center; gap: 8px; pointer-events: none; opacity: var(--cb-o); transition: opacity .2s var(--ease-out, cubic-bezier(.22, 1, .36, 1)); }
#cuebar .cb-slot-l { left: calc(var(--edge-1, var(--pad, 24px)) + var(--safe-l, 0px) + 56px); justify-content: flex-start; }
#cuebar .cb-slot-r { right: calc(var(--safe-r, 0px) + 12px); justify-content: flex-end; }
#cuebar .cb-slot.has { pointer-events: auto; }


/* gone: while the moment bar plays, under an open sheet, drawer, quick answers or the attract screen (the Begin flight included), in a story's letterbox, and on the lounge TV (no touch there, no Cue).
   (#ui itself fades under a sheet, quick answers, the drawer and the attract screen, but it takes no taps from its children only if they set none: the Cue button does, so the strip is hidden outright.) */
body:has(> #ui > #mbar.on) #ui > #cuebar:not(#zz-),
body:has(> :is(#sheet.on, #ask-ov.on, #drawer.on, #attract.on, #attract.ux-dismiss)) #ui > #cuebar:not(#zz-),
body.cine #ui > #cuebar:not(#zz-) { --cb-o: 0; visibility: hidden; pointer-events: none; transition: opacity .2s var(--ease-out, cubic-bezier(.22, 1, .36, 1)), visibility 0s linear .2s; }
html.tv #cuebar { display: none !important; }

/* the small "Sample content / Sample data" flag stays at the foot's LEFT end (fix 5: the globe now sits above it, same column), its left edge on the page's left gutter, centred 17 px above the screen's foot (css/ux/chrome.css puts it at bottom: .6rem; that file is not edited). The flag keeps its own glass, its own text and its own fade rules.
   (15 November, v1) Not on the lounge TV: html.tv hides the strip (above), and the flag stayed 20 px lower and was cropped at the screen's edge. cuebar.js runs before js/app.js sets html.tv (a module, so it is deferred), so the guard is here, not in the script. */
html:not(.tv) body.has-cuebar:not(#zz-) #sampleflag { left: calc(var(--edge-1, var(--pad, 24px)) + var(--safe-l, 0px)); right: auto; top: auto; bottom: calc(var(--safe-b, 0px) + 17px); translate: 0 50%; z-index: 8; }

/* reduced motion: no slide, plain short fades */
@media (prefers-reduced-motion: reduce) {
  body #ui > #cuebar:not(#zz-) { transition: opacity .2s linear !important; }
  #cuebar .cb-seat, #cuebar .cb-slot { transition: opacity .2s linear !important; }
}
