/* GOCOSYS — "a new version is ready" toast, bottom centre (website + admin).
   Uses each shell's own theme tokens with neutral fallbacks, so it follows
   light / dark on both sides. */
.version-toast {
  position: fixed; z-index: 2147483000; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 24px); opacity: 0;
  display: flex; align-items: center; gap: 12px; width: max-content; max-width: min(560px, calc(100vw - 24px));
  padding: 10px 10px 10px 14px; border-radius: 16px;
  background: color-mix(in srgb, var(--panel, var(--surface, #0d1830)) 92%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid color-mix(in srgb, #f8ed08 45%, var(--line, var(--border, rgba(148,163,184,.25))));
  box-shadow: 0 18px 50px -12px rgba(2, 8, 23, .45), 0 0 0 4px color-mix(in srgb, #f8ed08 12%, transparent);
  color: var(--ink, var(--text, #e8eefc));
  font: 500 14px/1.35 var(--font, var(--font-body, 'Plus Jakarta Sans', system-ui, sans-serif));
  transition: transform .32s cubic-bezier(.2, .8, .2, 1), opacity .32s ease;
}
.version-toast.is-in { transform: translate(-50%, 0); opacity: 1; }
.version-toast.is-out { transform: translate(-50%, 16px); opacity: 0; }
.version-toast .vt-icon {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: #f8ed08; color: #0a1020; font-size: 14px;
}
.version-toast.is-in .vt-icon i { animation: vt-spin 1.6s cubic-bezier(.5, 0, .3, 1) 2; }
.version-toast .vt-text { display: flex; flex-direction: column; min-width: 0; }
.version-toast .vt-text strong { font-weight: 700; }
.version-toast .vt-text small { font-size: 12.5px; opacity: .72; }
.version-toast .vt-reload {
  flex-shrink: 0; margin-left: 6px; height: 36px; padding: 0 16px; border: 0; border-radius: 10px; cursor: pointer;
  background: #f8ed08; color: #0a1020; font: 700 13px/1 inherit; font-family: inherit;
  box-shadow: 0 6px 18px -6px rgba(200, 190, 0, .7);
  transition: transform .15s ease, filter .15s ease;
}
.version-toast .vt-reload:hover { transform: translateY(-1px); filter: brightness(1.05); }
.version-toast .vt-close {
  flex-shrink: 0; width: 32px; height: 32px; border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; color: inherit; opacity: .6;
}
.version-toast .vt-close:hover { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); }
.version-toast button:focus-visible { outline: 2px solid var(--focus, var(--brand, #2563eb)); outline-offset: 2px; }
@keyframes vt-spin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .version-toast { left: 12px; right: 12px; width: auto; max-width: none; transform: translateY(24px); }
  .version-toast.is-in { transform: translateY(0); }
  .version-toast.is-out { transform: translateY(16px); }
  .version-toast .vt-text small { display: none; }
  .version-toast .vt-reload, .version-toast .vt-close { height: 44px; min-width: 44px; }
}
/* Animations switch off / reduced motion: appear without movement */
html[data-motion="off"] .version-toast, html.no-motion .version-toast { transition: none; }
html[data-motion="off"] .version-toast .vt-icon i, html.no-motion .version-toast .vt-icon i { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .version-toast { transition: none; }
  .version-toast .vt-icon i { animation: none; }
}

/* Phones: the full-width toast would cover the floating WhatsApp / call
   buttons — lift them above it while the notice is showing. */
@media (max-width: 560px) {
  html[data-stale] .fab-stack { bottom: calc(max(16px, env(safe-area-inset-bottom)) + 52px + 84px); transition: bottom .3s ease; }
}
