/* ============================================================
   TOASTS
   ============================================================ */

/* Fixed strip centred horizontally at the bottom of the screen.
   `pointer-events: none` on the region lets clicks pass through the
   empty space around toasts; individual toasts re-enable pointer-events
   (below) so they can be dismissed if needed. */
.toast-region {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: min(92vw, 400px);   /* 92% on narrow screens, capped at 400px */
  pointer-events: none;
}

/* Pill-shaped toast. Starts invisible + slid down, then JS adds
   .is-visible to fade and slide it into place. */
.toast {
  pointer-events: auto;      /* re-enable clicks on the toast itself */
  background: var(--maroon-950);
  color: var(--cream);
  border: 1px solid rgba(249, 241, 228, .15);
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-pop);
  display: flex;
  align-items: center;
  gap: 9px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  max-width: 100%;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Leading icon — gold by default (success / info). */
.toast svg {
  flex: none;
  color: var(--gold);
}

/* Error variant — icon turns red to signal failure. */
.toast.toast-error svg {
  color: #E27C7C;
}

/* Shared framing for the supporting sections below the catalogue. */
/* Dashed "demo area" frame to visually separate example content. */
.demo-frame {
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 6px;
}

.demo-note {
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
  margin: 10px 0 26px;
}

/* Small reusable layout and visibility helpers. */
/* Screen-reader-only: visually hidden but still read out by assistive tech.
   This is the canonical "sr-only" recipe — safe to reuse anywhere. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}