/* panel-review.css — the interaction layer's chrome (lib/panel-review.js): the live-critical confirmation dialog,
   the undo / error toast, and the brief row-exit affordance. Structural + role hues via tokens ONLY (no new
   colours/fonts). Reuses .pk-scrim from panel-keyboard.css (both stylesheets ship on the Panel). ADR-0019. */

/* ── the live-critical confirmation (a modal alertdialog — the one explicit clinical handshake, stories 4/5) ──── */
.pk-confirm {
  position: fixed;
  inset: 0;
  z-index: 9600; /* above the palette/sheet (9500) and the depth-2 overlay (9000) */
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16vh 16px 16px;
  box-sizing: border-box;
}
.pk-confirm[hidden] { display: none; }

.pk-confirm-box {
  position: relative;
  width: min(460px, 100%);
  background: var(--surface);
  /* the critical tone: a soft red field + a full-weight left rail — a caution the eye can't miss, never calm */
  border: 1px solid var(--role-critical);
  border-left: 4px solid var(--role-critical);
  border-radius: 12px;
  box-shadow: 0 24px 70px -12px color-mix(in srgb, var(--ink) 45%, transparent);
  padding: 18px 20px 16px;
}
.pk-confirm-box:focus { outline: none; }

.pk-confirm-prompt {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}
.pk-confirm-flags {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--mid);
}
.pk-confirm-flags:empty { display: none; }
.pk-confirm-lead {
  color: var(--role-critical);
  font-weight: 600;
}
.pk-confirm-keys {
  margin: 14px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ── the transient toast / non-blocking error line (bottom-centre; never blocks the panel) ─────────────────────── */
.pk-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  z-index: 9700;
  max-width: min(420px, calc(100vw - 32px));
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 14px 34px -14px color-mix(in srgb, var(--ink) 60%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}
.pk-toast[hidden] { display: none; }
.pk-toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
/* an error wears the attention (amber) tone — distinct from the neutral "Brought back" confirmation */
.pk-toast.error {
  background: var(--role-attention);
  color: var(--paper);
}

/* ── the brief row-exit affordance: a Done'd row fades + collapses before it leaves the DOM (host adds the class) ─ */
.row-host.review-clearing {
  transition: opacity 0.18s ease, transform 0.18s ease;
  opacity: 0;
  transform: translateX(10px);
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .pk-toast { transition: none; }
  .row-host.review-clearing { transition: none; }
}
