/*
 * cx-slides.css — the look of the slides pages (Exocue's audience pages)
 *
 * Linked by those pages after cx-base.css. Every rule here answers a data-cx
 * word; cx-slides.js does the rest of what each word asks, and cx-render
 * (B.3.175) loads it wherever a page uses one:
 *
 *   grow             body: the page grows with the slide's words and scrolls
 *                    as one, rather than being a fixed screen-high column
 *   thumb            an image render: small in the top corner, dimmed; a tap
 *                    brightens or dims it
 *   pictures         anything: shown only when the org allows slide pictures
 *   slides-download  where the "Download the slide images" link goes
 *   lookback         where Up, Down and the band back to the live slide go
 *   glasses          a pane: the words for smart glasses, as large as fit
 *   room             a room's start page (room.html, which has no cx-render)
 *   nearby           the talks near a phone, to pick one (exocue/here/, B.1.1)
 *
 * B.1.0 (1 December 2026): gathered from the pages' own style blocks —
 * slides.html B.2.10, slides-back.html B.1.3, slide-show.html B.2.4,
 * slide-show-back.html B.1.1, glasses.html B.1.0 and room.html B.1.9.
 */

:root {
    --cx-slides-version: 'B.1.6';
}

/* B.1.2: read by screen readers, not shown — the status lines and the comma
 * between a choice's name and its note (cx-slides.js B.1.5). */
