/* ───────────────────────────────────────────────────────────────────────────
   confirm-dialog.css — the shared in-page confirm dialog (/js/confirm-dialog.js),
   in place of the native confirm(). Tokens only (css/penna-tokens.css).
   First used by Settings (phase 2, PR 2: unsaved changes); PR 5 moved the
   page's other confirm()/alert() calls, the pause dialog and the base-currency
   dialog onto it.
   ─────────────────────────────────────────────────────────────────────────── */

.pp-confirm {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: color-mix(in srgb, var(--ink) 45%, transparent);
}
.pp-confirm[hidden] { display: none; }

.pp-confirm__dialog {
  width: 100%;
  max-width: 420px;
  padding: 24px;
  background: var(--paper-hi);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.pp-confirm__title {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.pp-confirm__body {
  margin: 0 0 20px;
  font-size: .9rem;
  line-height: 1.5;
  color: var(--ink-2);
}

.pp-confirm__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

/* A node the caller supplies between the text and the buttons (the pause
   dialog's date field). */
.pp-confirm__content { margin: 0 0 20px; }
.pp-confirm__body + .pp-confirm__content { margin-top: -8px; }
.pp-confirm__content > .pp-confirm__body:last-child { margin-bottom: 0; }

.pp-confirm__label {
  display: block;
  margin: 0 0 6px;
  font-size: .83rem;
  font-weight: 600;
  color: var(--ink);
}
.pp-confirm__date {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-size: .9rem;
  font-family: inherit;
}
.pp-confirm__error {
  margin: 10px 0 0;
  font-size: .82rem;
  color: var(--danger);
}
.pp-confirm__error[hidden] { display: none; }

/* A dialog with several fields (the cancel-invoice dialog, js/cancel-invoice-dialog.js):
   a reason, an "email it" tick box and the address + message it reveals. */
.pp-confirm__field { margin: 0 0 12px; }
.pp-confirm__input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-size: .9rem;
  font-family: inherit;
}
textarea.pp-confirm__input { resize: vertical; min-height: 64px; }
.pp-confirm__check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  /* A sentence, not a field label: undo main.css's uppercase mono `label`. */
  font-family: var(--sans);
  font-size: .88rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--ink);
  cursor: pointer;
}
.pp-confirm__group[hidden] { display: none; }
/* A value shown under a field label, not typed (the contract in the withdrawal
   dialog, js/settings-withdrawal.js). */
.pp-confirm__value {
  display: block;
  font-size: .9rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.pp-confirm__warn {
  padding: 10px 12px;
  border: 1px solid var(--warning-br);
  border-radius: var(--radius);
  background: var(--warning-bg);
  color: var(--ink);
}
.pp-confirm__content > .pp-confirm__warn { margin-bottom: 14px; }
.pp-confirm__content > .pp-confirm__field:last-of-type { margin-bottom: 0; }

/* An error toast raised while a dialog is open (the pause request failing, a
   save error behind a currency confirm) has to stay readable: main.css keeps
   .toast at 1250, below this overlay. */
body > .toast { z-index: 10001; }

/* A button under a dialog field (the renew-link dialog's Copy link). */
.pp-confirm__field > .btn { margin-top: 8px; }
