/* last */
.survey-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.survey-modal-window {
  background: #fff;
  border-radius: 8px;
  padding: 1em;
  width: 90%;
  max-width: 700px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  height: auto;
}
.survey-modal-window iframe {
  width: 100%;
  height: 400px;
  border: none;
  height: 50vh;
}
.survey-close {
  margin-top: 10px;
  padding: 0.5em 1em;
  background: #004aad;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: max-content;
}
/* end last */

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.popup-window {
  background: #fff;
  border-radius: 8px;
  padding: 1em;
  width: 90%;
  max-width: 700px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  height: auto;
}
.popup-window iframe {
  width: 100%;
  height: 400px;
  border: none;
  height: 50vh;
}
.close-popup {
  margin-top: 10px;
  padding: 0.5em 1em;
  background: #004aad;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: max-content;
}





/**
 * Estilos para el popup modal que contiene el iframe.
 */

/* 1. Contenedor principal del popup (Overlay) */
#global-iframe-popup {
    /* Oculto por defecto (JS lo cambia a 'flex' para mostrarlo) */
    display: none;

    position: fixed;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;

    /* Overlay oscuro y translúcido */
		background: rgba(0,0,0,0.65);

    /* Alto z-index para estar sobre todo el contenido del sitio */
    z-index: 10000;

    /* Centrado del contenido con Flexbox */
    transform: translate(-50%, -50%);
    display: flex;
    justify-content: center;
    align-items: center;

}

/* 2. Contenido del Popup (Caja que contiene el iframe y el botón) */
#global-iframe-popup-content {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    position: relative; /* Necesario para posicionar el botón de cierre */

    /* Tamaños y responsividad */
    max-width: 90vw;
    width: 600px; /* Ancho deseado, se adapta al max-width */
    max-height: 90vh;
    overflow: hidden;
}

/* 3. Estilos para el Iframe */
#global-iframe-popup-content iframe {
    display: block;
    width: 100%;
    /* La altura debe ajustarse según el contenido del iframe, 450px es un buen inicio */
    height: 450px;
    border: none;
}

/* 4. Botón de cerrar (.close-btn) */
#global-iframe-popup .close-btn {
    position: absolute;
    top: calc(50% - 300px - 15px); /* Ajustar verticalmente: 50% de la pantalla - (ancho/2 del modal) - (offset del botón) */
    right: calc(50% - 300px - 15px); /* Ajustar horizontalmente: 50% de la pantalla - (ancho/2 del modal) - (offset del botón) */
    cursor: pointer;

    /* Estilo visual */
    font-size: 1.2rem;
    background: #e63946;
    color: white;
    border: 2px solid white;
    padding: 5px 10px;
    border-radius: 50%;
    line-height: 1;
    font-weight: bold;
    /* Aumenta el z-index para garantizar que esté encima del iframe (z-index: 10000) */
    z-index: 10002;
    transition: background 0.2s;
}

#global-iframe-popup-content .close-btn:hover {
    background: #c02d38;
}