/* Personal live channel page — extends ott-player layout */

/* Allow page scroll (meta panel below player); watch.php stays locked */
html:has(body.ott-pltv-page) {
  height: auto;
  overflow: auto;
}

body.ott-pltv-page {
  height: auto;
  min-height: 100dvh;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
}

body.ott-pltv-page .ott-watch-layout {
  max-width: 1400px;
  justify-content: flex-start;
  min-height: auto;
  flex: none;
  padding-top: max(0.75rem, env(safe-area-inset-top));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

body.ott-pltv-page .ott-watch-shell:not(.mini) {
  max-width: min(100%, 1400px);
  max-height: min(calc(100dvh - 18rem), calc((100vw - 2rem) * 9 / 16));
  margin-inline: auto;
}

/* Live TV: no scrubbing / skip / center play — feels like real broadcast */
body.ott-pltv-page #ott-progress-wrap,
body.ott-pltv-page #ott-rwd,
body.ott-pltv-page #ott-fwd,
body.ott-pltv-page #ott-scrub-preview,
body.ott-pltv-page .ott-center-play,
body.ott-pltv-page #ott-play-toggle,
body.ott-pltv-page .ott-player-shell.ott-youtube-mode #ott-progress-wrap,
body.ott-pltv-page .ott-player-shell.ott-youtube-mode .ott-center-play,
body.ott-pltv-page .ott-player-shell.ott-youtube-mode #ott-controls.visible #ott-play-toggle {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

body.ott-pltv-page #ott-time::before {
  content: 'LIVE · ';
  color: rgba(255, 45, 106, 0.9);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.ott-pltv-page .pltv-meta-panel {
  width: 100%;
}

.pltv-scroll,
.pltv-related-scroll,
.pltv-schedule-list {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 45, 106, 0.35) transparent;
}

.pltv-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pltv-card:hover {
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .ott-pltv-page .ott-watch-layout {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .ott-pltv-page .pltv-meta-panel {
    margin-top: 0.75rem;
  }

  .ott-pltv-page .pltv-schedule-list {
    max-height: 180px;
  }

  .pltv-scroll {
    scroll-padding-left: 1rem;
    padding-left: 0.25rem;
  }

  .pltv-related-scroll a {
    max-width: 70vw;
  }
}

@media (min-width: 768px) {
  .ott-pltv-page .ott-player-shell {
    border-radius: 1rem;
  }
}

/* Live listing page cards */
.pltv-scroll {
  scroll-snap-type: x mandatory;
}

.pltv-card {
  scroll-snap-align: start;
}

.pltv-premium-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(251, 191, 36, 0.95);
}

/* ── TV channel strip (CH+/CH−) ── */
.pltv-tv-guide {
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.35));
  padding: 0.5rem;
}

.pltv-ch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.65rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.45);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
  transition: background 0.15s, border-color 0.15s;
}

.pltv-ch-btn:hover {
  border-color: rgba(255, 45, 106, 0.45);
  background: rgba(255, 45, 106, 0.12);
}

.pltv-ch-strip {
  display: flex;
  gap: 0.5rem;
  scroll-snap-type: x mandatory;
  padding: 0.15rem 0.1rem;
}

.pltv-ch-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: min(72vw, 220px);
  max-width: 240px;
  flex-shrink: 0;
  scroll-snap-align: center;
  padding: 0.45rem 0.65rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.pltv-ch-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
}

.pltv-ch-item.is-active {
  border-color: rgba(255, 45, 106, 0.55);
  background: rgba(255, 45, 106, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 45, 106, 0.2);
}

.pltv-ch-num {
  flex-shrink: 0;
  width: 1.25rem;
  font-size: 0.65rem;
  font-weight: 800;
  text-align: center;
  color: rgba(255, 255, 255, 0.35);
}

.pltv-ch-item.is-active .pltv-ch-num {
  color: rgba(255, 45, 106, 0.95);
}

.pltv-ch-logo {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.pltv-ch-logo-fallback {
  display: flex;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  font-weight: 800;
}

.pltv-ch-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.pltv-ch-name {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

.pltv-ch-now {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.45);
}

.pltv-ch-live-dot {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 9999px;
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
  animation: pltv-pulse 1.5s ease-in-out infinite;
}

.pltv-ch-premium {
  flex-shrink: 0;
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(251, 191, 36, 0.95);
}

@keyframes pltv-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ── Tabbed Now Playing / Schedule ── */
.pltv-tab-select {
  color: #fff;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.pltv-tab {
  border-radius: 9999px;
  padding: 0.4rem 0.95rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.15s, background 0.15s;
}

.pltv-tab:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.06);
}

.pltv-tab.is-active {
  color: #fff;
  background: rgba(255, 45, 106, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 45, 106, 0.35);
}

.pltv-tab-panel.hidden {
  display: none;
}

/* TV guide grid (All Channels tab) */
.pltv-guide-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.25);
  transition: border-color 0.15s, background 0.15s;
}

.pltv-guide-row:hover {
  border-color: rgba(255, 45, 106, 0.35);
  background: rgba(255, 45, 106, 0.06);
}

.pltv-guide-row.is-active {
  border-color: rgba(255, 45, 106, 0.5);
  background: rgba(255, 45, 106, 0.1);
}

.pltv-guide-num {
  flex-shrink: 0;
  width: 1.75rem;
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
}

.pltv-guide-row.is-active .pltv-guide-num {
  color: rgba(255, 45, 106, 0.9);
}

@media (min-width: 640px) {
  .pltv-ch-item {
    min-width: 180px;
  }
}
