/* Player dos vídeos (player.html). O visual é o do Plyr com o verde do site. */
:root {
  --plyr-color-main: #89CC72;
  --plyr-font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
html, body { margin: 0; height: 100%; background: #000; overflow: hidden; }
.pv { position: fixed; inset: 0; }
.pv .plyr, .pv .plyr__video-wrapper { height: 100%; width: 100%; }
.pv .plyr__video-wrapper { aspect-ratio: auto !important; padding: 0 !important; }
.pv video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.pv:not(.is-iniciado) .plyr__control--overlaid, .pv.is-previa .plyr__control--overlaid { display: none !important; }

.pv__capa { position: absolute; inset: 0; z-index: 5; padding: 0; border: 0; background: #000; cursor: pointer; display: block; width: 100%; height: 100%; }
.pv__capa img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.pv__capa img:not([src]) { display: none; }
.pv__play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: #89CC72; display: grid; place-items: center; transition: transform .15s; }
.pv__play svg { width: 24px; height: 24px; fill: #fff; margin-left: 3px; }
.pv__capa:hover .pv__play { transform: scale(1.06); }
.pv__capa:focus-visible .pv__play { outline: 3px solid #fff; outline-offset: 3px; }
.pv__roda { display: none; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 4px solid rgba(255,255,255,.3); border-top-color: #fff; animation: pv-roda .9s linear infinite; }
.is-esperando .pv__play { display: none; }
.is-esperando .pv__roda { display: block; }
.is-iniciado .pv__capa { display: none; }
@keyframes pv-roda { to { transform: rotate(360deg); } }

/* Vídeo que começa sozinho, sem som: o aviso cobre o quadro inteiro. */
.is-previa .plyr__controls { display: none; }
.pv__aviso { position: absolute; inset: 0; z-index: 6; border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center; width: 100%; height: 100%; }
.pv__aviso[hidden], .pv__erro[hidden] { display: none; }
.pv__aviso-caixa { display: grid; justify-items: center; gap: 8px; padding: 16px 22px; border-radius: 10px; max-width: 86%; background: var(--pv-aviso-fundo, #89CC72); color: var(--pv-aviso-texto, #000); font: 700 clamp(14px, 4.2vw, 18px)/1.25 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; text-align: center; animation: pv-pulso 1.8s ease-in-out infinite; }
.pv__aviso-caixa b:empty { display: none; }
.pv__aviso-caixa svg { width: 40px; height: 40px; fill: currentColor; }
@keyframes pv-pulso { 50% { transform: scale(1.04); } }

.pv__erro { position: absolute; inset: 0; z-index: 7; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 16px; background: rgba(0,0,0,.85); color: #fff; font: 500 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; text-align: center; }
.pv__erro p { margin: 0; }
.pv__erro button { border: 0; border-radius: 8px; padding: 10px 18px; background: #89CC72; color: #000; font: inherit; font-weight: 700; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .pv__aviso-caixa, .pv__play { animation: none; transition: none; } }
/* Quadro estreito (celular): o volume é o do aparelho, e o espaço vai pra barra. */
@media (max-width: 480px) { .plyr__volume { width: auto !important; min-width: 0 !important; max-width: none !important; } .plyr__volume input[type=range] { display: none; } }
