/* SPDX-License-Identifier: AGPL-3.0-or-later */
/* Copyright (C) 2024-2026 Philippe Naveau — contact@perfshop.io */
/* PerfShop — Test AI — https://perfshop.io */

/**
 * inline-fix.css — Utility classes for refactored inline-style sites.
 *
 * Loaded LAST in the cascade so utility overrides resolve. Created
 * empty at B2.a (no inline styles needed yet) but kept in the cascade
 * inventory + source-pin (test/no-inline-script-style.test.js
 * CSS_FILES list) to match the convention cluster scripts-ui /
 * jmeter-ui / monitoring / admin (R1-Test-LOW-1 B1.ter gotcha — a
 * referenced inline-fix.css must be tracked in the pin).
 *
 * B1.ter (2026-05-20) — pattern : `.ta-<context>-<sha8>` class names
 * generated by future tag-aware refactor scripts when JS-side
 * `element.style.X = …` mutations are dropped in favour of
 * classList.toggle. See `pattern_node_ihm.md` #58.
 *
 * B2.b — the modal + Ollama subfields toggle visibility via the
 * cluster-wide `.hidden { display: none !important }` rule which
 * already lives in `layout.css:29`. No duplication needed — kept this
 * note so a future contributor doesn't re-add it here.
 */

/* ── B2.ter.d fin — live cursor overlay ─────────────────────────────
 *
 * `.ta-live-stage` is the positioning context (relative) that lets the
 * cursor overlay layer on top of the noVNC iframe. The overlay shows
 * the most-recent Playwright pw:api step title (e.g. "page.click(button)")
 * so a viewer can correlate the visible cursor movement in the noVNC
 * stream with the action Playwright IS executing.
 *
 * No animation when prefers-reduced-motion is set (WCAG 2.3.3).
 * ──────────────────────────────────────────────────────────────────── */
.ta-live-stage {
  position: relative;
  width: 100%;
}

.ta-live-frame {
  width: 100%;
  min-height: 70vh;
  border: 0;
  background: #000;
  border-radius: 6px;
  display: block;
}

.ta-live-cursor-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 60%;
  padding: 6px 10px;
  background: rgba(15, 17, 22, 0.85);
  color: #F5F6F8;
  /* R7-A-HIGH-2 (re-revue 2026-05-22) — border bumped 0.18 → 0.30 so
     the overlay outline stays visible when the iframe renders against
     a dark noVNC stream (the previous 4 %-ish opacity disappeared on
     near-black backgrounds). */
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 4px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.3;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.ta-live-cursor-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ta-live-cursor-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  flex-shrink: 0;
  animation: ta-live-cursor-pulse 1.2s infinite ease-in-out;
}

@keyframes ta-live-cursor-pulse {
  0%, 100% { transform: scale(1);   opacity: 1;   }
  50%      { transform: scale(1.4); opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
  .ta-live-cursor-dot { animation: none; }
}

/* ── B2.ter.e — timeline marker strip (scrubbable replay) ──────────
 *
 * The video tab gains a `<svg.ta-video-timeline>` strip immediately
 * below the <video> element. Each `<rect.ta-video-marker>` is
 * positioned via the native SVG `x="N%"` attribute (set in
 * runner.js → refreshMarks) — NOT via CSS `style.left`, since the
 * cluster pin (`test/no-inline-script-style.test.js`) forbids any
 * `.style.` JS mutation. Click + Enter/Space seek the video to the
 * matching offset. */
.ta-video-timeline {
  display: block;
  width: 100%;
  height: 24px;
  margin-top: 6px;
  background: var(--surface2, #1F2230);
  border-radius: 4px;
}

.ta-video-marker {
  fill: var(--accent, #6366F1);
  cursor: pointer;
  transform: translateX(-3px);  /* centre the 6px-wide rect on the % */
}

.ta-video-marker:hover {
  fill: #818CF8;
}

.ta-video-marker:focus-visible {
  outline: 2px solid #FBBF24;
  outline-offset: 2px;
}

.ta-video-marker-empty {
  padding: 6px 10px;
  color: var(--muted, #8B90B5);
  font-size: 12px;
  font-style: italic;
}

.ta-video-report-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
