/* ===================================================================
   Toasts (2026-10-24): one look on every page, in the dashboard's toy
   style. The dashboard, sign-in, public and admin layouts render flash
   messages through layouts/_toasts; the studio's showInfoToast builds
   the same markup in its #toast-container.

   A white card with a 2px colored edge and a 4px drop, like the
   dashboard's cards and its "Copy OBS link" note (.v2-copy-note in
   v2.css): blue for news (saved, signed in, published), gold for a
   warning, red for an error. Colors are the v2 tokens written out,
   because the studio and admin pages don't load v2.css. Scoped under
   .toast-container so it beats application.css's .alert and the
   studio's DaisyUI .alert.
   =================================================================== */
.toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.toast-container .alert {
  --toast-line: #c9d3f5;
  --toast-ink: #2c3f86;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  box-sizing: border-box;
  margin: 0;
  padding: 12px 48px 12px 16px;
  border: 2px solid var(--toast-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 0 var(--toast-line);
  backdrop-filter: none;
  color: var(--toast-ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  pointer-events: auto;
  animation: toast-in .35s cubic-bezier(.16, 1, .3, 1);
}
.toast-container .alert-warning { --toast-line: #f7d3a9; --toast-ink: #7a4210; }
.toast-container .alert-danger { --toast-line: #f5c9cf; --toast-ink: #9b1c3a; }
.toast-container .toast-close {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 22px;
  line-height: 1;
  opacity: .6;
  cursor: pointer;
}
.toast-container .toast-close:hover, .toast-container .toast-close:focus-visible { opacity: 1; }
.toast-container .alert.toast-out { animation: toast-out .3s cubic-bezier(.16, 1, .3, 1) forwards; }
/* Still animated, just instantly, so animationend removes the toast. */
@media (prefers-reduced-motion: reduce) {
  .toast-container .alert, .toast-container .alert.toast-out { animation-duration: 1ms; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}
