/* ==========================================================================
   BIOLÓGICAS SRL - MODAL FLYER DE BIENVENIDA / NUEVAS LÍNEAS DE IMPORTACIÓN
   Archivo desacoplado e independiente de los bundles principales de Vue.
   Ajustado para presentación profesional a gran escala en Desktop y Mobile.
   ========================================================================== */

:root {
  --flyer-z-index: 999999;
  --flyer-transition-duration: 320ms;
}

/* Bloqueo sutil de scroll cuando el modal está activo */
body.flyer-modal-open {
  overflow: hidden;
}

/* Contenedor principal de fondo (Overlay / Backdrop) */
.flyer-modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(10, 15, 25, 0.88);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: var(--flyer-z-index);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--flyer-transition-duration) cubic-bezier(0.16, 1, 0.3, 1),
              visibility var(--flyer-transition-duration) ease;
}

/* Estado activo: apertura suave */
.flyer-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Envoltorio del contenido del flyer (ajuste matemático exacto al flyer: 88vh en Desktop, 94vw en Mobile) */
.flyer-modal-dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  max-width: 90vw;
  max-height: 88vh;
  width: min(calc(88vh * 2 / 3), 90vw);
  background: transparent;
  border-radius: 8px;
  transform: scale(0.96) translateY(8px);
  opacity: 0;
  transition: transform var(--flyer-transition-duration) cubic-bezier(0.16, 1, 0.3, 1),
              opacity var(--flyer-transition-duration) ease;
}

.flyer-modal-backdrop.is-open .flyer-modal-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Botón de cierre superior circular '✕' */
.flyer-modal-close-btn {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: #0f172a;
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.95);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.55);
  transition: background-color 180ms ease, transform 180ms ease;
  z-index: 50;
  -webkit-tap-highlight-color: transparent;
}

.flyer-modal-close-btn:hover {
  background-color: #c8102e;
  transform: scale(1.08);
}

.flyer-modal-close-btn:active {
  transform: scale(0.95);
}

.flyer-modal-close-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

/* Contenedor de la imagen del flyer */
.flyer-modal-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  max-height: 88vh;
  user-select: none;
  -webkit-user-select: none;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.75),
              0 0 0 1px rgba(255, 255, 255, 0.15);
  background-color: #ffffff;
}

/* Imagen del flyer: Gran escala en Desktop (88% del alto de la ventana) */
.flyer-modal-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 88vh;
  aspect-ratio: 1000 / 1500;
  object-fit: contain;
  margin: 0 auto;
}

/* Barra inferior de navegación: ULTRA DISCRETA Y SUBORDINADA AL FLYER */
.flyer-modal-nav {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: rgba(15, 23, 42, 0.65);
  padding: 3px 8px;
  border-radius: 16px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 20;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transition: opacity 200ms ease;
}

.flyer-modal-nav:hover {
  background-color: rgba(15, 23, 42, 0.85);
}

.flyer-modal-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 180ms ease;
}

.flyer-modal-dot.is-active {
  width: 16px;
  border-radius: 4px;
  background-color: #ffffff;
}

.flyer-modal-nav-arrow {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  transition: color 150ms ease;
}

.flyer-modal-nav-arrow:hover {
  color: #ffffff;
}

/* ==========================================================================
   OPTIMIZACIONES RESPONSIVE (MOBILE Y PANTALLAS PEQUEÑAS)
   ========================================================================== */
@media (max-width: 640px) {
  .flyer-modal-backdrop {
    padding: 12px;
  }
  
  .flyer-modal-dialog {
    width: 94vw;
    max-width: 94vw;
    max-height: 90vh;
  }

  .flyer-modal-media {
    width: 100%;
    max-width: 94vw;
    max-height: 90vh;
  }

  /* En Mobile: Priorizar ancho (94vw) y ajustar alto sin cortar */
  .flyer-modal-img {
    width: 100%;
    height: auto;
    max-height: 90vh;
    aspect-ratio: 1000 / 1500;
    object-fit: contain;
  }

  /* Botón de cierre en Mobile: Cómodo para touch, dentro del viewport */
  .flyer-modal-close-btn {
    top: 8px;
    right: 8px;
    width: 42px;
    height: 42px;
  }

  .flyer-modal-nav {
    bottom: 8px;
    padding: 2px 7px;
  }
}
