/* Tutto Slide · Watermark mobile 1.1.0.
   Overlay visivo, NON DRM: gli MP4 originali restano invariati e pubblici.
   PERSONALIZZAZIONE: colore, opacità e durata qui sotto. */
#video-stage {
  --watermark-color: #bfe3ff;       /* Azzurro molto chiaro. */
  --watermark-opacity: .55;        /* 0 = trasparente; 1 = opaco. */
  --watermark-duration: 64s;       /* Durata di un giro completo. */
  isolation: isolate;
}
.video-watermark {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 4;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  contain: layout paint;
}
.watermark-label {
  position: absolute;
  top: 43%;
  left: 50%;
  display: block;
  white-space: nowrap;
  padding: 2px 4px;
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: clamp(24px, 6vw, 100px);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: .10em;
  color: var(--watermark-color);
  opacity: var(--watermark-opacity);
  text-shadow: 0 1px 2px rgb(67 121 171 / 32%);
  -webkit-text-stroke: .45px rgb(111 165 208 / 28%);
  transform: translate(-50%, -50%) rotate(-12deg);
  transform-origin: center;
  pointer-events: none;
}
.video-watermark.watermark-ready .watermark-label { top: 0; left: 0; }
.player-fullscreen {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  right: max(10px, env(safe-area-inset-right));
  z-index: 7;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgb(197 225 251 / 38%);
  border-radius: 9px;
  color: #e8f6ff;
  background: rgb(13 31 53 / 88%);
  font: inherit;
  font-size: .72rem;
  line-height: 1.3;
  cursor: pointer;
  box-shadow: 0 3px 14px rgb(0 0 0 / 14%);
}
.player-fullscreen .icon { width: 18px; height: 18px; }
.player-fullscreen:hover { background: #253f5e; border-color: #bedfff; }
.player-fullscreen:focus-visible { outline: 3px solid #bfe3ff; outline-offset: 3px; }
.watermark-notice {
  position: absolute;
  left: 50%;
  top: 60px;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(88%, 580px);
  z-index: 8;
  border: 1px solid #6284a5;
  border-radius: 9px;
  padding: 10px 14px;
  background: rgb(15 33 54 / 95%);
  color: #e5f4ff;
  font-size: .74rem;
  line-height: 1.6;
  pointer-events: none;
}
/* Native video-only fullscreen and PiP do not include the HTML watermark.
   Hide their buttons where supported; use our container fullscreen instead.
   These are presentation hints, not download/capture security. */
#video-player::-webkit-media-controls-fullscreen-button { display: none !important; }
#video-player::-webkit-media-controls-picture-in-picture-button { display: none !important; }
#video-stage:fullscreen {
  width: 100%; height: 100%; min-height: 0; max-height: none;
  aspect-ratio: auto; border-radius: 0; background: #03080e;
}
#video-stage:-webkit-full-screen {
  width: 100%; height: 100%; min-height: 0; max-height: none;
  aspect-ratio: auto; border-radius: 0; background: #03080e;
}
#video-stage:fullscreen video { width: 100%; height: 100%; min-height: 0; max-height: none; }
#video-stage:-webkit-full-screen video { width: 100%; height: 100%; min-height: 0; max-height: none; }
/* In-page expansion when fullscreen of an HTML container is unavailable. */
.player-dialog.player-expanded {
  width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none; inset: 0; margin: 0;
  border: 0; border-radius: 0; padding: 0; overflow: hidden;
}
.player-expanded .player-header,
.player-expanded .player-queue,
.player-expanded .player-main > :not(.video-stage) { display: none; }
.player-expanded .player-layout { display: block; height: 100%; }
.player-expanded .player-main { height: 100%; }
.player-expanded #video-stage {
  width: 100%; height: 100%; min-height: 0; max-height: none; aspect-ratio: auto;
}
.player-expanded #video-player { width: 100%; height: 100%; min-height: 0; max-height: none; }
@media (max-width: 650px) {
  .player-fullscreen { min-height: 36px; padding: 7px 9px; font-size: .64rem; gap: 5px; }
  .player-fullscreen .icon { width: 17px; height: 17px; }
  .watermark-notice { font-size: .67rem; top: 54px; }
}
@media (prefers-reduced-motion: reduce) {
  /* JavaScript stops the motion but keeps the watermark visible. */
  .watermark-label { will-change: auto; }
}
