/* =============================================================================
   BLACK SIGNAL — css/components/toast.css
   THE TOAST — one notification shape for the whole app (bs_toast.js).
   A compact band strip (mono eyebrow + square close key) over a black body
   with one Barlow line and an optional sweep action. Stacked bottom-right,
   at most three; on phones it sits above the bottom bar, full width.
   The error kind takes the wrong-answer alert treatment.
   ============================================================================= */
@layer components {

.bs-toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.bs-toast {
  width: 100%;
  pointer-events: auto;
  background: var(--sig-black);
  border: 1px solid var(--sig-rule-strong);
  color: var(--sig-ink);
  animation: bsToastIn var(--dur) var(--ease-sharp) both;
}
.bs-toast.is-leaving { animation: bsToastOut 180ms var(--ease-standard) both; }
@keyframes bsToastIn  { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes bsToastOut { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }

.bs-toast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 32px;
  padding: 0 0 0 14px;
  background: var(--orange);
  color: var(--accent-on-accent);
}
.bs-toast-title {
  font-family: var(--sig-mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: var(--sig-eyebrow-track);
  text-transform: uppercase;
  color: var(--accent-on-accent);
}
.bs-toast-close {
  --sweep-fill: var(--accent-on-accent);
  --sweep-ink: var(--orange);
  width: 32px; height: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0;
  background-color: var(--accent-on-accent);
  color: var(--orange);
  font-size: 15px; line-height: 1;
  clip-path: none;
}
.bs-toast-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px 13px;
}
.bs-toast-msg {
  flex: 1 1 auto;
  margin: 0;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--sig-ink);
}
.bs-toast-action { flex: 0 0 auto; height: 34px; }

/* Error: the wrong-answer treatment */
.bs-toast--error { border-color: var(--sig-alert-rule); background: var(--sig-alert-bg); }
.bs-toast--error .bs-toast-head { background: var(--sig-alert-ink); }
.bs-toast--error .bs-toast-close { color: var(--sig-alert-ink); --sweep-ink: var(--sig-alert-ink); }

/* Under the frame on phones: above the bottom bar, edge to edge */
@media (max-width: 599px) {
  .bs-toast-stack { left: 16px; right: 16px; width: auto; bottom: 16px; }
  body.bs-has-chrome .bs-toast-stack { bottom: calc(var(--bs-bottombar-h) + 12px); }
}
@media (prefers-reduced-motion: reduce) {
  .bs-toast, .bs-toast.is-leaving { animation: none; }
}

}
