/* ===== OVERLAY ===== */
.alerta-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s ease, visibility .3s ease;
  z-index: 2000;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.alerta-overlay.active { visibility: visible; opacity: 1; }

/* ===== CAJA ===== */
.alerta-box {
  box-sizing: border-box;
  background: rgba(0,0,0,0.85);
  border: 2px solid #FFB703;
  border-radius: 16px;
  padding: clamp(16px, 4vw, 28px) clamp(16px, 4vw, 32px);
  width: min(92vw, 480px);
  max-width: 100%;
  max-height: 80vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 16px;
  text-align: center;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: fadeInScale .4s ease;
  transform-origin: center;
  display: grid;
  gap: clamp(10px, 2.5vw, 16px);
}

/* ===== ÍCONO ===== */
.alerta-icon {
  font-size: clamp(36px, 8vw, 52px);
  color: #FFB703;
}

/* ===== TEXTO ===== */
#alerta-mensaje {
  font-size: clamp(0.95rem, 2.6vw, 1rem);
  line-height: 1.6;
  color: #eee;
  margin: 0;
}

/* ===== BOTÓN ===== */
#alerta-btn {
  background: #FFB703;
  color: #000;
  border: none;
  padding: clamp(10px, 3vw, 12px) clamp(18px, 5vw, 26px);
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-size: clamp(0.95rem, 2.6vw, 1rem);
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 4px 12px rgba(255,183,3,.4);
  width: 100%;
}
#alerta-btn:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,255,255,.25);
}

/* ===== ANIMACIÓN ===== */
@keyframes fadeInScale {
  0% { opacity: 0; transform: scale(.94); }
  100% { opacity: 1; transform: scale(1); }
}

/* ===== RESPONSIVE EXTRA ===== */
@media (min-width: 600px) {
  #alerta-btn { width: auto; }
}
@media (min-width: 1200px) {
  .alerta-box { width: 500px; max-height: 70vh; }
}

/* ===== ACCIONES (2 botones) ===== */
.alerta-actions{
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Botón cancelar */
#alerta-cancelar{
  display: none; /* 🔥 oculto por defecto (para no afectar otros modales) */
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  padding: clamp(10px, 3vw, 12px) clamp(18px, 5vw, 26px);
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  font-size: clamp(0.95rem, 2.6vw, 1rem);
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
}

#alerta-cancelar:hover{
  background: rgba(255,255,255,.08);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255,255,255,.15);
}

/* Si quieres que los 2 botones ocupen ancho en móvil */
@media (max-width: 599px){
  .alerta-actions button{
    width: 100%;
  }
}
