/* ═══════════════════════════════════════════════════════════════════
   VIDEO FINGERPRINT SEARCH — only what is specific to this tool.
   Hero, panels, dropzone, buttons, loader, steps, FAQ and CTA all come
   from tool-page.css; below is just the match grid.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --vfp-plate:     rgba(255, 255, 255, .9);
  --vfp-plate-ink: #0F172A;
}

[data-theme="dark"] {
  --vfp-plate:     rgba(2, 6, 23, .78);
  --vfp-plate-ink: #F8FAFC;
}

/* ── Match grid ───────────────────────────────────────────────────── */
.vfp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 14px;
  padding: 20px;
  max-height: 720px;
  overflow-y: auto;
}

.vfp-grid:empty { display: none; }

.vfp-card {
  display: flex;
  flex-direction: column;
  background: var(--tp-panel);
  border: 1px solid var(--tp-line);
  border-radius: 14px;
  overflow: hidden;
  animation: vfpIn .35s ease both;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.vfp-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: var(--primary);
}

@keyframes vfpIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ── Thumbnail ────────────────────────────────────────────────────── */
.vfp-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  /* Footage stays on a dark plate in both themes — it is content, not UI,
     and a white letterbox around a video still reads as broken. */
  background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 100%);
  overflow: hidden;
  flex-shrink: 0;
}

.vfp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.vfp-card:hover .vfp-thumb img { transform: scale(1.05); }

.vfp-thumb-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 1.9rem;
}

/* One colour at every tier, deliberately. Tiering this green-to-amber
   would read as a safety verdict; a similarity score is not one. Cyan is
   the product's verification ink, and the number itself carries the
   magnitude — see the design system's colour rule. */
.vfp-score {
  position: absolute;
  top: 7px;
  right: 7px;
  padding: 3px 9px;
  border-radius: 50px;
  font-size: .66rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  background: rgba(2, 6, 23, .72);
  color: var(--cyan);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.vfp-platform {
  position: absolute;
  bottom: 7px;
  left: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: calc(100% - 60px);
  padding: 3px 9px;
  border-radius: 50px;
  font-size: .65rem;
  font-weight: 700;
  background: var(--vfp-plate);
  color: var(--vfp-plate-ink);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vfp-duration {
  position: absolute;
  bottom: 7px;
  right: 7px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: .65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: rgba(2, 6, 23, .72);
  color: #fff;
}

/* ── Card body ────────────────────────────────────────────────────── */
.vfp-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 13px 13px;
  flex: 1;
}

.vfp-title {
  font-family: var(--font-display);
  font-size: .81rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--foreground);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vfp-channel {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  font-weight: 500;
  color: var(--muted-foreground);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vfp-channel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Match strength — cyan, never green. Green would read as "safe", a
   claim a similarity score does not make. */
.vfp-meter {
  display: flex;
  align-items: center;
  gap: 7px;
}

.vfp-meter-track {
  flex: 1;
  height: 4px;
  border-radius: 50px;
  background: var(--secondary);
  overflow: hidden;
}

.vfp-meter-fill {
  height: 100%;
  border-radius: 50px;
  background: var(--gradient-scanner);
  transition: width .6s cubic-bezier(.16, 1, .3, 1);
}

.vfp-meter-label {
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--light-text);
  white-space: nowrap;
}

.vfp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.vfp-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  border-radius: 50px;
  font-size: .64rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--secondary);
  color: var(--muted-foreground);
  border: 1px solid var(--tp-line);
}

.vfp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin-top: auto;
  padding-top: 9px;
  border-top: 1px solid var(--tp-line);
}

.vfp-domain {
  flex: 1;
  min-width: 0;
  font-size: .66rem;
  color: var(--light-text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.vfp-open {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 7px;
  font-size: .69rem;
  font-weight: 700;
  white-space: nowrap;
  background: var(--primary-soft);
  color: var(--primary);
  transition: background .15s, color .15s;
}

.vfp-open:hover {
  background: var(--gradient-primary);
  color: #fff;
}

/* Scrollbar to match the panel rather than the OS default. */
.vfp-grid::-webkit-scrollbar { width: 10px; }
.vfp-grid::-webkit-scrollbar-track { background: transparent; }
.vfp-grid::-webkit-scrollbar-thumb {
  background: var(--tp-line);
  border: 3px solid var(--tp-panel);
  border-radius: 50px;
}
.vfp-grid::-webkit-scrollbar-thumb:hover { background: var(--muted-foreground); }

@media (max-width: 480px) {
  .vfp-grid {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 12px;
  }
}
