/* ═══════════════════════════════════════════════════════════
   Live TV Page — Pixel-perfect clone of screenshot
   • Pure black full-screen background
   • Centred 16:9 video with overlay elements
   • Bottom info bar: date | THAI LOTTERY logo | live clock
   • Orange scrolling ticker beneath
═══════════════════════════════════════════════════════════ */

/* Override body/html for full-black immersive TV experience */
html, body {
  background: #000 !important;
  height: 100%;
  overflow: hidden;
}

/* Hide the main app shell default bg */
.app-shell { background: #000; }

/* ── Live TV page wrapper ─────────────────────────────────── */
.live-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(100dvh - 60px);   /* subtract header height */
  background: #000;
  position: relative;
}

/* ── TV Screen container ──────────────────────────────────── */
.tv-screen {
  width: 100%;
  max-width: 100%;
  position: relative;
  background: #000;
  /* 16:9 aspect ratio */
  aspect-ratio: 16 / 9;
}

/* The actual <video> element */
.tv-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}

/* ── Top-right logo badge on video ───────────────────────── */
.tv-logo-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  z-index: 10;
  pointer-events: none;
}
.tv-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── Bottom info bar ─────────────────────────────────────── */
/* Sits flush below the video — dark charcoal/black bg */
.tv-info-bar {
  width: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 14px;
  gap: 8px;
  flex-shrink: 0;
}

.tv-date {
  font-size: 15px;
  font-weight: 900;
  color: #000;
  letter-spacing: .3px;
  white-space: nowrap;
  font-family: 'Roboto', Arial, sans-serif;
}

/* Center: THAI LOTTERY webp logo */
.tv-brand-logo {
  height: 28px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.tv-clock {
  font-size: 15px;
  font-weight: 900;
  color: #000;
  letter-spacing: .3px;
  white-space: nowrap;
  font-family: 'Roboto', Arial, sans-serif;
}

/* ── Scrolling ticker bar ────────────────────────────────── */
/* Orange/red bg exactly like screenshot */
.tv-ticker {
  width: 100%;
  background: #d44000;
  overflow: hidden;
  padding: 6px 0;
  flex-shrink: 0;
}

.tv-ticker-inner {
  display: flex;
  white-space: nowrap;
  /* Infinite scroll animation */
  animation: ticker-scroll 22s linear infinite;
}

.tv-ticker-text {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  padding-right: 80px;   /* gap before repeat */
  font-family: 'Roboto', Arial, sans-serif;
  letter-spacing: .2px;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* ── Loading / buffering overlay ─────────────────────────── */
.tv-buffer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  display: none;                  /* hidden by default — JS shows it only when needed */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  gap: 14px;
}
.tv-buffer-spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(255,255,255,.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.tv-buffer-text {
  color: rgba(255,255,255,.7);
  font-size: 13px;
  font-family: 'Roboto', Arial, sans-serif;
}

/* ── LIVE badge ───────────────────────────────────────────── */
.tv-live-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: #e53030;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.2px;
  padding: 3px 8px;
  border-radius: 3px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 5px;
}
.tv-live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: blink 1.1s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: .2; }
}

/* ── No videos state ─────────────────────────────────────── */
.tv-no-video {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #0a0a0a;
}
.tv-no-video svg { width: 56px; height: 56px; opacity: .35; }
.tv-no-video p {
  color: rgba(255,255,255,.45);
  font-size: 14px;
  text-align: center;
  font-family: 'Roboto', Arial, sans-serif;
  padding: 0 20px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (min-width: 600px) {
  .tv-date, .tv-clock { font-size: 16px; }
  .tv-brand-logo { height: 32px; }
  .tv-ticker-text { font-size: 15px; }
}

/* Utility */
.hidden { display: none !important; }