.cx-vh {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── grow ────────────────────────────────────────────────────────────────
 * body col is a fixed-height, unscrolled column (cx-base), which made the
 * text and the descriptions two scroll panes of their own. Here the page
 * grows with its words instead: at least the screen's height, so a short
 * slide still sits in the middle, and longer than that when the slide is.
 * Each new slide starts at the page's top (cx-slides.js). */
body[data-cx~="grow"] {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
    padding-bottom: 5rem;           /* room above the corner controls */
}
/* The descriptions and any other text take their own height; st takes the
 * rest. In this order, so st wins if it is ever written st.text. */
body[data-cx~="grow"] [data-cx*=".text"] { flex: 0 0 auto !important; }
body[data-cx~="grow"] [data-cx~="st"]    { flex: 1 0 auto !important; }
/* The corner controls stay at the bottom of the screen, not of the page. */
body[data-cx~="grow"] [data-cx~="language-menu"]:not([data-cx^="pane"] *),
body[data-cx~="grow"] [data-cx~="buttons"]:not([data-cx^="pane"] *) {
    position: fixed;
    z-index: 6;
}

/* ── thumb ───────────────────────────────────────────────────────────────
 * Laid over the top right corner: small, and kept there as the page
 * scrolls. !important because cx-render sizes an image render inline
 * (height=, flex). :not(img), because cx-render copies the wrapper's words
 * onto the <img> it puts inside. */
[data-cx~="thumb"]:not(img) {
    position: fixed !important;
    top: max(0.75rem, env(safe-area-inset-top));
    right: max(0.75rem, env(safe-area-inset-right));
    width: min(26vw, 220px) !important;
    height: auto !important;
    max-height: 30vh;
    flex: none !important;
    z-index: 5;
    box-shadow: 0 2px 10px rgb(0 0 0 / 0.5);   /* cx-colour-ok — a drop shadow, not a theme colour */
    /* Dimmed to start with, so the words under it still read; tapped, it
     * shows at full strength, and tapped again, dimmed again. */
    opacity: 0.45;
    cursor: pointer;
    transition: opacity 0.2s;
}
[data-cx~="thumb"]:not(img) > img { width: 100%; height: auto; max-height: 30vh; display: block; }
[data-cx~="thumb"]:not(img).cx-thumb-bright { opacity: 1; }
/* B.1.2: reached by keyboard or switch too (cx-slides.js B.1.5). */
[data-cx~="thumb"]:not(img):focus-visible { outline: 3px solid var(--cx-accent, #CC4B4B); outline-offset: 2px; }   /* cx-colour-ok — the var's fallback only */
/* No slide picture yet: no empty box in the corner. */
[data-cx~="thumb"]:not(img):not(:has(img[src])) { display: none; }

/* ── pictures ────────────────────────────────────────────────────────────
 * Only when the org allows slide pictures: "slidesPictures": true in its
 * config.json (Exocue's Settings, cx-auth B.2.38). cx-slides.js reads it
 * once as the page opens and marks body; hidden until it says so. */
body:not(.cx-pictures-ok) [data-cx~="pictures"] { display: none !important; }

/* ── slides-download ─────────────────────────────────────────────────────
 * The slide images to download, once the talk is over, when the presenter
 * offers them — above the corner controls. The link is built inside the
 * element. */
.cx-slides-download {
    position: fixed; z-index: 7; left: 50%; transform: translateX(-50%);
    bottom: calc(4.5rem + env(safe-area-inset-bottom));
    padding: 0.8rem 1.2rem; border-radius: 0.6rem; font-size: 1.1rem; text-decoration: none;
    background: var(--cx-accent, #CC4B4B); color: #fff;              /* cx-colour-ok — white on the accent */
    box-shadow: 0 2px 10px rgb(0 0 0 / 0.5);                         /* cx-colour-ok — a drop shadow */
}
.cx-slides-download[hidden] { display: none; }

/* ── lookback ────────────────────────────────────────────────────────────
 * Up and Down at the right-hand edge, half way down, where a thumb reaches;
 * the band back to the live slide at the top. */
.cx-lookback-nav {
    position: fixed; z-index: 7; right: max(0.5rem, env(safe-area-inset-right)); top: 50%;
    transform: translateY(-50%); display: flex; flex-direction: column; gap: 0.75rem;
}
.cx-lookback-nav button {
    width: 3.2rem; height: 3.2rem; border-radius: 50%; font-size: 1.3rem; cursor: pointer;
    border: 2px solid var(--cx-border, currentColor); color: var(--cx-text);
    background: var(--cx-bg, #000); opacity: 0.7;                    /* cx-colour-ok — the var's fallback only */
}
.cx-lookback-nav button:disabled { opacity: 0.2; cursor: default; }
.cx-lookback-nav button:focus-visible { outline: 3px solid var(--cx-accent, #CC4B4B); }   /* cx-colour-ok — the var's fallback only */
.cx-lookback-band {
    position: fixed; z-index: 8; top: max(0.5rem, env(safe-area-inset-top)); left: 50%;
    transform: translateX(-50%); max-width: calc(100vw - 2rem);
    padding: 0.6rem 1.1rem; border: 0; border-radius: 0.6rem; font: inherit; font-size: 1rem; cursor: pointer;
    background: var(--cx-accent, #CC4B4B); color: #fff;            /* cx-colour-ok — white on the accent */
    box-shadow: 0 2px 10px rgb(0 0 0 / 0.5);                       /* cx-colour-ok — a drop shadow */
}
.cx-lookback-band[hidden] { display: none; }
/* With a thumbnail in the top right corner, the band keeps clear of it. */
body:has([data-cx~="thumb"]:not(img)) .cx-lookback-band {
    left: max(0.5rem, env(safe-area-inset-left)); transform: none;
    max-width: calc(100vw - min(26vw, 220px) - 2.5rem);
}

/* ── glasses ─────────────────────────────────────────────────────────────
 * The slide's words for smart glasses. Black is what such a display shows
 * as see-through, so the page is pure black, always (not the theme's). The
 * words are antique white (--cx-cream), not pure white, and kept clear of
 * the edges, where such displays blur and clip: 8% of the height and of the
 * width all round. Inside that, cx-slides.js sets all the words as large as
 * fit without scrolling — the first element at full size, the others (the
 * picture descriptions) at 0.7 of it. */
html:has([data-cx~="glasses"]),
body:has([data-cx~="glasses"]) {
    background: #000 !important;      /* cx-colour-ok — black is see-through on glasses */
}
body:has([data-cx~="glasses"]) { text-shadow: none; }
[data-cx~="glasses"] {
    position: fixed;
    inset: 8vh 8vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.6em;
    overflow: hidden;
    background: transparent !important;
}
[data-cx~="glasses"] > [data-cx] {
    flex: none !important;
    --cx-color: var(--cx-cream);
    line-height: 1.25;
    overflow-wrap: break-word;
}

/* ── room ────────────────────────────────────────────────────────────────
 * A room's start page, where its QR code leads (room.html). cx-slides.js
 * builds what is inside: the room's name, a note, the language, and a
 * button for each way to follow the talk. */
[data-cx~="room"] {
    width: 100%; max-width: 30rem; margin: 0 auto; padding: 2rem 1.25rem; box-sizing: border-box;
    display: flex; flex-direction: column; gap: 1rem;
}
[data-cx~="room"] .cx-room-name { font-size: 1.6rem; margin: 0; }
[data-cx~="room"] .cx-room-note { color: var(--cx-text-dim); margin: 0; }
/* B.1.3: what is on now, under the room's name (cx-slides.js B.1.6). */
[data-cx~="room"] .cx-room-now { font-size: 1.15rem; margin: 0; }
[data-cx~="room"] .cx-room-now[hidden] { display: none; }
[data-cx~="room"] .cx-room-choices { display: flex; flex-direction: column; gap: 0.75rem; }
[data-cx~="room"] .cx-room-choice {
    display: block; padding: 1.1rem 1rem; border-radius: 0.6rem; text-decoration: none;
    font-size: 1.25rem; text-align: center; color: var(--cx-text);
    border: 2px solid var(--cx-border, currentColor);
}
[data-cx~="room"] .cx-room-choice:focus,
[data-cx~="room"] .cx-room-choice:hover { outline: 3px solid var(--cx-accent, #CC4B4B); }   /* cx-colour-ok — the var's fallback only */
[data-cx~="room"] .cx-choice-name { display: block; }
[data-cx~="room"] .cx-room-choice-note { display: block; margin-top: 0.3rem; font-size: 0.95rem; color: var(--cx-text-dim); }
[data-cx~="room"] .cx-room-lang { display: flex; flex-direction: column; gap: 0.35rem; font-size: 1rem; }
[data-cx~="room"] .cx-room-lang[hidden] { display: none; }
[data-cx~="room"] .cx-room-lang select { font: inherit; font-size: 1.1rem; padding: 0.6rem; }
[data-cx~="room"] .cx-room-brand { margin-top: 1.5rem; font-size: 0.8rem; color: var(--cx-text-dim); text-align: center; }

/* ── nearby (B.1.1) ──────────────────────────────────────────────────────
 * contexts.live/exocue/here: the talks near a phone, each a button. The
 * same shape as a room's start page. */
[data-cx~="nearby"] {
    width: 100%; max-width: 30rem; margin: 0 auto; padding: 2rem 1.25rem; box-sizing: border-box;
    display: flex; flex-direction: column; gap: 1rem;
}
[data-cx~="nearby"] .cx-near-title { font-size: 1.6rem; margin: 0; }
[data-cx~="nearby"] .cx-near-note,
[data-cx~="nearby"] .cx-near-said { color: var(--cx-text-dim); margin: 0; }
/* B.1.2: no display:none when empty — a status line hidden that way is not read out
 * on some phones when it fills. Empty, it takes no room anyway. */
[data-cx~="nearby"] .cx-near-list { display: flex; flex-direction: column; gap: 0.75rem; }
[data-cx~="nearby"] .cx-near-find,
[data-cx~="nearby"] .cx-near-talk {
    display: block; width: 100%; padding: 1.1rem 1rem; border-radius: 0.6rem; cursor: pointer;
    font: inherit; font-size: 1.25rem; text-align: center; color: var(--cx-text);
    background: transparent; border: 2px solid var(--cx-border, currentColor);
}
[data-cx~="nearby"] .cx-near-find { background: var(--cx-brand); border-color: var(--cx-brand); color: var(--cx-on-brand); }
[data-cx~="nearby"] .cx-near-find:disabled,
[data-cx~="nearby"] .cx-near-talk:disabled { opacity: 0.5; cursor: default; }
[data-cx~="nearby"] .cx-near-find:focus-visible,
[data-cx~="nearby"] .cx-near-talk:focus-visible,
[data-cx~="nearby"] .cx-near-talk:hover { outline: 3px solid var(--cx-accent, #CC4B4B); }   /* cx-colour-ok — the var's fallback only */
[data-cx~="nearby"] .cx-choice-name { display: block; }
[data-cx~="nearby"] .cx-near-talk-where { display: block; margin-top: 0.3rem; font-size: 0.95rem; color: var(--cx-text-dim); }
/* B.1.4: the list as a programme (cx-slides.js B.1.8) — the org once, over its talks;
 * each talk left-aligned, its room small above its title. */
[data-cx~="nearby"] .cx-near-org { font-size: 1.15rem; font-weight: 600; margin: 0.75rem 0 -0.25rem; }
[data-cx~="nearby"] .cx-near-list .cx-near-talk { text-align: left; }
[data-cx~="nearby"] .cx-near-room {
    display: block; margin-bottom: 0.2rem; font-size: 0.8rem; letter-spacing: 0.08em;
    text-transform: uppercase; color: var(--cx-text-dim);
}
/* B.1.6: the lines after the title — the speakers, at best (cx-slides.js B.1.12). */
[data-cx~="nearby"] .cx-near-more { display: block; margin-top: 0.2rem; font-size: 0.9rem; color: var(--cx-text-dim); }
/* B.1.5: how far, on a line of its own, plain to see (cx-slides.js B.1.10). */
[data-cx~="nearby"] .cx-near-far { display: block; margin-top: 0.35rem; font-size: 1rem; font-weight: 600; color: var(--cx-brand); }
[data-cx~="nearby"] .cx-near-brand { margin-top: 1.5rem; font-size: 0.8rem; color: var(--cx-text-dim); text-align: center; }
