/* Livestreams page. Settings → Stylesheets → livestreams.css, served as /css/livestreams.css.
   Uses the site's own variables from /css/styles.css, with fallbacks in case one is missing. */

.ls {
  --ls-green: var(--primary-green, #2d5a27);
  --ls-red: var(--live-red, #e74c3c);
  --ls-gray: var(--light-gray, #f8f9fa);
  --ls-border: var(--border-color, #eeeeee);
  --ls-muted: var(--text-muted, #666666);
  --ls-dark: var(--dark-bg, #1a1a1a);
}

.ls-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
.ls-grid.one { grid-template-columns: minmax(0, 900px); justify-content: center; }

.ls-table { background: #fff; border: 1px solid var(--ls-border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
/* A table with no player only lists what's coming, so it stays small. */
.ls-table.idle { align-self: start; }
.ls-table header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--ls-dark); color: #fff; }
.ls-table header h2 { margin: 0; font-size: 1.05rem; letter-spacing: .5px; text-transform: uppercase; color: #fff; }

.ls-badge { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 3px 9px; border-radius: 4px; white-space: nowrap; }
.ls-badge.live { background: var(--ls-red); color: #fff; }
.ls-badge.live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #fff; margin-right: 6px; vertical-align: 1px; animation: ls-pulse 1.4s infinite; }
.ls-badge.soon { background: #fff; color: var(--ls-dark); }
.ls-badge.none { background: transparent; color: #bbb; border: 1px solid #555; }
@keyframes ls-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .ls-badge.live::before { animation: none; } }

.ls-player { position: relative; aspect-ratio: 16 / 9; background: #000; }
.ls-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ls-now { padding: 12px 16px 4px; }
.ls-now .title { font-weight: 700; line-height: 1.3; }
.ls-now .when { font-size: .85rem; color: var(--ls-muted); margin-top: 2px; }

.ls-next { padding: 8px 16px 16px; margin-top: auto; }
.ls-next h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: 1px; color: var(--ls-muted); margin: 10px 0 6px; }
.ls-next ul { list-style: none; margin: 0; padding: 0; }
.ls-next li { display: grid; grid-template-columns: 11em 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--ls-border); font-size: .9rem; }
.ls-next li time, .ls-empty li time { font-weight: 700; color: var(--ls-green); font-variant-numeric: tabular-nums; white-space: nowrap; }

.ls-empty { text-align: center; padding: 60px 16px; background: var(--ls-gray); border-radius: 12px; }
.ls-empty > p { font-size: 1.3rem; font-weight: 700; margin: 0 0 14px; color: var(--ls-dark); }
.ls-empty a, .ls-channel a { color: var(--ls-green); font-weight: 700; }
.ls-empty h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--ls-muted); margin: 32px 0 6px; }
.ls-empty ul { list-style: none; padding: 0; margin: 0 auto; max-width: 560px; text-align: left; }
.ls-empty li { display: grid; grid-template-columns: 11em 4.5em 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--ls-border); font-size: .92rem; }
@media (max-width: 520px) {
  .ls-empty li { grid-template-columns: 1fr; gap: 2px; }
}

.ls-channel { text-align: center; margin-top: 32px; font-size: .9rem; color: var(--ls-muted); }
