/* ── Residency picks: "Where to Sit for {show}" (views/sections/residency-picks.php, ResidencyPicks::render) ────────────
   Keith, 2026-11-17 / 11-20. The tables are the Best Seats guide's (themes/best-seats-guide/lib/styles.css .bsg-table)
   without its price and More columns. Headings and paragraph text stay the design system's (h2 / h3,
   [data-format='content']). Loaded only on a seating page that shows a residency (config/init.php). */
.rsd { --rsd-ink: #101828; --rsd-line: #E4E7EC; --rsd-muted: #5F6B7A; --rsd-navy: var(--color-primary, #002448); --rsd-tint: var(--bg-light-blue, #EEF4FF); }
.rsd-head { display: flex; align-items: center; gap: 14px; }
/* Spacing (Keith, 2026-11-20: "the spacing here is still a problem"). The h2 keeps the design system's bottom margin
   (half a --scene-gap, 18px: the space every scene heading has before its first paragraph). In this row that margin
   only pushed the heading up beside the avatar and left the avatar 4px off the lead, so the avatar carries the same
   margin: the two stay centred on each other, and the lead starts one design-system step under the row. The avatar is a
   192px square baked in the tool (ResidencyPicks::saveImage), shown small. */
.rsd-avatar { flex: 0 0 auto; width: 48px; height: 48px; margin-bottom: calc(var(--scene-gap, 36px) * 0.5); border-radius: 10px; object-fit: cover; background: var(--color-lightGrey, #E4E7EC); box-shadow: 0 0 0 1px rgba(16, 24, 40, .08); }
.rsd-head > h2 { min-width: 0; }
.rsd-lead { max-width: 768px; }

/* the picks and avoid tables */
.rsd-table { width: 100%; border-collapse: collapse; font-size: 15px; color: var(--rsd-ink); table-layout: fixed; margin: 28px 0 32px; }
.rsd-table thead { border-bottom: 0; }
.rsd-table thead th { text-align: start; vertical-align: bottom; font-size: 13px; font-weight: 700; color: var(--rsd-navy); padding: 0 16px 10px 0; border-bottom: 1px solid #C9D0DA; }
.rsd-table tbody th, .rsd-table tbody td { text-align: start; vertical-align: top; padding: 18px 16px 18px 0; border-bottom: 1px solid var(--rsd-line); line-height: 1.45; font-weight: 400; }
.rsd-table tbody tr > :last-child, .rsd-table thead tr > :last-child { padding-right: 0; }
/* one column grid for both tables (Keith, 2026-11-20: "the tables need to line up … people will scan vertically"):
   what it is | the seats to buy | why, at the same widths, set on the <col>s so nothing in a cell can move them */
.rsd-table col.rsd-col1 { width: 26%; }
.rsd-table col.rsd-col2 { width: 27%; }
.rsd-table col.rsd-col3 { width: 47%; }
.rsd-table .rsd-c-pri { font-weight: 700; color: var(--rsd-navy); }
.rsd-price { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; color: var(--rsd-muted); }
.rsd-price b { font-weight: 700; color: var(--rsd-ink); }
.rsd-note { margin: -16px 0 28px; font-size: 13px; color: var(--rsd-muted); }
.rsd-graphic { margin: 4px 0 28px; }
.rsd-graphic img { display: block; width: 100%; max-width: 760px; height: auto; aspect-ratio: auto; object-fit: initial; border-radius: 12px; }
/* an animated seat map above the picks table (ResidencyPicks::ANIMATED, 2026-11-23) */
.rsd .rys-bestseats-anim { margin: 28px 0; }
.rsd .rys-bestseats-anim img { display: block; width: 100%; max-width: 800px; height: auto; aspect-ratio: auto; object-fit: initial; border-radius: 12px; }
.rsd .rsd-anim-media { position: relative; max-width: 800px; }
.rsd .rsd-anim-media picture { display: block; }
/* Pause / Play: a small dark pill on the map's bottom-left corner (the map's own CTA sits bottom-right) */
.rsd .rsd-anim-toggle { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 6px 12px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; background: rgba(16, 24, 40, .72); color: #fff; font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1; cursor: pointer; }
.rsd .rsd-anim-toggle:hover { background: rgba(16, 24, 40, .88); }
.rsd .rsd-anim-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.rsd .rsd-anim-toggle svg { fill: currentColor; flex: none; }
.rsd .rsd-anim-toggle .rsd-anim-play, .rsd .rsd-anim-toggle.is-paused .rsd-anim-pause { display: none; }
.rsd .rsd-anim-toggle.is-paused .rsd-anim-play { display: block; }
.rsd .rys-bestseats-anim figcaption { max-width: 800px; margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--rsd-muted); }
.rsd-area { display: block; font-weight: 600; }
.rsd-area a { color: inherit; text-decoration: none; }
/* the seats link to their section page, but they don't look clickable (Keith, 2026-11-20: those pages are dead ends):
   plain text, even on hover (the site's a:hover underlines and turns links black) */
.rsd-area a:hover, .rsd-area a:focus { color: inherit; text-decoration: none; }
.rsd-rows { display: block; margin-top: 2px; font-size: 14px; color: var(--rsd-muted); }
.rsd-table .rsd-c-why p { margin: 0; }

/* Upcoming Dates: a month calendar beside the picked date's showtimes */
.rsd-cal { margin: 4px 0 8px; }
.rsd-cal-sub { margin: 4px 0 14px; font-size: 14px; color: var(--rsd-muted); }
.rsd-cal-wrap { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
.rsd-cal-month { border: 1px solid var(--rsd-line); border-radius: 12px; padding: 12px; background: #fff; }
.rsd-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.rsd-cal-label { font-weight: 700; color: var(--rsd-navy); }
.rsd-cal-nav { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--rsd-line); border-radius: 8px; background: #fff; color: var(--rsd-navy); cursor: pointer; }
.rsd-cal-nav:hover:not(:disabled) { border-color: var(--rsd-navy); }
.rsd-cal-nav:disabled { opacity: .35; cursor: default; }
.rsd-cal-nav [data-is='icon'] { --icon-size: 18px; }
.rsd-cal-grid { width: 100%; border-collapse: collapse; table-layout: fixed; }
.rsd-cal-grid thead { border-bottom: 0; }
.rsd-cal-grid th { padding: 4px 0; font-size: 12px; font-weight: 600; color: var(--rsd-muted); text-align: center; }
.rsd-cal-grid td { padding: 2px; text-align: center; vertical-align: middle; }
.rsd-cal-day { display: inline-grid; place-items: center; width: 100%; max-width: 42px; aspect-ratio: 1 / 1; border-radius: 10px; font-size: 14px; line-height: 1; color: #98A2B3; }
button.rsd-cal-day { padding: 0; border: 0; font: inherit; font-size: 14px; cursor: pointer; }
.rsd-cal-day.has-shows { background: var(--rsd-tint); color: var(--rsd-navy); font-weight: 700; }
.rsd-cal-day.has-shows:hover { box-shadow: inset 0 0 0 2px var(--rsd-navy); }
.rsd-cal-day.is-sel, .rsd-cal-day.is-sel:hover { background: var(--rsd-navy); color: #fff; box-shadow: none; }
.rsd-cal-day:focus-visible, .rsd-cal-nav:focus-visible, .rsd-cal-time:focus-visible { outline: 3px solid var(--rsd-navy); outline-offset: 2px; }
.rsd-cal-date { margin: 4px 0 10px; font-weight: 700; color: var(--rsd-ink); }
.rsd-cal-times ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rsd-cal-time { display: inline-block; padding: 9px 16px; border: 1px solid var(--rsd-navy); border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--rsd-navy); text-decoration: none; }
.rsd-cal-time:hover { background: var(--rsd-navy); color: #fff; text-decoration: none; }
.rsd-all { margin: 22px 0 8px; }

/* an internal user's preview (?residency_preview=) */
.rsd-preview { margin: 0 0 16px; padding: 10px 14px; border-left: 4px solid #F79009; border-radius: 8px; background: #FEF0C7; color: #7A2E0E; font-size: 14px; line-height: 1.45; }
.rsd-preview ul { margin: 4px 0 0; padding-left: 18px; }

/* phones: each table row a card with the column name over each cell (the guide's tables do the same); the calendar
   over the showtimes */
@media (max-width: 640px) {
   .rsd-head { gap: 12px; }
   .rsd-avatar { width: 44px; height: 44px; }
   .rsd-table, .rsd-table tbody, .rsd-table tr, .rsd-table th, .rsd-table td { display: block; width: auto !important; }
   .rsd-table thead { display: none; }
   .rsd-table tbody tr { padding: 16px 0; border-bottom: 1px solid var(--rsd-line); }
   .rsd-table tbody th, .rsd-table tbody td { border: 0; padding: 0 0 10px; }
   .rsd-table tbody tr > :last-child { padding-bottom: 0; }
   .rsd-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--rsd-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
   .rsd-table .rsd-c-pri { font-size: 16px; }
   .rsd-table col.rsd-col1, .rsd-table col.rsd-col2, .rsd-table col.rsd-col3 { width: auto; }
   .rsd-note { margin-top: -8px; }
   .rsd-cal-wrap { grid-template-columns: minmax(0, 1fr); gap: 16px; }
   .rsd-cal-day { max-width: 44px; }
   .rsd-all a { display: block; text-align: center; }
}

/* Several residencies at one venue (2026-11-21, ResidencyPicks::renderSeating): the design system's subtle toggles
   (te.3's Similar / Upcoming Events) switch the panels; each tab says when that residency plays next. A panel is hidden
   with the hidden attribute, so nothing here may set its display. */
.rsd-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.rsd-tabs [data-is='btn'].btn-toggle { height: auto; min-height: 36px; line-height: 1.3; padding: 7px 14px; white-space: nowrap; }
.rsd-tab-when { margin-left: 6px; font-weight: 400; color: var(--rsd-muted); }
.rsd-panel[hidden] { display: none; }

/* A run that's over, or back and not yet confirmed (2026-11-24, ResidencyPicks::run / renderFolded): the same block,
   collapsed in a native <details> at the bottom of the page. Built like seating-areas' zone chart groups
   (.sa-seating-chart-collapse): the heading row is the summary, the design system's chevron turns when it opens. */
.rsd-folded > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
/* Safari ignored list-style on summary until 16 (our floor is 14.1): without this it shows the triangle AND the chevron */
.rsd-folded > summary::-webkit-details-marker { display: none; }
.rsd-folded > summary .rsd-head { flex: 1 1 auto; min-width: 0; }
.rsd-folded > summary [data-is='icon'] { flex: 0 0 auto; margin-bottom: calc(var(--scene-gap, 36px) * 0.5); color: var(--text-medium, #4b5563); transition: transform .15s ease; }
.rsd-folded[open] > summary [data-is='icon'] { transform: rotate(180deg); }
.rsd-folded > summary:focus-visible { outline: 3px solid var(--rsd-navy); outline-offset: 4px; border-radius: 8px; }
.rsd-over { margin: 0 0 16px; font-size: 14px; color: var(--rsd-muted); }
