/* =========================================================
   PLAYER VSL — visual (cópia fiel do player do quiz Chile)
   Cores principais: roxo #8b2fe0 / #9b3ce6 → rosa #d24193.
   Para trocar a cor, mude só as variáveis abaixo.
   ========================================================= */
.vsl {
  --vsl-roxo: 139, 47, 224;           /* botão "Toca para escuchar" e botão play/pausa (RGB) */
  --vsl-grad-1: #9b3ce6;              /* botões "Continuar / Seguir viendo" (início do degradê) */
  --vsl-grad-2: #d24193;              /* (fim do degradê) */
  --vsl-barra-1: #8a2be2;             /* barra de progresso */
  --vsl-barra-2: #a64dd8;
  --vsl-alerta: #e0455a;              /* aviso "¡Atención!" */
  --vsl-texto-escuro: #2a2a3c;

  position: relative; width: 80%; max-width: 300px; margin: 0 auto; aspect-ratio: 9 / 16;
  border-radius: 16px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 2px rgba(170,105,238,.16), 0 8px 22px rgba(70,35,95,.12);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
/* vídeo horizontal (16:9): adicione data-formato="16:9" no <div> do player */
.vsl[data-formato="16:9"] { width: 100%; max-width: 720px; aspect-ratio: 16 / 9; }

.vsl video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.vsl-layer {
  position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; padding: 18px; text-align: center;
}
.vsl-layer[hidden], .vsl-alert[hidden] { display: none; }
.vsl-unmute { background: rgba(20,8,40,.22); cursor: pointer; }
.vsl-unmute-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 18px;
  border: none; border-radius: 16px; background: rgba(var(--vsl-roxo), .94); color: #fff;
  font-family: inherit; cursor: pointer; box-shadow: 0 8px 24px rgba(var(--vsl-roxo), .45);
  animation: vslPulse 1.4s ease-in-out infinite;
}
.vsl-unmute-top { font-size: 14px; font-weight: 800; }
.vsl-unmute-icon { font-size: 34px; line-height: 1; }
.vsl-unmute-bottom { font-size: 13px; font-weight: 700; opacity: .95; }
.vsl-resume, .vsl-paused { background: rgba(20,8,40,.78); color: #fff; }
.vsl-resume-title { font-weight: 800; font-size: 16px; margin: 0 0 4px; line-height: 1.25; }
.vsl-btn {
  width: 100%; max-width: 220px; padding: 12px 14px; border-radius: 12px;
  font-family: inherit; font-weight: 800; font-size: 14px; cursor: pointer;
}
.vsl-btn-main {
  border: none; color: #fff; background: linear-gradient(90deg, var(--vsl-grad-1) 0%, var(--vsl-grad-2) 100%);
  box-shadow: 0 6px 16px rgba(155,60,230,.4);
}
.vsl-btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.75); }
.vsl-alert {
  background: #fff; color: var(--vsl-texto-escuro); border: 2px solid var(--vsl-alerta); border-radius: 14px;
  padding: 14px 14px 12px; max-width: 240px; box-shadow: 0 8px 22px rgba(224,69,90,.35);
}
.vsl-alert-icon { font-size: 30px; line-height: 1; display: inline-block; animation: vslShake 1.2s ease-in-out infinite; }
.vsl-alert-title {
  margin: 6px 0 4px; font-weight: 900; color: var(--vsl-alerta); font-size: 15px;
  text-transform: uppercase; letter-spacing: .3px;
}
.vsl-alert-text { margin: 0; font-size: 13px; line-height: 1.35; font-weight: 600; }
.vsl-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: rgba(255,255,255,.22); z-index: 2; }
.vsl-progress-fill {
  height: 100%; width: 0%; background: linear-gradient(90deg, var(--vsl-barra-1) 0%, var(--vsl-barra-2) 100%);
  transition: width .35s linear;
}
.vsl-pp {
  position: absolute; left: 10px; bottom: 17px; z-index: 2; width: 30px; height: 30px; padding: 0;
  border: none; border-radius: 50%; background: rgba(var(--vsl-roxo), .92); cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.vsl-pp::before {            /* ícone de pausa (vídeo tocando) */
  content: ""; width: 10px; height: 12px; box-sizing: border-box;
  border-left: 3px solid #fff; border-right: 3px solid #fff;
}
.vsl.is-paused .vsl-pp::before {   /* ícone de play (vídeo pausado) */
  width: 0; height: 0; margin-left: 3px; border-right: 0;
  border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.vsl.is-preview .vsl-progress, .vsl.is-preview .vsl-pp { display: none; }
.vsl-loading {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; z-index: 2;
  border-radius: 50%; border: 4px solid rgba(255,255,255,.35); border-top-color: var(--vsl-barra-2);
  animation: vslSpin .8s linear infinite; pointer-events: none;
}
.vsl-loading[hidden] { display: none; }
@keyframes vslSpin { to { transform: rotate(360deg); } }
.vsl-fail { background: rgba(20,8,40,.84); color: #fff; }
.vsl-fail-text { margin: 0 0 6px; font-size: 13px; line-height: 1.35; opacity: .9; }
@keyframes vslPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes vslShake {
  0%, 70%, 100% { transform: rotate(0); }
  10%, 30%, 50% { transform: rotate(-12deg); }
  20%, 40%, 60% { transform: rotate(12deg); }
}
@media (prefers-reduced-motion: reduce) {
  .vsl-unmute-btn, .vsl-alert-icon { animation: none; }
}

/* Botão/bloco que só aparece no tempo definido (data-cta) */
.vsl-cta-oculto { display: none !important; }
