/* FAK LAB — Forensics tools shared styles (Swiss + shadcn)
   Square geometry, hairline borders, one violet accent, tabular numerals. */

/* ── Hero ─────────────────────────────────────────────────────────── */
.fx-hero { text-align: center; margin-bottom: 2rem; }
.fx-hero-icon {
  display: inline-grid; place-items: center;
  width: 52px; height: 52px; margin-bottom: .9rem;
  border: 1px solid var(--border);
  background: var(--accent); color: var(--primary);
  font-size: 1.4rem;
}
.fx-hero h1 { font-size: 1.8rem; margin: 0 0 .4rem; letter-spacing: -.02em; }
.fx-hero p { color: var(--muted-foreground, var(--text-muted)); margin: 0; font-size: .95rem; }

/* ── Section kickers ──────────────────────────────────────────────── */
.fx-kicker {
  margin: 0 0 .9rem;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary);
}
.fx-kicker.muted { color: var(--muted-foreground, var(--text-muted)); }

/* ── Media surfaces ───────────────────────────────────────────────── */
.fx-canvas, .fx-video {
  width: 100%; display: block;
  border: 1px solid var(--border);
  border-radius: 0 !important;
  background: #0b0b0d;
}
.fx-video { background: #000; }
.fx-hint {
  margin-top: .6rem; font-size: .78rem;
  color: var(--muted-foreground, var(--text-muted));
}

/* ── Custom player ────────────────────────────────────────────────── */
.fx-player {
  display: flex; align-items: center; gap: .6rem;
  border: 1px solid var(--border);
  background: var(--background, var(--bg-card));
  padding: .6rem .7rem;
  user-select: none;
}
.fx-pbtn {
  flex: 0 0 auto;
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  background: var(--background, var(--bg-card));
  color: var(--foreground, var(--text));
  font-size: 1.05rem; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.fx-pbtn:hover { border-color: var(--primary); color: var(--primary); }
.fx-pbtn:focus-visible {
  outline: none; border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 40%, transparent);
}
.fx-pbtn.primary {
  background: var(--primary); border-color: var(--primary);
  color: var(--primary-foreground, #fff);
}
.fx-pbtn.primary:hover { background: var(--primary); color: var(--primary-foreground, #fff); opacity: .88; }
.fx-pbtn.sm { width: 32px; height: 32px; font-size: .9rem; }
.fx-time {
  flex: 0 0 auto; font-size: .78rem; font-weight: 600;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--muted-foreground, var(--text-muted));
}
.fx-time b { color: var(--foreground, var(--text)); font-weight: 600; }

/* Seek + volume sliders: square thumb, hairline track */
input[type="range"].fx-seek, input[type="range"].fx-vol {
  -webkit-appearance: none; appearance: none;
  background: transparent; cursor: pointer; height: 24px; padding: 0; margin: 0;
}
input[type="range"].fx-seek { flex: 1 1 auto; min-width: 60px; }
input[type="range"].fx-vol { flex: 0 0 84px; width: 84px; }
input[type="range"].fx-seek::-webkit-slider-runnable-track,
input[type="range"].fx-vol::-webkit-slider-runnable-track {
  height: 3px; background: var(--border);
}
input[type="range"].fx-seek::-webkit-slider-thumb,
input[type="range"].fx-vol::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 13px; height: 13px; margin-top: -5px;
  background: var(--primary); border: none; border-radius: 0;
}
input[type="range"].fx-seek::-moz-range-track,
input[type="range"].fx-vol::-moz-range-track {
  height: 3px; background: var(--border);
}
input[type="range"].fx-seek::-moz-range-thumb,
input[type="range"].fx-vol::-moz-range-thumb {
  width: 13px; height: 13px;
  background: var(--primary); border: none; border-radius: 0;
}
input[type="range"].fx-seek:focus-visible,
input[type="range"].fx-vol:focus-visible { outline: none; }
input[type="range"].fx-seek:focus-visible::-webkit-slider-thumb,
input[type="range"].fx-vol:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 40%, transparent);
}

.fx-speed {
  flex: 0 0 auto; height: 32px; padding: 0 .4rem;
  border: 1px solid var(--border); border-radius: 0;
  background: var(--background, var(--bg-card));
  color: var(--foreground, var(--text));
  font-size: .78rem; font-weight: 600; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.fx-speed:focus-visible {
  outline: none; border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 40%, transparent);
}
@media (max-width: 560px) {
  .fx-vol, #p-vol, #v-vol { display: none; }
  .fx-player { flex-wrap: wrap; }
  input[type="range"].fx-seek { flex-basis: 100%; order: 5; }
}

/* ── Filter chips ─────────────────────────────────────────────────── */
.fx-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: .5rem;
}
.fx-filter-btn {
  padding: .55rem .4rem;
  border: 1px solid var(--border); border-radius: 0;
  background: var(--background, var(--bg-card));
  color: var(--foreground, var(--text));
  font-size: .78rem; font-weight: 600; cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
  text-align: center; font-family: inherit;
}
.fx-filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.fx-filter-btn.active {
  background: var(--foreground, var(--text));
  border-color: var(--foreground, var(--text));
  color: var(--background, var(--bg-card));
}
.fx-filter-btn:focus-visible {
  outline: none; border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 40%, transparent);
}

/* ── Meta / stat cards ────────────────────────────────────────────── */
.fx-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: .6rem;
}
.fx-meta-card {
  background: var(--background, var(--bg));
  border: 1px solid var(--border);
  border-radius: 0; padding: .6rem .8rem;
}
.fx-meta-card .k {
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted-foreground, var(--text-muted));
}
.fx-meta-card .v {
  font-size: .88rem; margin-top: .15rem;
  word-break: break-all; font-variant-numeric: tabular-nums;
}

/* ── Control rows ─────────────────────────────────────────────────── */
.fx-row { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.fx-row.mt { margin-top: .9rem; }
.fx-slider-label {
  display: flex; align-items: center; gap: .6rem;
  font-size: .8rem; font-weight: 600;
  color: var(--muted-foreground, var(--text-muted));
}
.fx-slider-label output {
  font-variant-numeric: tabular-nums;
  color: var(--foreground, var(--text));
  min-width: 3ch; text-align: right;
}
input[type="range"].fx-range { flex: 1 1 160px; }

/* ── Analysis status pill ─────────────────────────────────────────── */
.fx-status {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted-foreground, var(--text-muted));
}
.fx-status .dot {
  width: 8px; height: 8px; border-radius: 0;
  background: var(--border);
}
.fx-status.live { color: var(--primary); }
.fx-status.live .dot { background: var(--primary); animation: fx-blink 1.1s steps(2) infinite; }
@keyframes fx-blink { 50% { opacity: .25; } }

/* ── Compare affordance (image) ────────────────────────────────────── */
.fx-canvas-wrap { position: relative; }
.fx-canvas-wrap.comparing .fx-canvas { cursor: zoom-out; }
