/* ===============================
   Popup Pro – Estilos frontend
   =============================== */

#popup-pro-backdrop {
  position: fixed;
  inset: 0;
  display: flex; /* centra el contenido */
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 99999;
  display: none;
  backdrop-filter: blur(2px);
  animation: fadeInBackdrop 0.4s ease forwards;
}

#popup-pro {
  position: relative;
  max-width: 90%;
  width: 540px;
  max-height: 90vh; /* evita que se salga en pantallas pequeñas */
  overflow-y: auto;
  background: #000;
  border-radius: 10px;
  /*overflow: hidden;*/
  box-shadow: 0 0 40px rgba(0,0,0,0.5);
  transform: scale(0.9);
  opacity: 0;
  animation: fadeInPopup 0.4s ease 0.2s forwards;
}

/* Animaciones */
@keyframes fadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes fadeInPopup {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Imagen del popup */
#popup-pro img.img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* ===============================
   Soporte para video adaptable
   =============================== */
#popup-pro .video-wrap {
  position: relative;
  width: 100%;
  background: #000;
  overflow: hidden;
}

/* Control de orientación */
#popup-pro .video-wrap[data-orientation="horizontal"] { aspect-ratio: 16 / 9; }
#popup-pro .video-wrap[data-orientation="vertical"]   { aspect-ratio: 9 / 16; }
#popup-pro .video-wrap[data-orientation="square"]     { aspect-ratio: 1 / 1; }

#popup-pro .video-wrap video,
#popup-pro .video-wrap iframe {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 90vh; /* evita overflow vertical */
}

/* Botón de cierre */
#popup-pro .close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  border: 0;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  text-align: center;
}
#popup-pro .close:hover {
  background: rgba(255,255,255,0.3);
}

/* Enlace completo clicable */
#popup-pro a.link {
  display: block;
  text-decoration: none;
}

/* Responsivo */
@media (max-width: 768px) {
  #popup-pro {
    width: 95%;
  }
  #popup-pro .close {
    top: 8px;
    right: 8px;
    font-size: 28px;
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  #popup-pro {
    width: 100%;
    border-radius: 0;
  }
}
