/* Overlay a pantalla completa y centrado */
.modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* El contenedor NO scrollea: flex column y limita alto total */
.modal__container {
  position: relative; /* para anclar la × si la mueves absoluta */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 900px;
  max-height: 90vh; /* no exceder viewport */
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  padding-top: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  overflow: hidden; /* ← el contenedor no hace scroll */
  min-height: 0; /* ← permite que el hijo se encoja */
}

/* En escritorio: 60% del ancho */
@media (min-width: 768px) {
  .modal__container {
    width: 60%;
  }
}

/* Header fijo (no se mueve) */
.modal__header {
  position: relative; /* puedes cambiar a sticky si quisieras */
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto; /* nunca se encoge */
  z-index: 1;
  padding-bottom: 15px;
}

.modal__title {
  margin: 0;
  font-family: Verdana, Geneva, sans-serif;
  color: #1b1b61;
  width: 100%;
  text-align: center;
}

/* Botón de cerrar (×) dentro del header */
.modal__close {
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 9999px;
  font-size: 1.2rem;
  font-weight: bold;
  line-height: 1;
  color: #374151;
  cursor: pointer;
}
.modal__header .modal__close::before {
  content: "\2715";
}
.modal__close:focus {
  outline: none;
}

/* SOLO aquí hay scroll (y sin barra visible) */
.modal__content {
  flex: 1 1 auto; /* ocupa el espacio sobrante */
  min-height: 0; /* ← crucial para que scrollee */
  overflow: auto; /* ← scroll aquí */
  -webkit-overflow-scrolling: touch;
  padding: 1rem 0;
  line-height: 1.5;
  color: rgba(0, 0, 0, 0.8);

  /* ocultar barra */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge antiguo */
}
.modal__content::-webkit-scrollbar {
  display: none;
}

/* Micromodal: visible/oculto + animaciones (si las usas) */
.modal {
  display: none;
}
.modal.is-open {
  display: block;
}

@keyframes mmfadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes mmfadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes mmslideIn {
  from {
    transform: translateY(15%);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes mmslideOut {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-10%);
  }
}

.micromodal-slide {
  display: none;
}
.micromodal-slide.is-open {
  display: block;
}
.micromodal-slide[aria-hidden="false"] .modal__overlay {
  animation: mmfadeIn 0.3s cubic-bezier(0, 0, 0.2, 1);
}
.micromodal-slide[aria-hidden="false"] .modal__container {
  animation: mmslideIn 0.3s cubic-bezier(0, 0, 0.2, 1);
}
.micromodal-slide[aria-hidden="true"] .modal__overlay {
  animation: mmfadeOut 0.3s cubic-bezier(0, 0, 0.2, 1);
}
.micromodal-slide[aria-hidden="true"] .modal__container {
  animation: mmslideOut 0.3s cubic-bezier(0, 0, 0.2, 1);
}
.micromodal-slide .modal__container,
.micromodal-slide .modal__overlay {
  will-change: transform;
}
