/* Live updates and notifications (live.js, notify.js) and the Overview's card slots (views/seller.js).
   docs/live-and-stats.md */

/* Overview: one stable slot per card. display: contents keeps the page's flex and grid layout exactly
   as before; a slot whose card is being refetched for a new period is dimmed. */
.ov-slot { display: contents; }
.ov-slot.loading > * { opacity: .55; transition: opacity .15s; pointer-events: none; }
.ov-trend .chart-tools { flex-wrap: wrap; justify-content: flex-end; }

/* Top bar: the notification bell, before the account menu. It takes the push to the inline end when
   the page has no actions (the account menu follows it). */
.topbar-live { display: flex; align-items: center; flex: none; margin-inline-start: auto; }
.topbar-actions:not(:empty) + .topbar-live { margin-inline-start: 0; }
.live-bell { position: relative; }
.live-bell.is-on { color: var(--accent); }
.live-dot {
  position: absolute; top: 5px; inset-inline-end: 5px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted); box-shadow: 0 0 0 2px var(--surface);
}
.live-dot.up { background: var(--good); }

/* A toast about a live event opens what it is about. */
.toast.live-toast { border: 0; font: inherit; text-align: start; cursor: pointer; align-items: flex-start; }
.toast.live-toast:hover { filter: brightness(1.12); }
.toast.live-toast:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.live-toast-ico { margin-top: 3px; flex: none; }
.live-toast-t { gap: 2px; min-width: 0; }
.live-toast-t .small { opacity: .8; font-weight: 400; overflow-wrap: anywhere; }

@media (max-width: 880px) {
  .topbar-live { order: 2; margin-inline-start: 0; }
}
