/*
 * EE Stream – public /events pages. Loaded after the site's own (seasonal) style.css, so everything else –
 * background, fonts, colours, the header and footer – comes from the site. This only lays out the new parts,
 * using the site's palette.
 */

.stream-content {
  --st-h1: #8DBEE9;
  --st-h2: #ADCDEA;
  --st-text: #D7E1EA;
  --st-muted: #9fb0c3;
  --st-panel: rgba(16, 30, 69, 0.7);
  --st-deep: rgba(5, 12, 32, 0.55);
  --st-line: rgba(141, 190, 233, 0.22);
  --st-input: #003375;
  --st-warn: #f0b84a;
  --st-live: #e91916;
}
/* The site draws every <div> as a panel; inside our content only .st-panel does. */
.stream-content :where(div) { background: none; border-radius: 0; }
.stream-content *, .stream-content *::before, .stream-content *::after { box-sizing: border-box; }
.stream-content [hidden] { display: none !important; }
.stream-content a:link, .stream-content a:visited { color: var(--st-h1); }
.stream-content a:hover { text-decoration: underline; }
.stream-content h2 { margin: 0.2em 0 0.4em; }
.stream-content h3 { margin: 0 0 0.5em; }
.st-muted { color: var(--st-muted); }
.st-center { text-align: center; }

