/* OVERLAYS DE PREMIO EN VÍDEO — Wheel Big Winner
   BIG WIN / MEGA WIN / SUPER WIN / BONUS FREE SPINS como vídeo con transparencia
   (WebM VP9 alfa; en Safari/iOS MP4 apilado compuesto en canvas), por encima de los
   rodillos y por debajo de los textos del juego (importe, botones). */

#wbw-overlays {
  position: fixed;
  inset: 0;
  z-index: 8000;              /* sobre el juego (<=100), bajo la mascota (9000) y la paytable (100000) */
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#wbw-overlays .wbw-ov-media {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(100vw, 177.78vh);          /* 16:9 contenido en el viewport */
  height: min(56.25vw, 100vh);
  transform: translate(-50%, -50%) scale(.6);
  object-fit: contain;
  opacity: 0;
  transition: opacity .25s ease, transform .45s cubic-bezier(.2, 1.4, .4, 1);
  filter: drop-shadow(0 0 24px rgba(255, 200, 60, .45));
}
#wbw-overlays .wbw-ov-media.is-active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Destello de fondo detrás del overlay */
#wbw-overlays .wbw-ov-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 45%, rgba(255, 215, 94, .35), rgba(255, 150, 0, .12) 35%, rgba(0, 0, 0, 0) 70%);
  opacity: 0;
  transition: opacity .3s ease;
}
#wbw-overlays.show .wbw-ov-flash { opacity: 1; animation: wbw-flash-pulse 1.6s ease-in-out infinite; }
#wbw-overlays.kind-bonus .wbw-ov-flash {
  background: radial-gradient(ellipse at 50% 45%, rgba(140, 210, 255, .35), rgba(40, 90, 220, .14) 35%, rgba(0, 0, 0, 0) 70%);
}
@keyframes wbw-flash-pulse {
  0%, 100% { transform: scale(1);    opacity: .85; }
  50%      { transform: scale(1.06); opacity: 1; }
}

/* El overlay nativo del bundle (texto plano "BIG WIN") se oculta mientras el vídeo está activo;
   el importe ($xx.xx) se mantiene y se recoloca debajo del vídeo. */
body.wbw-ov-active .big-win-overlay h2 { opacity: 0 !important; }
body.wbw-ov-active .big-win-overlay .big-win-text {
  transform: translateY(26vh);
}
/* Intro del bonus: el cuadro nativo se vuelve transparente, el vídeo FREE SPINS ocupa el centro
   y el botón START / textos quedan debajo del vídeo. */
body.wbw-ov-active.kind-bonus .bonus-overlay-content {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  transform: translateY(24vh);
}
body.wbw-ov-active.kind-bonus .bonus-overlay-content h2:first-child { opacity: 0 !important; height: 0; margin: 0 !important; }

/* Móvil vertical: el vídeo ocupa el ancho y se centra sobre los rodillos */
@media (orientation: portrait) {
  #wbw-overlays .wbw-ov-media {
    width: 100vw;
    height: 56.25vw;
    top: 55%;
  }
  body.wbw-ov-active .big-win-overlay .big-win-text { transform: translateY(18vh); }
  body.wbw-ov-active.kind-bonus .bonus-overlay-content { transform: translateY(16vh); }
}
