/* autoplay/autoplay.css — player Autopilot a piena pagina */

.autoplay-player-shell {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050608;
}

.autoplay-player-shell[hidden] {
  display: none;
}

.autoplay-player-shell.is-fallback-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
}

.autoplay-player-shell .video-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.autoplay-player-shell iframe#youtubeFrame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.autoplay-player-shell .player-status {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  max-width: min(90vw, 480px);
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(8, 10, 14, .82);
  color: #fff;
  font: 700 .92rem/1.3 "Segoe UI", system-ui, sans-serif;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.autoplay-player-shell .player-status[data-kind="error"] {
  border-color: rgba(255, 145, 125, .55);
  color: #ffd5cc;
}

.autoplay-player-shell .player-fallback-link {
  position: absolute;
  top: calc(50% + 54px);
  left: 50%;
  z-index: 3;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #fff;
  color: #17191e;
  font: 800 .88rem/1.2 "Segoe UI", system-ui, sans-serif;
  text-decoration: none;
  transform: translateX(-50%);
}

.autoplay-player-shell .player-fallback-link:hover,
.autoplay-player-shell .player-fallback-link:focus-visible {
  background: #ffd3c7;
  color: #17191e;
}

/* L'iframe resta visibile e i controlli superiori restano raggiungibili. */
.autoplay-player-shell .player-shield {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Blocca soltanto i comandi YouTube nella fascia inferiore. */
.autoplay-player-shell .player-bottom-shield {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  height: 24%;
  background: transparent;
  pointer-events: auto;
  cursor: default;
}

/* Nessun pannello, titolo o coda sopra il video. */
.autoplay-player-shell .autoplay-queue,
.autoplay-player-shell .video-caption,
.autoplay-player-shell .player-queue,
.autoplay-player-shell .queue-panel,
.autoplay-player-shell .playlist-queue,
.autoplay-player-shell [data-player-queue],
.autoplay-player-shell [data-queue-panel] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.autoplay-player-shell .sound-control,
.autoplay-player-shell .fullscreen-control {
  position: absolute;
  bottom: 18px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(10, 12, 16, .72);
  color: #fff;
  font: 700 .9rem/1 "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background .15s ease, transform .15s ease;
}

.autoplay-player-shell .sound-control:hover,
.autoplay-player-shell .fullscreen-control:hover {
  background: rgba(30, 34, 42, .85);
}

.autoplay-player-shell .sound-control:active,
.autoplay-player-shell .fullscreen-control:active {
  transform: scale(.96);
}

.autoplay-player-shell .sound-control {
  right: 18px;
}

.autoplay-player-shell .fullscreen-control {
  right: 150px;
}

.autoplay-player-empty {
  max-width: 34ch;
  padding: 24px;
  color: #cfd3da;
  font: 500 1.1rem/1.5 "Segoe UI", system-ui, sans-serif;
  text-align: center;
}

.autoplay-player-shell .hls-video-frame video#hlsVideo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.autoplay-player-shell .hls-video-frame .player-status {
  z-index: 4;
}

.autoplay-player-shell .hls-video-frame .player-fallback-link {
  z-index: 5;
}

@media (max-width: 560px) {
  .autoplay-player-shell .fullscreen-control {
    right: 130px;
  }

  .autoplay-player-shell .sound-control,
  .autoplay-player-shell .fullscreen-control {
    padding: 0 12px;
    font-size: .8rem;
  }
}
