/* BLCTV Enhancements CSS v3.0 */

/* ─── Snapshot Image Transitions ────────────────────────────────── */
img[src*="live-tv-snapshots"],
img[src*="snapshot"] {
  transition: opacity 0.4s ease !important;
}

img[src*="live-tv-snapshots"][loading],
img[src*="snapshot"][loading] {
  opacity: 0.7;
}

/* ─── Performance: GPU acceleration for scrolling containers ──── */
.no-scrollbar {
  -webkit-overflow-scrolling: touch;
  will-change: scroll-position;
}

/* ─── Smoother card hover animations ─────────────────────────── */
.group:hover .group-hover\:scale-\[1\.05\],
.group:hover .group-hover\:scale-\[1\.07\] {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* ─── Better focus states for accessibility ──────────────────── */
button:focus-visible {
  outline: 2px solid #1A8FFF;
  outline-offset: 2px;
}

/* ─── Video player overlay fix ───────────────────────────────── */
[data-testid="video-player"] {
  contain: layout style;
}

[data-testid="video-player"] video {
  background: #000;
}

/* ─── Player Seek Bar Fix ────────────────────────────────────── */
/* The React app renders a div-based seek bar, but the CSS only
   styles it as input[type=range]. We add proper positioning for
   the div-based structure so it's visible and clickable. */

.player-seek {
  position: relative !important;
  height: 6px !important;
  border-radius: 99px !important;
  background: rgba(255, 255, 255, 0.18) !important;
  cursor: pointer !important;
  transition: height 0.18s ease !important;
  /* Padding for larger click target, background only on content */
  padding: 10px 0 !important;
  background-clip: content-box !important;
}

.player-seek:hover {
  height: 8px !important;
}

.player-seek-buffered {
  position: absolute !important;
  top: 10px !important;
  left: 0 !important;
  height: 6px !important;
  border-radius: 99px !important;
  background: rgba(255, 255, 255, 0.25) !important;
  pointer-events: none !important;
  transition: width 0.3s ease !important;
}

.player-seek:hover .player-seek-buffered {
  height: 8px !important;
}

.player-seek-played {
  position: absolute !important;
  top: 10px !important;
  left: 0 !important;
  height: 6px !important;
  border-radius: 99px !important;
  background: linear-gradient(to right, #1A8FFF 0%, #5AB3FF 100%) !important;
  box-shadow: 0 0 10px rgba(26, 143, 255, 0.55) !important;
  pointer-events: none !important;
  z-index: 2 !important;
  transition: width 0.1s linear !important;
}

.player-seek:hover .player-seek-played {
  height: 8px !important;
}

.player-seek-thumb {
  position: absolute !important;
  top: 10px !important;
  width: 16px !important;
  height: 16px !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(26, 143, 255, 0.55), 0 2px 8px rgba(0, 0, 0, 0.65) !important;
  transform: translate(-50%, -50%) translateY(3px) scale(0) !important;
  transition: transform 0.15s ease !important;
  pointer-events: none !important;
  z-index: 3 !important;
}

.player-seek:hover .player-seek-thumb {
  transform: translate(-50%, -50%) translateY(4px) scale(1) !important;
}

/* ─── Shimmer loading optimization ───────────────────────────── */
.skeleton-shimmer {
  will-change: background-position;
}

/* ─── Remove potential session/user panel elements (safety net) ─ */
[data-testid="user-list"],
[data-testid="session-panel"],
[data-testid="connected-users"],
.user-list-panel,
.session-activity-panel,
.connected-users {
  display: none !important;
}

/* ─── Smooth page transitions ────────────────────────────────── */
#root > div {
  animation: blctv-fadeIn 0.2s ease-out;
}

@keyframes blctv-fadeIn {
  from { opacity: 0.85; }
  to { opacity: 1; }
}

/* ─── Better scrollbar hidden ────────────────────────────────── */
.no-scrollbar::-webkit-scrollbar {
  display: none !important;
}
.no-scrollbar {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}
