.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-7);
  background: var(--bg-overlay);
}

.modal-backdrop.is-open {
  display: flex;
}

.modal {
  width: min(100%, 640px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xl);
}

.modal--sm {
  width: min(100%, 480px);
}

.modal--lg {
  width: min(100%, 800px);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-7);
}

.modal__title {
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: var(--leading-h2);
}

.modal__body {
  padding: 0 var(--space-7) var(--space-7);
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-7);
  border-top: 1px solid var(--border-subtle);
}
