/* Status: PROTOTYPE (not production code) — DRAFT 2026-11-18 (CR-657 follow-up). The look of emis-states.js on the theme tokens. */
.est-tray { position: fixed; z-index: 200; inset-inline-start: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
html[dir="rtl"] .est-tray { transform: translateX(50%); }
.est-toast { position: relative; overflow: hidden; pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 300px; max-width: min(520px, 92vw); padding: 12px 14px;
  border-radius: 12px; background: rgb(var(--ink)); color: rgb(var(--surface)); font-size: 13.5px; box-shadow: var(--float-3, 0 24px 48px -12px rgb(15 23 42 / .3));
  animation: est-in .22s cubic-bezier(.22, 1, .36, 1); }
.est-toast.out { animation: est-out .2s ease-in forwards; }
.est-toast > i { font-size: 16px; }
.est-ok > i { color: rgb(52 211 153); } .est-bad > i { color: rgb(251 113 133); } .est-warn > i { color: rgb(251 191 36); } .est-info > i { color: rgb(var(--brand-300)); }
.est-toast span { flex: 1; }
.est-undo { border: 0; border-radius: 8px; padding: 5px 12px; background: rgb(var(--brand-500)); color: #fff; font: inherit; font-weight: 700; cursor: pointer; transition: background .15s, transform .15s; }
.est-undo:hover { background: rgb(var(--brand-400)); transform: translateY(-1px); }
.est-close { border: 0; background: transparent; color: inherit; opacity: .6; width: 26px; height: 26px; border-radius: 999px; cursor: pointer; transition: opacity .15s, background .15s; }
.est-close:hover { opacity: 1; background: rgb(255 255 255 / .12); }
.est-time { position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: rgb(var(--brand-400)); transform-origin: left; animation: est-time linear forwards; }
html[dir="rtl"] .est-time { transform-origin: right; }
.est-toast.hold .est-time { animation-play-state: paused; }
@keyframes est-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes est-out { to { opacity: 0; transform: translateY(8px); } }
@keyframes est-time { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* skeletons: the shape of what will come, with a soft moving light */
.est-sk i { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, rgb(var(--surface-2)) 0%, rgb(var(--border)) 40%, rgb(var(--surface-2)) 80%); background-size: 300% 100%; animation: est-sh 1.4s ease-in-out infinite; }
.est-sk-table > div { display: flex; align-items: center; gap: 16px; height: var(--row-h, 44px); border-bottom: 1px solid rgb(var(--border)); }
.est-sk-table i.pill { width: 70px; height: 20px; border-radius: 999px; margin-inline-start: auto; }
.est-sk-kpi { display: flex; flex-direction: column; gap: 10px; } .est-sk-kpi i.big { height: 26px; }
.est-sk-chart { display: flex; align-items: flex-end; gap: 8px; height: 100%; min-height: 180px; } .est-sk-chart i { flex: 1; height: auto; border-radius: 6px 6px 2px 2px; }
.est-sk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; } .est-sk-cards > div { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid rgb(var(--border)); border-radius: 14px; }
@keyframes est-sh { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.est-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* empty, error, no permission */
.est-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 180px; padding: 24px; text-align: center; animation: est-in .25s ease-out; }
.est-ic { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-bottom: 6px; border-radius: 16px; font-size: 20px; transition: transform .2s; }
.est-box:hover .est-ic { transform: translateY(-2px) rotate(-4deg); }
.est-empty .est-ic { background: rgb(var(--brand-50)); color: rgb(var(--brand-600)); }
.est-error .est-ic { background: rgb(var(--bad, 225 29 72) / .1); color: rgb(var(--bad, 225 29 72)); }
.est-denied .est-ic { background: rgb(var(--surface-2)); color: rgb(var(--ink-muted)); }
.est-box b { font-size: 15px; color: rgb(var(--ink)); }
.est-box p { margin: 0; max-width: 360px; font-size: 13px; color: rgb(var(--ink-muted)); line-height: 1.6; }
.est-btn { margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border: 0; border-radius: 10px; background: rgb(var(--brand-600)); color: #fff;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s, transform .15s, box-shadow .15s; }
.est-btn:hover { background: rgb(var(--brand-700)); transform: translateY(-1px); box-shadow: 0 6px 14px -6px rgb(var(--brand-600) / .6); }
.est-btn:focus-visible { outline: 2px solid rgb(var(--brand-600)); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .est-toast, .est-box { animation: none; } .est-sk i { animation: none; } .est-time { animation: none; } }
