/* Modal Overlay - Consistent background for all modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(75, 85, 99, 0.5); /* gray-600 with 50% opacity */
  z-index: 50;
  overflow-y: auto;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hide modal when hidden class is present */
.modal-overlay.hidden {
  display: none;
}

/* Modal backdrop (clickable area to close) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(75, 85, 99, 0.5); /* gray-600 with 50% opacity */
  transition: opacity 0.3s ease-in-out;
}

/* Modal content container */
.modal-content {
  position: relative;
  background-color: white;
  border-radius: 0.75rem; /* rounded-xl */
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* shadow-2xl */
  max-width: 32rem; /* max-w-lg */
  width: 100%;
  margin: 1rem;
  max-height: 90vh;
  overflow-y: auto;
}

/* Large modal content */
.modal-content-lg {
  max-width: 56rem; /* max-w-4xl */
}

/* Extra large modal content */
.modal-content-xl {
  max-width: 72rem; /* max-w-6xl */
}

/* Modal header */
.modal-header {
  position: sticky;
  top: 0;
  background-color: white;
  border-bottom: 1px solid rgb(229, 231, 235); /* border-gray-200 */
  padding: 1rem 1.5rem;
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
  z-index: 10;
}

/* Modal body */
.modal-body {
  padding: 1.5rem;
}

/* Modal footer */
.modal-footer {
  background-color: rgb(249, 250, 251); /* bg-gray-50 */
  padding: 0.75rem 1.5rem;
  display: flex;
  flex-direction: row-reverse;
  gap: 0.75rem;
  border-bottom-left-radius: 0.75rem;
  border-bottom-right-radius: 0.75rem;
}

@media (min-width: 640px) {
  .modal-footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
