/* modal — native <dialog>, YALNIZ düymələrlə bağlanır.
   frontend-modal-policy.md: backdrop klik və ESC-lə bağlanma QADAĞAN.
   Scrim-də onClick YOXDUR (bu, qadağanın texniki təminatıdır). */

.modal {
  position: relative;
  min-height: 22rem;
  display: grid;
  place-items: center;
  background: var(--bg-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.modal__scrim {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  opacity: 0.55;
  border-radius: inherit;
  /* Qəsdən onClick yoxdur: backdrop klik ilə bağlanma qadağandır. */
}

.modal__dialog {
  position: relative;
  z-index: var(--z-modal);
  width: 100%;
  max-width: 26rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-5) 0;
}

.modal__title {
  margin: 0;
  font-size: var(--size-md);
  font-weight: var(--weight-semibold);
  color: var(--text);
}

.modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  flex: none;
}
.modal__close:hover { background: var(--hover-veil); color: var(--text); }
.modal__close .icon { width: 1.1rem; height: 1.1rem; }

.modal__body {
  padding: var(--space-4) var(--space-5) var(--space-5);
  font-size: var(--size-sm);
  line-height: var(--leading-normal);
  color: var(--text-muted);
}

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

.modal__btn {
  font: inherit;
  font-size: var(--size-sm);
  font-weight: var(--weight-semibold);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.modal__btn:hover { background: var(--hover-veil); }

.modal__btn--danger {
  background: var(--danger);
  color: var(--on-danger);
  border-color: transparent;
}
.modal__btn--danger:hover { opacity: 0.92; }
