/* ═══════════════════════════════════════════════════
   Event Playback Player — Premium Controls
   ═══════════════════════════════════════════════════ */

/* ── Container ── */
.evt-playback-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
  outline: none;
}
.evt-playback-container iframe,
.evt-playback-container video.cctv-stream-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  object-fit: contain;
  transform: none !important;
}

/* ── Loading Overlay ── */
.evt-playback-stage {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  font-size: 13px;
}
.evt-playback-stage .spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 10px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: evtPbSpin 0.8s linear infinite;
}
@keyframes evtPbSpin { to { transform: rotate(360deg); } }

/* ── Controls Overlay (auto-hide) ── */
.evt-playback-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: linear-gradient(0deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.4) 70%, transparent 100%);
  padding-top: 32px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.evt-playback-controls.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Progress Bar ── */
.evt-playback-progress {
  position: relative;
  height: 22px;
  padding: 0 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
.evt-playback-progress-track {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: visible;
  transition: height 0.15s ease;
}
.evt-playback-progress:hover .evt-playback-progress-track {
  height: 6px;
}
.evt-playback-progress-filled {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  border-radius: 2px 0 0 2px;
  pointer-events: none;
  transition: width 0.06s linear;
}
.evt-playback-progress-filled::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translate(50%, -50%);
  width: 12px;
  height: 12px;
  background: #1a1e21;
  border: 3px solid #3b82f6;
  border-radius: 50%;
  pointer-events: none;
  display: block;
  box-sizing: border-box;
  box-shadow: 0 0 3px rgba(0,0,0,0.5);
}
.evt-playback-progress-marker {
  position: absolute;
  top: -4px;
  width: 2px;
  height: calc(100% + 8px);
  background: #ef4444;
  border-radius: 1px;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(239,68,68,0.5);
}
.evt-playback-progress-input {
  position: absolute;
  left: 12px;
  right: 12px;
  width: calc(100% - 24px);
  height: 22px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  opacity: 0 !important;
  cursor: pointer;
  z-index: 2;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.evt-playback-progress-input::-webkit-slider-runnable-track,
.evt-playback-progress-input::-webkit-slider-thumb,
.evt-playback-progress-input::-moz-range-track,
.evt-playback-progress-input::-moz-range-thumb {
  background: transparent !important;
  border: 0 !important;
  opacity: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.evt-playback-progress-tooltip {
  position: absolute;
  top: -30px;
  padding: 3px 8px;
  background: rgba(15,23,42,0.94);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.12s;
  z-index: 3;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.evt-playback-progress:hover .evt-playback-progress-tooltip {
  opacity: 1;
}

/* ── Bottom Bar ── */
.evt-playback-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 8px 8px;
  gap: 8px;
  min-height: 36px;
}
.evt-playback-bar-left,
.evt-playback-bar-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ── Buttons ── */
.evt-playback-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(226,232,240,0.85);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  flex-shrink: 0;
  padding: 0;
}
.evt-playback-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}
.evt-playback-btn:active {
  transform: scale(0.92);
  background: rgba(255,255,255,0.18);
}
.evt-playback-btn svg {
  display: block;
  flex-shrink: 0;
}
.evt-playback-btn-label {
  position: absolute;
  bottom: 2px;
  right: 3px;
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  color: inherit;
  pointer-events: none;
}

/* Main play/pause button */
.evt-playback-btn-main {
  width: 36px;
  height: 36px;
  background: rgba(59,130,246,0.2);
  border-radius: 50%;
}
.evt-playback-btn-main:hover {
  background: rgba(59,130,246,0.4);
}

/* Speed chip */
.evt-playback-speed-btn {
  width: auto;
  min-width: 36px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #93c5fd;
  border: 1px solid rgba(59,130,246,0.25);
}
.evt-playback-speed-btn:hover {
  background: rgba(59,130,246,0.18);
  border-color: rgba(59,130,246,0.45);
  color: #bfdbfe;
}

/* ── Time Display ── */
.evt-playback-time {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  user-select: none;
  flex-shrink: 0;
}
.evt-playback-time-clock {
  color: #f1f5f9;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.evt-playback-time-offset {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

/* ── Fullscreen Mode ── */
.evt-playback-container:fullscreen,
.evt-playback-container:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
}
.evt-playback-container:fullscreen .evt-playback-controls,
.evt-playback-container:-webkit-full-screen .evt-playback-controls {
  padding-top: 48px;
}
.evt-playback-container:fullscreen .evt-playback-bar,
.evt-playback-container:-webkit-full-screen .evt-playback-bar {
  padding-bottom: 14px;
}

/* ── Player area adjustments ── */
.event-detail .player-area {
  position: relative;
  overflow: hidden;
}
