/* Pooltopia Live — styles for /live/ (stream grid, filters and the on-page viewer). */

.page-live h2 { margin-top: 1.6em; }
.live-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 6px; }
.live-chip {
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  color: var(--felt); background: var(--card); border: 2px solid var(--felt); border-radius: 999px; padding: 6px 16px;
}
.live-chip:hover { background: #e3efec; }
.live-chip.on { background: var(--felt); color: #fff; }

.live-note { color: var(--muted); font-size: 15px; margin: 0 0 4px; }
.live-empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 22px; color: var(--muted); }

.live-grid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.live-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.06); display: flex; flex-direction: column; }
.live-card.is-live { border-color: var(--orange); }

.live-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; cursor: pointer; background: var(--felt-deep); overflow: hidden; }
.live-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.live-thumb:hover img, .live-thumb:focus-visible img { transform: scale(1.04); }
.live-badge { position: absolute; top: 10px; left: 10px; background: #d32f2f; color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .8px; border-radius: 4px; padding: 3px 8px; }
.live-badge.soon { background: rgba(8,47,41,.9); font-weight: 600; letter-spacing: 0; }
.live-viewers { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.7); color: #fff; font-size: 12px; font-weight: 600; border-radius: 4px; padding: 3px 8px; }
.live-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 58px; height: 58px; line-height: 58px; text-align: center; font-size: 24px; color: #fff; background: rgba(0,0,0,.55); border: 2px solid rgba(255,255,255,.85); border-radius: 50%; opacity: 0; transition: opacity .2s; }
.live-thumb:hover .live-play, .live-thumb:focus-visible .live-play { opacity: 1; }

.live-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.live-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.live-meta .ev-tag { margin-top: 0; }
.live-platform { font-size: 13px; color: var(--muted); font-weight: 600; }
.live-body h3 { font-size: 17px; line-height: 1.35; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.live-channel { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.live-out { margin-top: auto; font-size: 14px; font-weight: 600; }

.live-chans { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.live-chan { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--felt); border-radius: var(--radius); padding: 12px 16px; display: flex; flex-direction: column; gap: 2px; }
.live-chan a { font-weight: 700; }
.live-chan-play { align-self: flex-start; margin-top: 6px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: #fff; background: var(--felt); border: 0; border-radius: 999px; padding: 4px 14px; }

/* On-page viewer */
.live-open { overflow: hidden; }
.live-viewer { position: fixed; inset: 0; z-index: 200; background: rgba(4,20,17,.88); display: flex; align-items: center; justify-content: center; padding: 18px; }
.live-viewer[hidden] { display: none; }
.live-viewer-box { width: min(1200px, 100%); background: var(--felt-deep); border: 2px solid var(--gold); border-radius: 12px; overflow: hidden; }
.live-viewer-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; color: #fff; }
.live-viewer-title { flex: 1; margin: 0; font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-viewer-out { padding: 6px 16px; font-size: 14px; white-space: nowrap; }
.live-viewer-close { font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: #fff; background: transparent; border: 2px solid rgba(255,255,255,.6); border-radius: 999px; padding: 5px 16px; }
.live-viewer-close:hover { background: rgba(255,255,255,.15); }
.live-viewer-frame { position: relative; aspect-ratio: 16 / 9; max-height: calc(100vh - 110px); background: #000; }
.live-viewer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 960px) {
  .live-grid, .live-chans { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .live-grid, .live-chans { grid-template-columns: 1fr; }
  .live-viewer { padding: 0; }
  .live-viewer-box { border-radius: 0; border-left: 0; border-right: 0; }
  .live-viewer-out { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .live-thumb img, .live-play { transition: none; }
}

.page-live > .live-note { margin-top: 30px; }