/* Sub-navigation for the stream pages + time-zone toggle */
.stream-subnav { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid var(--st-line); }
.stream-subnav a:link, .stream-subnav a:visited { padding: 6px 12px; border-radius: 5px; color: var(--st-text); text-decoration: none; }
.stream-subnav a:hover { background: rgba(141, 190, 233, 0.12); text-decoration: none; }
.stream-subnav a.active { background: var(--st-input); color: #fff; }
.stream-tz { margin-left: auto; font-size: 0.95em; color: var(--st-muted); display: inline-flex; align-items: center; gap: 4px; }
.stream-tz button, .st-btn {
  font: inherit; color: var(--st-text); background: var(--st-input); border: 1px solid var(--st-line); border-radius: 4px;
  padding: 5px 10px; cursor: pointer; min-height: 32px;
}
.stream-tz button.on { background: #8DBEE9; color: #0b1733; border-color: #8DBEE9; }
.st-btn:hover { background: #0a4589; }
.st-btn.primary { background: #8DBEE9; border-color: #8DBEE9; color: #0b1733; font-weight: bold; }
/* Links styled as buttons: beat the content link colour (and the site's grey link hover). */
.stream-content a.st-btn { display: inline-flex; align-items: center; text-decoration: none; }
.stream-content a.st-btn:link, .stream-content a.st-btn:visited, .stream-content a.st-btn:hover { color: var(--st-text); text-decoration: none; }
.stream-content a.st-btn.primary:link, .stream-content a.st-btn.primary:visited, .stream-content a.st-btn.primary:hover { color: #0b1733; }
.st-btn.primary:hover { background: #b1d4f3; }
.st-btn.danger { border-color: rgba(224, 100, 100, 0.6); }
.st-btn:disabled { opacity: 0.5; cursor: default; }

/* Panels and grid */
.stream-content .st-panel { background: var(--st-panel); border-radius: 5px; padding: 14px 18px; }
.stream-content .st-panel.deep { background: var(--st-deep); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; }
.st-stack > * + * { margin-top: 14px; }

/* Hub header: event + countdown */
.st-hero { text-align: center; padding: 18px; margin-bottom: 14px; }
.st-hero .st-status { display: inline-block; margin-bottom: 6px; padding: 3px 12px; border-radius: 12px; background: var(--st-input); font-weight: bold; letter-spacing: 0.06em; font-size: 0.9em; }
.st-hero .st-status.live { background: var(--st-live); color: #fff; }
.st-count { font-size: 3em; font-variant-numeric: tabular-nums; color: var(--st-h1); margin: 6px 0; line-height: 1.1; }
.st-count-label { color: var(--st-h2); }
.st-when { color: var(--st-muted); }

/* Schedule lists */
.st-sched { list-style: none; margin: 0; padding: 0; }
.st-sched li { display: grid; grid-template-columns: 6.6em 1fr auto; gap: 2px 12px; padding: 7px 6px; border-bottom: 1px solid rgba(141, 190, 233, 0.1); align-items: baseline; }
.st-sched .t { font-variant-numeric: tabular-nums; color: var(--st-h2); }
.st-sched .note { grid-column: 2 / -1; font-size: 0.85em; color: var(--st-muted); }
.st-sched li.past { opacity: 0.55; }
.st-sched li.past .ti { text-decoration: line-through; }
.st-sched li.now { background: rgba(141, 190, 233, 0.16); border-left: 3px solid var(--st-h1); border-radius: 3px; }
.st-sched li.now .ti { font-weight: bold; color: #fff; }
.st-sched li.break .ti { color: var(--st-warn); }
.st-sched li.done { display: block; border-bottom: 0; }
.st-day { margin: 14px 0 4px; color: var(--st-h1); font-size: 1.05em; }
.st-tag { display: inline-block; font-size: 0.75em; padding: 1px 7px; border-radius: 9px; background: var(--st-input); white-space: nowrap; }
.st-tag.live { background: var(--st-live); color: #fff; }

/* Quote */
.st-quote { font-size: 1.35em; line-height: 1.4; margin: 6px 0; }
.st-quote .who { display: block; font-size: 0.75em; color: var(--st-h2); margin-top: 4px; }
.st-quote-list { list-style: none; margin: 0; padding: 0; }
.st-quote-list li { padding: 10px 4px; border-bottom: 1px solid rgba(141, 190, 233, 0.1); display: flex; gap: 10px; align-items: flex-start; }
.st-quote-list li .q { flex: 1; }
.st-quote-list li .meta { display: block; font-size: 0.85em; color: var(--st-muted); margin-top: 3px; }

/* Streams */
.st-streams { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 10px; }
.st-stream { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 5px; overflow: hidden; }
.st-stream iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.st-offline { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.st-chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 14px; background: var(--st-input); }
.st-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #777; }
.st-chip .dot.on { background: var(--st-live); }

/* Forms */
.st-form { display: grid; gap: 10px; }
.st-form label { display: grid; gap: 4px; }
.st-form input, .st-form textarea, .st-form select, .st-filters input, .st-filters select {
  font: inherit; padding: 6px 8px; border-radius: 4px; border: 1px solid transparent; width: 100%; min-height: 34px;
}
.st-form textarea { min-height: 80px; resize: vertical; }
.st-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 12px; }
.st-filters label { display: grid; gap: 3px; flex: 1 1 180px; }
.st-pager { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 12px; }
.st-msg { padding: 8px 12px; border-radius: 4px; background: rgba(111, 209, 138, 0.15); }
.st-msg.err { background: rgba(224, 100, 100, 0.18); }

/* Archive + event page */
.st-events { list-style: none; margin: 0; padding: 0; }
.st-events li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 9px 4px; border-bottom: 1px solid rgba(141, 190, 233, 0.1); }
.st-events li a { font-size: 1.1em; font-weight: bold; }
.st-events .when { color: var(--st-muted); }
.st-year { margin: 16px 0 4px; color: var(--st-h1); }
.st-table { width: 100%; border-collapse: collapse; }
.st-table th, .st-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid rgba(141, 190, 233, 0.12); }
.st-table th { color: var(--st-h2); font-weight: normal; }
.st-table td.num { font-variant-numeric: tabular-nums; text-align: right; }
.st-people { display: flex; flex-wrap: wrap; gap: 6px; }

/* Toasts */
.st-toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.st-toast { background: #101E45; border: 1px solid var(--st-line); border-radius: 6px; padding: 10px 14px; max-width: 380px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); }
.st-toast button { margin-left: 10px; }

@media (max-width: 900px) {
  .st-count { font-size: 2.2em; }
  .st-streams { grid-template-columns: 1fr; }
}
