/* ──────────────────────────────────────────────────────────────────────
   Olaif Voice — static demo
   Small custom layer on top of Tailwind (Play CDN). Most styling is done
   with utility classes; this file holds the things Tailwind can't express
   cleanly: the guided-tour annotation markers, the demo top bar animation,
   and toast transitions.
   ────────────────────────────────────────────────────────────────────── */

:root {
  color-scheme: light;
}

html,
body {
  font-family: "Inter", system-ui, sans-serif;
  background-color: #f8fafc; /* slate-50 */
  color: #0f172a; /* slate-900 */
  -webkit-font-smoothing: antialiased;
}

/* Hide content until Tailwind Play CDN has generated styles, to avoid a
   flash of unstyled HTML. shell.js removes .cloak on load. */
body.cloak {
  visibility: hidden;
}

/* ── Guided-tour annotation markers ─────────────────────────────────── */

/* Any element carrying data-note becomes a tour anchor. The marker is a
   small numbered green dot pinned to the top-right corner. Hidden until
   the tour is switched on (body.tour-on). */
[data-note] {
  position: relative;
}

[data-note]::after {
  content: attr(data-note-n);
  position: absolute;
  top: -9px;
  right: -9px;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: #00af77;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 3px rgba(0, 175, 119, 0.22);
  cursor: help;
  animation: olaif-pulse 2.4s ease-in-out infinite;
}

body.tour-on [data-note]::after {
  display: flex;
}

body.tour-on [data-note] {
  outline: 1.5px dashed rgba(0, 175, 119, 0.5);
  outline-offset: 3px;
  border-radius: 6px;
}

@keyframes olaif-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 3px rgba(0, 175, 119, 0.22);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(0, 175, 119, 0);
  }
}

/* Tour popover (built by demo.js) */
.tour-popover {
  position: fixed;
  z-index: 60;
  max-width: 320px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 12.5px;
  line-height: 1.55;
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.35);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}
.tour-popover.show {
  opacity: 1;
  transform: translateY(0);
}
.tour-popover .tp-title {
  color: #5eead4;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 10.5px;
  margin-bottom: 4px;
}

/* ── Toasts ─────────────────────────────────────────────────────────── */
#toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.toast {
  min-width: 240px;
  max-width: 380px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left-width: 4px;
  border-radius: 10px;
  padding: 11px 14px;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.14);
  font-size: 13px;
  color: #0f172a;
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.show {
  opacity: 1;
  transform: translateX(0);
}
.toast.ok {
  border-left-color: #00af77;
}
.toast.info {
  border-left-color: #00a1e1;
}
.toast.warn {
  border-left-color: #f59e0b;
}
.toast .t-title {
  font-weight: 600;
  margin-bottom: 2px;
}
.toast .t-sub {
  color: #64748b;
  font-size: 12px;
}

/* ── Misc ───────────────────────────────────────────────────────────── */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Thin custom scrollbar inside the thread panels */
.thin-scroll::-webkit-scrollbar {
  width: 8px;
}
.thin-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
}
.thin-scroll::-webkit-scrollbar-track {
  background: transparent;
}
