/* Keyframe animations */
@keyframes fadeInOverlay {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(4px);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translate(-50%, 50px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

@keyframes slideOutDown {
  from {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, 50px) scale(0.95);
  }
}

@keyframes buttonPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Modal Overlay Background */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  backdrop-filter: blur(4px);
  animation: fadeInOverlay 0.4s ease-out forwards;
}

/* Hide the modal by default */
.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(0px);
  animation: none;
}

/* Modal Content Box */
.modal-box {
  background: linear-gradient(135deg, #003f64 0%, #004a75 100%);
  padding: 40px;
  border-radius: 12px;
  max-width: 840px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  font-family: sans-serif;
  position: fixed;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  animation: slideInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.modal-overlay.hidden .modal-box {
  animation: slideOutDown 0.4s ease-in forwards;
}

.modal-box h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #ffffff;
  font-family: "Montserrat", sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.modal-box p {
  color: #e8f1f8;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 30px;
  font-family: "Montserrat", sans-serif;
  opacity: 0.95;
}

/* Button Container & Styling */
.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 28px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  min-width: 120px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: left 0.3s ease-out;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn-cancel {
  background: #f0f2f5;
  color: #003f64;
  box-shadow: 0 4px 12px rgba(240, 242, 245, 0.3);
}

.btn-cancel:hover {
  background: #ffffff;
  color: #003f64;
  box-shadow: 0 8px 20px rgba(240, 242, 245, 0.5);
  transform: translateY(-2px);
}

.btn-cancel:active {
  transform: translateY(0);
}

.btn-continue {
  background: linear-gradient(135deg, #0056b3 0%, #003f99 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 86, 179, 0.4);
}

.btn-continue:hover {
  background: linear-gradient(135deg, #0066cc 0%, #004fb3 100%);
  box-shadow: 0 8px 25px rgba(0, 86, 179, 0.6);
  transform: translateY(-2px);
}

.btn-continue:active {
  transform: translateY(0);
}

/* Responsive design */
@media (max-width: 600px) {
  .modal-box {
    padding: 30px 20px;
    max-width: 95%;
  }

  .modal-box h3 {
    font-size: 22px;
  }

  .modal-box p {
    font-size: 15px;
  }

  .modal-actions {
    gap: 10px;
  }

  .btn {
    padding: 11px 22px;
    font-size: 13px;
    min-width: 100px;
  }
}
