/* ==========================================================================
   MODALS & LIGHTBOXES COMPONENT - HIGH CONTRAST PRODUCTION STYLING
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  background: #FFFFFF;
  border: 1px solid var(--color-slate-200);
  border-radius: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  color: var(--color-slate-900);
  transform: scale(0.95) translateY(15px);
  transition: all 0.3s ease;
  position: relative;
}

.modal-backdrop.active .modal-window {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #0F172A 0%, #0B5059 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top-left-radius: 19px;
  border-top-right-radius: 19px;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #EF4444;
  color: #FFFFFF;
}

.modal-body {
  padding: 2rem;
  background: #FFFFFF;
}

.modal-body .form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-body .form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-slate-800);
}

.modal-body .form-control {
  width: 100%;
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  color: #0F172A;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-body .form-control:focus {
  outline: none;
  background: #FFFFFF;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11, 79, 108, 0.12);
}

.modal-body select.form-control option {
  background-color: #FFFFFF;
  color: #0F172A;
}

@media (max-width: 600px) {
  .modal-backdrop {
    padding: 0.75rem;
  }

  .modal-window {
    max-height: 95vh;
    border-radius: 16px;
  }

  .modal-header {
    padding: 1rem 1.25rem;
  }

  .modal-body {
    padding: 1.25rem 1rem;
  }
}