/* Video player and playback controls */

.upcoming {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #15171c;
  padding: clamp(12px, 4vw, 32px);
}

.upcoming-content {
  width: min(100%, 760px);
  margin-inline: auto;
}

.upcoming-intermission,
.upcoming-empty {
  margin: 12px 0;
  color: #bac1cf;
  font-variant-numeric: tabular-nums;
}

.resume-video-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #eceff6;
  color: #17191d;
  padding: 10px 16px;
  font-weight: 600;
}

.seek-slider {
  display: block;
  width: 100%;
  margin: 0;
  height: 22px;
  padding: 0;
  accent-color: #cbd5e6;
}

.seek-slider:disabled {
  opacity: .6;
}

.player-controls,
.player-transport,
.player-tools {
  display: flex;
  align-items: center;
  gap: 5px;
}

.player-controls {
  flex-wrap: wrap;
  padding-top: 3px;
}

.player-tools {
  min-width: 0;
  margin-left: auto;
}

.volume-slider {
  width: 84px;
  min-width: 24px;
  margin: 0;
}

.playback-icon-button {
  border: 0;
  min-width: 34px;
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  border-radius: 5px;
}

.playback-icon-button .action-icon {
  width: 18px;
  height: 18px;
}

.playback-time {
  font-size: 12px;
  color: #bbc0cc;
  white-space: nowrap;
  letter-spacing: .2px;
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
}

.now-playing {
  font-size: 12px;
  color: #9ba1ac;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 4px 2px 0;
  min-height: 20px;
}

.player:fullscreen {
  width: 100%;
  height: 100%;
  max-width: none;
  border: 0;
  border-radius: 0;
  background: #000;
  justify-content: center;
}

.player:fullscreen .video-wrap {
  flex: 1;
  aspect-ratio: auto;
}

.playback-controls {
  position: absolute;
  inset: auto 0 0;
  z-index: 6;
  width: 100%;
  padding: 25px 14px 10px;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, .52) 24%, rgba(0, 0, 0, .88) 100%);
  color: #f5f6fa;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 160ms ease, transform 160ms ease;
}

.playback-controls .now-playing {
  color: #e2e5ed;
}

.playback-controls .playback-time {
  color: #f2f4f8;
}

.player:fullscreen .playback-controls {
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, .85));
}

@media (hover: hover) and (pointer: fine) {
  .player:not(:hover, :focus-within) .playback-controls {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
  }

  .player:hover .playback-controls,
  .player:focus-within .playback-controls {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}

@media (hover: none), (pointer: coarse) {
  .playback-controls {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .playback-controls {
    transition: none;
  }
}

.guest-player video {
  pointer-events: none;
}

.player {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  background: #000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.video-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
}

.video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: right center;
}

.player-popup .video-wrap video,
.player:fullscreen video {
  object-position: center;
}
