/* ══════════════════════════════════════════════════════════════
   viewer-demo.css · interactive "See it work" tab demos
   Loaded only by index.html. Panels opt in via data-vwdemo.
   Self-contained: no dependency on ai-demo.css (revert-safe).
   ══════════════════════════════════════════════════════════════ */

/* ── shared: action buttons ── */
.vw-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.vw-a {
  font: inherit; font-size: 12px; font-weight: 700; padding: 9px 14px;
  border-radius: 9px; border: 1px solid var(--line); background: transparent;
  color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center;
  gap: 6px; transition: background .18s, color .18s, opacity .25s, transform .12s;
}
.vw-a:hover { background: var(--surface-3); }
.vw-a:active { transform: scale(.97); }
.vw-a.y { background: var(--green); border-color: var(--green); color: var(--on-green); }
.vw-a.y:hover { filter: brightness(1.05); background: var(--green); }
.vw-a.vw-done {
  background: var(--green-wash); border-color: var(--green);
  color: var(--accent-text); cursor: default; pointer-events: none;
}
.vw-a.vw-off { opacity: .38; pointer-events: none; }

/* ── shared: audit line ── */
.vw-audit {
  display: flex; align-items: center; gap: 7px; margin-top: 10px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .02em;
  color: var(--text-3); animation: vwIn .4s ease both;
}
.vw-audit::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); flex: none;
}

/* ── shared: inline note (amber / green / blue) ── */
.vw-note {
  border-radius: 10px; padding: 11px 13px; margin-top: 12px;
  font-size: 12.5px; line-height: 1.5; color: var(--text-2);
  animation: vwIn .35s ease both;
}
.vw-note b { color: var(--text); }
.vw-note.warn { background: var(--warn-bg); color: var(--warn-tx); border: 1px solid var(--warn-brd); }
.vw-note.warn b { color: var(--warn-tx); }
.vw-note.good { background: var(--green-wash); border: 1px solid var(--green); }
.vw-note.info { background: var(--pill-blue-bg); border: 1px solid var(--pill-blue-tx); }

/* ── shared: replay button (in uicard-head) ── */
.vw-replay {
  font: inherit; margin-left: auto; flex: none; width: 26px; height: 26px;
  border-radius: 7px; border: 1px solid var(--line); background: transparent;
  color: var(--text-3); cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; transition: color .18s, background .18s;
}
.vw-replay:hover { color: var(--text); background: var(--surface-3); }
.uicard-head .vw-replay { margin-left: 8px; }

/* ── shared: "try it" hint tag ── */
.vw-tag {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-text);
  background: var(--green-wash); border: 1px solid var(--green);
  border-radius: 999px; padding: 2px 9px; flex: none; margin-left: 8px;
}

/* ── planning: candidate chips ── */
.vw-fill { margin-top: 12px; border-top: 1px solid var(--hairline); padding-top: 12px; }
.vw-fill-t { font-size: 12.5px; font-weight: 600; color: var(--text); margin-bottom: 9px; }
.vw-cands { display: flex; gap: 8px; flex-wrap: wrap; }
.vw-cand {
  font: inherit; font-size: 12px; font-weight: 600; padding: 8px 13px;
  border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--text); cursor: pointer; display: inline-flex; align-items: center;
  gap: 7px; transition: background .18s, border-color .18s, opacity .25s, transform .12s;
}
.vw-cand:hover { background: var(--surface-3); }
.vw-cand:active { transform: scale(.97); }
.vw-cand .rl { font-size: 10px; color: var(--text-3); font-weight: 500; }
.vw-cand.bad { border-color: var(--warn-brd); background: var(--warn-bg); color: var(--warn-tx); }
.vw-cand.bad .rl { color: var(--warn-tx); opacity: .8; }
.vw-cand.pick { border-color: var(--green); background: var(--green-wash); color: var(--accent-text); }
.vw-cand.vw-off { opacity: .38; pointer-events: none; }

/* stat / bar transitions when the gap gets filled */
.vw-flip { animation: vwPop .45s cubic-bezier(.2,.9,.3,1.4) both; }
.comp-bar .track i { transition: width .7s cubic-bezier(.2,.7,.2,1), background .5s; }

/* ── deviations: expandable row ── */
.tabpanel[data-vwdemo="avvik"] .cert-row.vw-click { cursor: pointer; transition: background .18s; }
.tabpanel[data-vwdemo="avvik"] .cert-row.vw-click:hover { background: var(--surface-3); }
.vw-devx { border-top: 1px dashed var(--hairline); padding: 12px 8px 4px; animation: vwIn .3s ease both; }
.vw-devx .sg { font-size: 12.5px; color: var(--text-2); margin-bottom: 10px; }
.vw-devx .sg b { color: var(--text); }

/* ── attendance: live clock-in row ── */
.vw-livedot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--pill-amber-tx);
  flex: none; animation: vwPulse 1.1s ease-in-out infinite;
}
.vw-run {
  font: inherit; font-size: 12px; font-weight: 700; padding: 9px 14px;
  border-radius: 9px; border: 1px solid var(--green); background: var(--green-wash);
  color: var(--accent-text); cursor: pointer; display: inline-flex;
  align-items: center; gap: 7px; margin-top: 12px;
  transition: background .18s, opacity .2s, transform .12s;
}
.vw-run:hover { background: var(--green); color: var(--on-green); }
.vw-run:active { transform: scale(.97); }
.vw-run.vw-off { opacity: .38; pointer-events: none; }
.vw-newrow { animation: vwIn .4s ease both; }

/* ── keyframes ── */
@keyframes vwIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes vwPop { 0% { transform: scale(.7); opacity: .3; } 100% { transform: scale(1); opacity: 1; } }
@keyframes vwPulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* ── reduced motion: land final states instantly ── */
@media (prefers-reduced-motion: reduce) {
  .vw-audit, .vw-note, .vw-devx, .vw-newrow { animation: none; }
  .vw-flip { animation: none; }
  .vw-livedot { animation: none; }
  .comp-bar .track i { transition: none; }
}

/* ── Overview click-through (data-goto) ── */
.vw-goto { cursor: pointer; }
.ad-nav.vw-goto { transition: background .13s ease, color .13s ease; }
.ad-nav.vw-goto:hover { background: var(--surface-3); color: var(--text); }
.ad-nav.vw-goto:hover svg { color: var(--text); }
.ov-tile.vw-goto { transition: transform .13s ease, box-shadow .13s ease, border-color .13s ease; }
.ov-tile.vw-goto:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.08); border-color: var(--accent-text); }
.vw-goto:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; border-radius: 8px; }
.vw-goto-hint { display: inline-block; margin-left: 8px; font-size: 11px; font-family: var(--mono); color: var(--accent-text); }
@media (prefers-reduced-motion: reduce) {
  .ad-nav.vw-goto, .ov-tile.vw-goto { transition: none; }
  .ov-tile.vw-goto:hover { transform: none; }
}
