/* Shared controls use the viewer's pineapple/copy tokens where available. */
.app-toast {
  --toast-pineapple: var(--pineapple, #ffb52b);
  --toast-copy-ink: var(--pineapple-ink, #232e3f);
  --toast-copy-fill: var(--pineapple-fill, #ffdf9c);
  position: relative; display: flex; align-items: center; gap: 10px; box-sizing: border-box;
  max-width: min(680px, calc(100vw - 24px));
}
.app-toast-message { min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; max-height: min(40vh, 240px); overflow: auto; }
.app-toast-controls { display: inline-flex; flex: none; align-items: center; gap: 6px; }
.app-toast .app-toast-controls button {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  width: 28px; height: 28px; min-width: 28px; padding: 0; margin: 0;
  border: 1px solid transparent; border-radius: 6px; background: transparent; color: inherit;
  cursor: pointer; touch-action: manipulation;
}
.app-toast .app-toast-controls .app-toast-copy {
  border-color: var(--toast-pineapple); background: var(--toast-copy-fill); color: var(--toast-copy-ink);
}
.app-toast .app-toast-controls .app-toast-copy:hover { background: var(--pineapple-fill-hover, #ffd27b); }
.app-toast .app-toast-controls button:focus-visible { outline: 2px solid var(--toast-pineapple); outline-offset: 2px; }
.app-toast .app-toast-controls [data-copy-state="copied"] { background: var(--copy-ok, #2d8055); border-color: var(--copy-ok, #2d8055); color: var(--copy-ok-ink, #fff); }
.app-toast .app-toast-controls [data-copy-state="failed"] { background: var(--copy-fail, #a52d35); border-color: var(--copy-fail, #a52d35); color: var(--copy-fail-ink, #fff); }
.app-toast-copy-status { position: absolute; }
.app-toast-copy-status:not(:empty) { bottom: calc(100% + 6px); right: 0; max-width: calc(100vw - 24px);
  padding: 4px 9px; border-radius: 7px; background: var(--copy-ok, #2d8055); color: var(--copy-ok-ink, #fff);
  font: 600 11.5px/1.2 Inter, system-ui, sans-serif; pointer-events: none;
}
.app-toast:has([data-copy-state="failed"]) .app-toast-copy-status { background: var(--copy-fail, #a52d35); color: var(--copy-fail-ink, #fff); }
@media (pointer: coarse) { .app-toast .app-toast-controls button { width: 36px; height: 36px; min-width: 36px; } }
