/* Centralized failure toast (REQ-511, REQ-512) — one branded toast for every
   runtime failure reported through window.TSFailure, with an optional one-tap
   Retry. Closed palette: dark surface, gold-dim border, gold accent. Dark-only. */

.ts-failure-toast {
  position: fixed;
  left: 50%;
  bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(20px);
  max-width: min(440px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px 14px 18px;
  background: var(--surface, #14121c);
  color: var(--text, #e8e3d9);
  border: 1px solid var(--gold-dim, #6f5b39);
  border-left: 3px solid var(--gold, #c9a86d);
  border-radius: 2px;
  font-family: var(--f-sans, Inter, system-ui, sans-serif);
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
  transition: opacity 200ms var(--ease, ease), transform 200ms var(--ease, ease);
}

.ts-failure-toast--show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.ts-failure-toast__msg {
  flex: 1 1 auto;
}

.ts-failure-toast__retry {
  flex: 0 0 auto;
  appearance: none;
  cursor: pointer;
  white-space: nowrap;
  padding: 7px 14px;
  background: transparent;
  color: var(--gold, #c9a86d);
  border: 1px solid var(--gold-dim, #6f5b39);
  border-radius: 2px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: background 150ms var(--ease, ease), color 150ms var(--ease, ease);
}

.ts-failure-toast__retry:hover {
  background: var(--gold, #c9a86d);
  color: var(--surface, #14121c);
}
