/* THBN Guide content, shown inside the shared Leo pop-up window.
   Owned by Leo. Navy on clean white by day, light text on black at night.
   The window chrome, pause/hide and Back to TV live in popup.css. */

:root {
  --leo-g-navy: #172554;
  --leo-g-bg: #ffffff;
  --leo-g-text: #0f172a;
  --leo-g-heading: #172554;
  --leo-g-muted: #334155;
  --leo-g-line: #cbd5e1;
  --leo-g-tick: #94a3b8;
  --leo-g-chip-bg: #ffffff;
  --leo-g-chip-fg: #172554;
  --leo-g-chip-on-bg: #172554;
  --leo-g-chip-on-fg: #ffffff;
  --leo-g-row-hover: #f1f5f9;
  --leo-g-row-on: #e8eef7;
  --leo-g-focus: #172554;
  --leo-g-live: #9f2d2d;
  --leo-g-live-soft: #fff1f1;
  --leo-g-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --leo-g-safe: env(safe-area-inset-bottom, 0px);
}

html[data-theme="night"] {
  --leo-g-navy: #ffffff;
  --leo-g-bg: #000000;
  --leo-g-text: #f8fafc;
  --leo-g-heading: #ffffff;
  --leo-g-muted: #d4d4d8;
  --leo-g-line: #3f3f46;
  --leo-g-tick: #71717a;
  --leo-g-chip-bg: #000000;
  --leo-g-chip-fg: #ffffff;
  --leo-g-chip-on-bg: #ffffff;
  --leo-g-chip-on-fg: #000000;
  --leo-g-row-hover: #161616;
  --leo-g-row-on: #1c1c1c;
  --leo-g-focus: #ffffff;
  --leo-g-live: #fca5a5;
  --leo-g-live-soft: #1a0a0a;
}

#leo-guide-shell,
#leo-guide-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--leo-g-bg);
  color: var(--leo-g-text);
  font-family: var(--leo-g-font);
}
#leo-guide-shell[hidden] { display: none; }

.leo-g-chip:focus-visible,
.leo-g-row:focus-visible,
.leo-g-legal a:focus-visible,
.leo-g-lic:focus-visible {
  outline: 2px solid #D4A537;
  outline-offset: 2px;
}

.leo-g-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-bottom: 1px solid var(--leo-g-line);
  flex: 0 0 auto;
}
.leo-g-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.7rem;
  padding: 0.1rem 0.55rem;
  border: 1px solid var(--leo-g-line);
  background: var(--leo-g-chip-bg);
  color: var(--leo-g-chip-fg);
  font-family: var(--leo-g-font);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border-radius: 0;
  line-height: 1.2;
}
.leo-g-chip[aria-pressed="true"] {
  background: var(--leo-g-chip-on-bg);
  color: var(--leo-g-chip-on-fg);
  border-color: var(--leo-g-chip-on-bg);
}

.leo-g-grid-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
#leo-guide-grid {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
#leo-guide-grid th,
#leo-guide-grid td {
  text-align: left;
  vertical-align: top;
  padding: 0.42rem 0.7rem;
  border-bottom: 1px solid var(--leo-g-line);
}
#leo-guide-grid th {
  position: sticky;
  top: 0;
  background: var(--leo-g-bg);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--leo-g-muted);
  z-index: 1;
}
.leo-g-num {
  width: 2.6rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--leo-g-heading);
}
.leo-g-name { font-weight: 700; color: var(--leo-g-heading); }
.leo-g-now, .leo-g-next { color: var(--leo-g-text); }
.leo-g-next { color: var(--leo-g-muted); }
.leo-g-row { cursor: pointer; }
.leo-g-row:hover { background: var(--leo-g-row-hover); }
.leo-g-row.is-current { background: var(--leo-g-row-on); box-shadow: inset 3px 0 0 #D4A537; }
.leo-g-row:focus { background: var(--leo-g-row-hover); }
.leo-g-live {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--leo-g-live);
  background: var(--leo-g-live-soft);
  padding: 0 0.28rem;
  border: 1px solid color-mix(in srgb, var(--leo-g-live) 35%, transparent);
}
.leo-g-empty {
  margin: 0.8rem 0.85rem;
  color: var(--leo-g-muted);
  font-size: 0.9rem;
}

/* Credit, attribution, license and legal pages: one tap from the guide. */
.leo-g-foot {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem 1rem;
  padding: 0.5rem 0.85rem calc(0.55rem + var(--leo-g-safe));
  border-top: 1px solid var(--leo-g-line);
  background: var(--leo-g-bg);
}
#leo-guide-credit {
  flex: 1 1 16rem;
  min-width: 0;
  font-size: 0.78rem;
  color: var(--leo-g-muted);
  line-height: 1.4;
}
#leo-guide-credit strong {
  color: var(--leo-g-text);
  font-weight: 700;
}
#leo-guide-credit a,
.leo-g-legal a {
  color: var(--leo-g-heading);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid var(--leo-g-heading);
}
.leo-g-legal {
  display: flex;
  gap: 0.75rem;
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.leo-g-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- move and size the live player; never cover it ----
   z-index stays above the guide for the whole open, close and mid-transition. */
