/* ══════════════════════════════════════
   ALERT OVERLAY (ENHANCED iOS SPRING)
══════════════════════════════════════ */
.alert-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: 
    background 0.25s ease,
    backdrop-filter 0.25s ease;
}

.alert-overlay.show {
  display: flex;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  animation: overlayFadeInAlert 0.25s ease forwards;
}

@keyframes overlayFadeInAlert {
  from {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
  }
  to {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
  }
}

/* Alert box – enhanced spring bounce */
.alert-box {
  background: #fff;
  padding: 15px 60px;
  border-radius: 24px;
  max-width: 350px;
  width: 85%;
  text-align: center;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  transform-origin: center;
  will-change: transform, opacity;
  animation: alertSpringIn 0.45s cubic-bezier(0.12, 0.71, 0.33, 1) forwards;
}

/* Optional: closing animation (if you add .closing class) */
.alert-box.closing {
  animation: alertSpringOut 0.25s cubic-bezier(0.5, 0, 0.2, 1) forwards;
}

@keyframes alertSpringIn {
  0% {
    opacity: 0;
    transform: scale(0.82) translateY(12px);
  }
  45% {
    opacity: 1;
    transform: scale(1.04) translateY(0px);   /* overshoot */
  }
  70% {
    transform: scale(0.97) translateY(0px);   /* undershoot */
  }
  88% {
    transform: scale(1.01) translateY(0px);   /* tiny bounce */
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes alertSpringOut {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.9) translateY(8px);
  }
}

/* Inner content fade‑up (kept, but slightly delayed for smoothness) */
.alert-box h3,
.alert-box p,
.alert-box button {
  animation: fadeUpAlert 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
  opacity: 0;
  animation-delay: 0.08s;
}

@keyframes fadeUpAlert {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Rest of your styles – unchanged */
.alert-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 15px auto;
}

.alert-box h3 {
  margin-bottom: 12px;
  font-size: 20px;
  color: #222;
  font-weight: 600;
}

.alert-box p {
  margin-bottom: 20px;
  font-size: 15px;
  color: #555;
  line-height: 1.5;
}

.alert-box button {
  padding: 10px 24px;
  border: none;
  background: #444;
  color: #fff;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.alert-box button:hover {
  background: #000000;
  transform: scale(1.05);
}