/* Bootstrap 5 Modal Fixes */

/* Ensure modal backdrop covers entire viewport */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

.modal-backdrop.fade {
  opacity: 0;
}

.modal-backdrop.show {
  opacity: 0.5;
}

/* Ensure modal is centered and on top */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

.modal.fade {
  opacity: 0;
  transition: opacity 0.15s linear;
}

.modal.show {
  display: block;
  opacity: 1;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: 1.75rem;
  pointer-events: none;
}

.modal.fade .modal-dialog {
  transition: transform .3s ease-out;
  transform: translate(0, -50px);
}

.modal.show .modal-dialog {
  transform: none;
}

.modal-dialog-centered {
  display: flex;
  align-items: center;
  min-height: calc(100% - (1.75rem * 2));
}

.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  pointer-events: auto;
  background-color: #fff;
  background-clip: padding-box;
  outline: 0;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Custom styles for our success modal */
.contact-success-modal {
  border: none;
  border-radius: 16px;
  overflow: hidden;
  animation: fadeInUp 0.4s ease-out;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.contact-success-modal .modal-body {
  padding: 48px 40px 40px;
  background: white;
}

/* Modal Title */
.modal-success-title {
  color: #1e3a8a;
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 24px 0;
  letter-spacing: -0.02em;
}

/* Message wrapper */
.modal-message-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
}

.modal-success-message {
  color: #374151;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

/* Green checkmark circle */
.success-checkmark-circle {
  width: 32px;
  height: 32px;
  background: #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-checkmark-circle i {
  color: white;
  font-size: 18px;
}

/* Info text */
.modal-info-text {
  color: #6b7280;
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 32px 0;
}

/* Close button */
.modal-close-btn {
  min-width: 140px;
  padding: 12px 24px;
  font-weight: 600;
}

@keyframes bounceIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive modal sizing */
@media (min-width: 576px) {
  .modal-dialog {
    max-width: 500px;
    margin: 1.75rem auto;
  }
}

/* Fix for body scroll when modal is open */
body.modal-open {
  overflow: hidden;
  padding-right: 0 !important;
}

/* Fade out animation for alerts */
.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}