/* File: web/modules/custom/via_video_splash/css/via-video-splash-modal.css */

.via-video-splash[hidden] {
  display: none !important;
}

.via-video-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.via-video-splash__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
}

.via-video-splash__dialog {
  position: relative;
  z-index: 1;

  /* Modal más ancho (sin pasarse de la pantalla) */
  max-width: 1100px;
  width: calc(100% - 2rem);

  margin: 3rem auto;
  background: #fff;
  border-radius: 12px;
  outline: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.via-video-splash__close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  font-size: 2rem;
  line-height: 2.5rem;
  cursor: pointer;
  z-index: 2;
}

.via-video-splash__content {
  padding: 1rem;
}

/* Video HTML5 a 100% del modal */
.via-video-splash__video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/*
  Iframe YouTube responsivo:
  - Ocupa 100% de ancho del modal
  - Mantiene proporción 16:9
  - Alto ajustado por proporción (lo correcto para iframe)
*/
.via-video-splash__iframe-wrap {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;

  /* 16:9 */
  padding-top: 56.25%;
}

.via-video-splash__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Evitar scroll del fondo cuando está abierto */
.via-video-splash--open {
  overflow: hidden;
}
