/* Contenedor principal (fondo oscuro) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  visibility: hidden; /* Oculto por defecto */
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Mostrar el modal cuando esté activo */
.modal-overlay.active {
  visibility: visible;
  opacity: 1;
}

/* Cuadro del mensaje */
.modal-content {
  background: #fff;
  padding: 2rem;
  border-radius: 8px;
  max-width: 400px;
  width: 90%; /* Responsivo en móviles */
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

/* Tipografía y enlace */
.modal-content h2 {
  color: #d9534f; /* Color de atención */
  margin-top: 0;
}

.modal-content p {
  line-height: 1.6;
  color: #333;
}

.btn-cerrar {
  display: inline-block;
  margin-top: 1.5rem;
  text-decoration: none;
  color: #555;
  font-weight: bold;
  border: 1px solid #ccc;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-cerrar:hover {
  background: #f4f4f4;
  color: #000;
}