/* toast.css — the shared toast (js/toast.js).
   Shared design asset (synced into each app's tree by packages/shared/sync.sh —
   edit HERE, never the app copies). Colours and fonts come only from design-tokens.css.
   Orange (--color-attention-text) means "look at this": the attention tone. */
.fiddle-toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  z-index: 2147483000;   /* above every app layer (settings 10000+, ios-import 30000), just under the error dialog (2147483100), which must still cover it */
  box-sizing: border-box; width: max-content; max-width: min(520px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  background: var(--color-bg-panel-elevated); color: var(--color-warm-text);
  border: 1px solid var(--color-border-panel); border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  font-family: var(--font); font-size: 13.5px;
  /* A plain toast never takes a tap meant for the screen under it; one with a button (--action) or a Close (--sticky) does. */
  pointer-events: none;
  animation: fiddle-toast-in 0.2s ease-out;
}
.fiddle-toast--bottom { bottom: calc(30px + env(safe-area-inset-bottom)); }
.fiddle-toast--top { top: calc(60px + env(safe-area-inset-top)); }
.fiddle-toast--sticky,
.fiddle-toast--action { padding-right: 6px; pointer-events: auto; }
.fiddle-toast--attention { color: var(--color-attention-text); border-color: var(--color-attention-text); }
/* Wraps, never truncates: a toast is often the only place a failure is explained. */
.fiddle-toast-msg {
  white-space: normal; overflow-wrap: anywhere; line-height: 1.35;
  -webkit-user-select: text; user-select: text;
}
.fiddle-toast-action,
.fiddle-toast-close {
  -webkit-appearance: none; appearance: none; flex: none;
  background: none; border: none; cursor: pointer; font: inherit;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; border-radius: 999px;
}
.fiddle-toast-action { min-width: 44px; padding: 0 12px; font-weight: 800; color: var(--color-green-light); }
.fiddle-toast-action:active { background: rgba(77, 153, 102, 0.18); }
.fiddle-toast-close { width: 44px; color: inherit; opacity: 0.8; }
.fiddle-toast-close:active { opacity: 1; background: rgba(255, 255, 255, 0.1); }
@keyframes fiddle-toast-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .fiddle-toast { animation: none; } }
