/* The same restrained transport sits over a film or in front of the palace screen. */
.movie-player {
  position: relative;
  color: #fff;
  --player-gold: #e2b35c;
  --player-panel: rgba(12, 10, 18, 0.96);
}
.movie-player [hidden] {
  display: none !important;
}
.movie-player:focus {
  outline: none;
}
.movie-player:focus-visible {
  outline: 2px solid var(--player-gold);
  outline-offset: 3px;
}
.player-surface {
  position: absolute;
  inset: 0;
  z-index: 1;
  touch-action: pan-y pinch-zoom;
}
.player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 0 12px max(6px, env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85) 38%);
  transition: opacity 0.18s;
}
.player-row {
  display: flex;
  align-items: center;
  gap: 2px;
  min-height: 48px;
}
.player-spacer {
  flex: 1;
}
.player-button {
  -webkit-tap-highlight-color: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  margin: 0;
  padding: 10px;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.movie-player svg {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.movie-player .player-fill {
  fill: currentColor;
  stroke: none;
}
.player-button:hover,
.player-menu-action:hover {
  background: rgba(255, 255, 255, 0.12);
}
.player-button[aria-pressed='true']::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  background: var(--player-gold);
}
.movie-player :is(button, a, input, select):focus-visible {
  outline: 2px solid var(--player-gold);
  outline-offset: 1px;
  box-shadow: none;
}
.movie-player :disabled {
  opacity: 0.4;
  cursor: default;
}
.player-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 8px;
  border-radius: 3px;
  background: var(--player-panel);
  color: #fff;
  font:
    500 12px/1.3 'Inter',
    sans-serif;
  white-space: nowrap;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}
.player-button:first-child .player-tooltip {
  left: 0;
  transform: none;
}
.player-button:last-child .player-tooltip {
  left: auto;
  right: 0;
  transform: none;
}
.player-button:focus-visible .player-tooltip {
  visibility: visible;
  opacity: 1;
}
@media (hover: hover) {
  .player-button:hover .player-tooltip {
    visibility: visible;
    opacity: 1;
  }
}
.player-time {
  font:
    500 12px/1 'Inter',
    sans-serif;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
  text-shadow: 0 1px 3px #000;
}
.movie-player input[type='range'] {
  margin: 0;
  cursor: pointer;
  accent-color: var(--player-gold);
}
.movie-player .player-seek {
  display: block;
  width: 100%;
  height: 44px;
  min-width: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  --progress: 0%;
  touch-action: none;
}
.player-seek::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(to right, var(--player-gold) var(--progress), rgba(255, 255, 255, 0.4) var(--progress));
}
.player-seek::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.4);
}
.player-seek::-moz-range-progress {
  height: 3px;
  background: var(--player-gold);
}
.player-seek::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -4.5px;
  border: 0;
  border-radius: 50%;
  background: var(--player-gold);
}
.player-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: var(--player-gold);
}
.player-volume {
  position: relative;
  display: flex;
  align-items: center;
}
.player-volume-reveal {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 5;
  display: none;
  align-items: center;
  width: 150px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 4px;
  background: var(--player-panel);
  border: 1px solid rgba(226, 179, 92, 0.3);
}
.player-volume-slider {
  width: 100%;
  height: 44px;
}
.player-device-volume {
  font:
    500 12px/1.4 'Inter',
    sans-serif;
  padding: 8px 0;
}
.player-volume:is(.volume-open, :focus-within) .player-volume-reveal {
  display: flex;
}
@media (hover: hover) {
  .player-volume:hover .player-volume-reveal {
    display: flex;
  }
}
@media (hover: hover) and (min-width: 650px) {
  .player-volume-reveal {
    position: static;
    min-height: 44px;
    width: 0;
    padding: 0;
    border: 0;
    background: none;
    overflow: hidden;
  }
  .player-volume:is(:hover, :focus-within, .volume-open) .player-volume-reveal {
    width: 96px;
    padding: 0 8px;
  }
}
.player-settings {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 6;
  width: min(280px, calc(100% - 24px));
  max-height: min(340px, calc(100dvh - 140px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid rgba(226, 179, 92, 0.35);
  border-radius: 6px;
  background: var(--player-panel);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  font:
    500 13px/1.4 'Inter',
    sans-serif;
  text-transform: none;
  letter-spacing: normal;
}
.player-speed-label {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
}
.player-speed {
  min-height: 44px;
  max-width: 110px;
  padding: 0 10px;
  background: #231f2d;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  font: inherit;
}
.player-menu-action {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 8px;
  color: #fff;
  text-decoration: none;
  border: 0;
  background: none;
  border-radius: 3px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.player-menu-action svg {
  width: 20px;
  height: 20px;
}
.player-caption-note {
  margin: 8px;
  font:
    400 12px/1.5 'Inter',
    sans-serif;
  color: #cec7d3;
}
.player-status {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 8px 12px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.85);
  font:
    500 13px/1.5 'Inter',
    sans-serif;
  text-align: center;
}
.player-status:empty,
.player-seek-feedback:empty {
  display: none;
}
.player-captions {
  position: absolute;
  z-index: 2;
  bottom: 116px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 5px 10px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  white-space: pre-line;
  pointer-events: none;
  font:
    500 clamp(14px, 2vw, 24px) / 1.4 'Inter',
    sans-serif;
  text-align: center;
}
.player-seek-feedback {
  position: absolute;
  top: 40%;
  z-index: 2;
  padding: 16px 12px;
  border-radius: 50%;
  font:
    600 14px/1.5 'Inter',
    sans-serif;
  background: rgba(0, 0, 0, 0.65);
  pointer-events: none;
}
.player-seek-feedback[data-side='left'] {
  left: 12%;
}
.player-seek-feedback[data-side='right'] {
  right: 12%;
}
.movie-player[data-controls='hidden'] :is(.player-controls, .cinema-head, .player-volume-reveal, .player-tooltip) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.movie-player[data-controls='hidden'] .player-captions {
  bottom: 20px;
}
.movie-player.player-expanded {
  position: fixed;
  inset: 0;
  z-index: 100;
  width: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #000;
  overflow: visible;
  transform: none;
  box-shadow: none;
  outline: 0;
}
.movie-player.player-expanded video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.player-expanded .player-settings {
  max-height: calc(100dvh - 140px);
}
@media (max-width: 360px) {
  .player-controls {
    padding-left: 8px;
    padding-right: 8px;
  }
  .player-row {
    gap: 0;
  }
  .player-time {
    font-size: 10px;
    margin-left: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .player-controls {
    transition: none;
  }
}
