/* ============================================
   VirusTotal Scanner — virustotal.css
   Page-specific styles only. Everything else
   (nav, footer, project-header, project-layout,
   sidebar-card, tech-badge, btn, colours, fonts)
   comes from static/css/style.css.
   ============================================ */

/* ── Borrowed page-local components ─────────────────────────
   These three classes (.overview-card, .warning-card, .stat-row)
   are not part of the shared style.css — they're page-local
   styles that already exist inline on cheatsheet-ufw.html.
   Reproduced here for visual consistency with that page.

   Note: cheatsheet-ufw.html styles these with var(--card-bg),
   which isn't a variable defined anywhere in style.css (the real
   one is --bg-card) — so on that page the background silently
   renders transparent. Fixed to --bg-card here.
──────────────────────────────────────────────────────────── */
.overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}
.overview-card h3 { margin: 0 0 0.5rem; font-size: 1rem; color: var(--text-primary); display: flex; align-items: center; gap: 0.5rem; }
.overview-card p { margin: 0; font-size: 0.85rem; color: var(--text-secondary); line-height: 1.75; }

.warning-card {
  background: rgba(248,81,73,.06);
  border: 1px solid rgba(248,81,73,.3);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.warning-card i { color: #f85149; font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.warning-card p { margin: 0; font-size: 0.84rem; color: var(--text-secondary); line-height: 1.6; }

.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 0.75rem; margin: 1.5rem 0; }
@media (max-width: 600px) { .stat-row { grid-template-columns: repeat(2,1fr); } }
.stat-row .stat-card { padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-card); text-align: center; }
.stat-row .stat-card .sv { font-size: 1.5rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-row .stat-card .sl { font-size: 0.7rem; color: var(--text-secondary); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.05em; }

/* ── Scanner forms ─────────────────────────────────────────── */
.scanner-form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}
.input-row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.input-row input[type="text"],
.input-row input[type="file"] {
  flex: 1 1 260px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  transition: border-color 0.2s;
}
.input-row input[type="text"]:focus,
.input-row input[type="file"]:focus {
  outline: none;
  border-color: var(--border-accent);
}
.btn-link {
  background: none; border: none; padding: 0; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px;
}
.btn-link:hover { color: var(--accent2); }

.status-line {
  margin-top: 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  min-height: 1.2em;
}
.status-line.is-error { color: #ff5050; }

/* ── Result card ───────────────────────────────────────────── */
.result-card {
  display: none;
  margin-top: 1.25rem;
  padding: 1.4rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.result-card.show { display: block; }
.result-header {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.9rem;
  padding-bottom: 0.9rem; border-bottom: 1px solid var(--border);
}
.result-indicator { font-family: var(--font-mono); font-size: 1rem; color: var(--text-primary); word-break: break-all; }
.result-link { font-size: 0.8rem; }

.detection-summary { font-size: 1rem; color: var(--text-secondary); margin-bottom: 1rem; }
.detection-summary strong { color: var(--accent); }

.stat-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.1rem; }
.stat-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 20px;
  font-family: var(--font-mono); font-size: 0.78rem;
  border: 1px solid var(--border); color: var(--text-secondary);
}
.stat-pill .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.stat-pill.malicious .dot  { background: #ff5050; }
.stat-pill.suspicious .dot{ background: #ffa500; }
.stat-pill.harmless .dot  { background: #50c878; }
.stat-pill.undetected .dot{ background: var(--text-muted); }

.meta-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.5rem 1.5rem; font-size: 0.82rem; color: var(--text-secondary);
  margin-bottom: 1.1rem; font-family: var(--font-mono);
}
.meta-grid strong { color: var(--text-muted); font-weight: 500; }

.vendor-table-wrap {
  max-height: 320px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 1rem;
}
.vendor-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.vendor-table th, .vendor-table td {
  text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border);
}
.vendor-table th {
  position: sticky; top: 0; background: var(--bg-card);
  color: var(--text-muted); font-family: var(--font-mono);
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.vendor-table tr:last-child td { border-bottom: none; }
.verdict-badge {
  display: inline-block; padding: 2px 9px; border-radius: 4px;
  font-size: 0.72rem; font-family: var(--font-mono); font-weight: 600;
}
.verdict-badge.malicious  { background: rgba(255,80,80,0.15); color: #ff5050; border: 1px solid rgba(255,80,80,0.3); }
.verdict-badge.suspicious { background: rgba(255,165,0,0.15); color: #ffa500; border: 1px solid rgba(255,165,0,0.3); }
.verdict-badge.harmless   { background: rgba(80,200,120,0.15); color: #50c878; border: 1px solid rgba(80,200,120,0.3); }
.verdict-badge.undetected { background: rgba(138,148,168,0.12); color: var(--text-muted); border: 1px solid var(--border); }

.raw-toggle summary {
  cursor: pointer; font-family: var(--font-mono); font-size: 0.78rem; color: var(--accent);
}
.raw-toggle pre {
  margin-top: 0.75rem; max-height: 300px; overflow-y: auto;
  font-size: 0.74rem;
}

@media (max-width: 600px) {
  .input-row { flex-direction: column; }
}
