/* CAE lightbox items — the postcard / tile side of the `lightbox` behaviour (assets/interact/media-lightbox.js).
 *
 * 2026-10-10, ClickUp 869f13bf1 (Kate: "Use this for ALL the Gallery popups across the site: Media, Program pages, History
 * pages"): the <dialog class="cae-lightbox"> overlay this sheet painted (Figma 21941:81568 well, filmstrip, amber arrows and
 * close, caption year/text, credit line, white caption links, timeline thumb hover and year tooltip) is RETIRED with the
 * dialog itself. Every gallery now opens Kate's lightbox, assets/js/cae-gallery-lightbox.js, which carries its own styles.
 * What stays is the opener: the live postcard/tile cursor, its lift and focus ring. */

/* ── the postcard (unchanged behaviour, MOVED here) ─────────────────────────────────────────
 * These five rules are lifted VERBATIM out of assets/interact/select-one-of-n.css, where the
 * lightbox's chrome had been parked because this behaviour rides the select-one-of-N engine.
 * Riding the engine is about SCRIPT enqueue, not about paint: the tabs stylesheet was carrying
 * a second behaviour's styling, so a page declaring only `tabs` paid for the lightbox and vice
 * versa. The behaviour table's `style` slot is the existing mechanism for exactly this (it is
 * why `disclosure` has one), so the paint moves to its own sheet and the engine sheet keeps
 * only the engine's.
 *
 * THE SHADOW IS NOW THE ROW'S DECLARED TREATMENT, 2026-09-10 (history2). It never was: the row
 * says `"hover": "lift"`, cae_intsurf_lower_lightbox stamps `data-cae-lightbox-hover="lift"` on
 * the trigger — and MEASURED on the base tip (grep over the whole theme, 1 hit, the PHP that
 * writes it) NO rule anywhere keyed on that attribute. The declaration was inert and the served
 * shadow was this sheet's own hard-coded `0 8px 22px rgba(0,0,0,.18)`, which is not even `lift`'s
 * value (`0 6px 18px rgba(0,0,0,.14)`). So the shadow moves onto the declared value, exactly the
 * way the cardsurf family already works, and KATE SHAWVER's note becomes a row edit rather than a
 * number typed into a stylesheet.
 *
 * KATE SHAWVER, About Us - History (ClickUp 869ew12gd), 2026-09-10 09:48, verbatim: "Can you make
 * the dropshadow on the photo postcards on hover a little softer/more subtle and remove the
 * underline on the View Larger link on hover". Both pages that declare `lightbox` move to
 * `lift-soft` — About/History and Farm Connex History — because Kate's 2026-09-06 ask on Farm
 * Connex (ClickUp 869ew6tcu, verbatim: "Can you look at the notes I left on the history timeline
 * in the main about section and implement those same changes and fixes here?") makes the two one
 * surface, and tools/cae/teamhistory2-derive-timeline.py derives the Farm Connex rows from the
 * About ones — a value that differed between them would break that derivation.
 *
 * THE MOTION IS NOT THE TREATMENT'S. `translateY(-3px) scale(1.02)` is this behaviour's own lift
 * and Kate's 09-04 note m asked for it ("should animate on hover"); she named the DROPSHADOW, so
 * the motion stays on the base rule, ungated, byte-identical in both treatments. Only the shadow
 * is keyed on the declared value. A row that declares no hover gets the motion and no shadow. */
[data-cae-lightbox-item].is-cae-lightbox-live {
  cursor: zoom-in;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

[data-cae-lightbox-item].is-cae-lightbox-live:hover,
[data-cae-lightbox-item].is-cae-lightbox-live:focus-visible {
  transform: translateY(-3px) scale(1.02);
}

[data-cae-lightbox-hover="lift"].is-cae-lightbox-live:hover,
[data-cae-lightbox-hover="lift"].is-cae-lightbox-live:focus-visible {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

/* `lift-soft` — half of `lift`'s own shadow in every component (0 6px 18px .14 -> 0 3px 9px .07),
 * which is also less than half the alpha of the 0 8px 22px .18 this surface actually served. */
[data-cae-lightbox-hover="lift-soft"].is-cae-lightbox-live:hover,
[data-cae-lightbox-hover="lift-soft"].is-cae-lightbox-live:focus-visible {
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.07);
}

[data-cae-lightbox-item].is-cae-lightbox-live:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* NO UNDERLINE IN THE HOVERED STATE — Kate's second sentence above, and it takes two declarations
 * because the underline came from two places. (i) This sheet used to ADD `text-decoration:
 * underline` to the control on hover: that was the line's own invented treatment and it is gone.
 * (ii) MEASURED on the base tip: the control's run carries the DESIGN's own underline as an INLINE
 * style the compiler emits (`<span style="text-decoration: underline;">View Larger</span>`, all 11
 * postcards, both widths), so at rest AND on hover the text read underlined and retiring (i) alone
 * would have changed nothing a reader can see. An inline style is only outranked by `!important`,
 * so that is what this rule spends it on — scoped to the hovered/focused state of a LIVE lightbox
 * item's own control and its runs, and nowhere else. The REST state is untouched: the design's
 * underline still stands when the pointer is away. */
[data-cae-lightbox-item].is-cae-lightbox-live:hover [data-cae-lightbox-control],
[data-cae-lightbox-item].is-cae-lightbox-live:focus-visible [data-cae-lightbox-control] {
  text-decoration: none;
}

[data-cae-lightbox-item].is-cae-lightbox-live:hover [data-cae-lightbox-control] *,
[data-cae-lightbox-item].is-cae-lightbox-live:focus-visible [data-cae-lightbox-control] * {
  text-decoration: none !important;
}

@media (prefers-reduced-motion: reduce) {
  [data-cae-lightbox-item].is-cae-lightbox-live { transition: none; }
  [data-cae-lightbox-item].is-cae-lightbox-live:hover,
  [data-cae-lightbox-item].is-cae-lightbox-live:focus-visible { transform: none; }
}
