/* ===============================
   Modal / Dialog
   =============================== */

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.32);
  display: none;
  z-index: 1000;
}

.modal-backdrop.is-open { display: block; }

.modal {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  pointer-events: none; /* only the dialog gets events */
  z-index: 1001;
}

.modal__dialog {
  width: min(92vw, 520px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  padding: var(--space-4);
  pointer-events: auto;
}

.modal__header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-3);
}
.modal__title {
  font-family: var(--font-ui);
  font-weight: 700;
  color: var(--accent-700);
}
.modal__close {
  background: none; border: none; cursor: pointer;
  font-size: 22px; color: var(--text);
}

.modal__body {
  color: var(--text);
  margin-bottom: var(--space-4);
}

.modal__footer {
  display: flex; gap: 8px; justify-content: flex-end;
}
