/* Flash messages as toasts (shared/_flash, toast_controller.js).
   Loaded by both layouts on its own, since the public app and the backyard
   don't share a stylesheet. Self-contained: no global rules, no tokens from
   either sheet. */
.toasts {
  position: fixed; z-index: 1000;
  inset-inline: 16px; bottom: 16px;
  display: grid; gap: 8px; justify-items: end;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 12px;
  width: min(420px, 100%);
  padding: 12px 12px 12px 16px;
  border: 1px solid rgb(255 255 255 / .24);
  border-inline-start-width: 4px;
  border-radius: 0.7rem;
  background: #141519;
  color: #fff;
  font: 500 14px/1.4 "Space Grotesk", system-ui, sans-serif;
  box-shadow: 0 16px 48px rgb(0 0 0 / .55);
  animation: toast-in .22s cubic-bezier(.2, .8, .2, 1);
}
.toast--notice { border-inline-start-color: #22c55e; }
.toast--alert  { border-inline-start-color: #f87171; }
.toast__text { flex: 1; min-width: 0; padding-top: 2px; overflow-wrap: anywhere; }
.toast__close {
  flex-shrink: 0; width: 28px; height: 28px; display: grid; place-items: center;
  border: 0; border-radius: 6px; background: transparent;
  color: rgb(255 255 255 / .72); font: inherit; font-size: 18px; line-height: 1; cursor: pointer;
}
.toast__close:hover { color: #fff; background: rgb(255 255 255 / .08); }
.toast__close:focus-visible { outline: 2px solid #2563eb; outline-offset: 1px; }
.toast.is-leaving { animation: toast-out .18s ease-in forwards; }

@keyframes toast-in  { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to   { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  .toast, .toast.is-leaving { animation: none; }
}
