
/* ── MODAL ── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
  padding: 20px;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal-container {
  background: #ffffff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  border: 1px solid var(--gray-200);
}
.modal-overlay.open .modal-container {
  transform: translateY(0);
}
.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,0.05);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-900);
  font-weight: 500;
  transition: background 0.2s;
  z-index: 10;
}
.modal-close-btn:hover {
  background: rgba(0,0,0,0.1);
  color: var(--gray-900);
}
.modal-body {
  padding: 0; /* Let inner content define padding if needed, usually sections have it */
}
/* Adjustments for content inside modal */
.modal-container .domain-section {
  border: none;
  border-radius: 0;
  margin-bottom: 0;
}
.modal-container .domain-section-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--white); /* Ensure sticky header has background */
  border-bottom: 1px solid var(--gray-200);
}
