/* ══════════════════════════════════════════════════════
   RESPONSIVE — All media queries consolidated
══════════════════════════════════════════════════════ */

/* ── Stat grid: 2-col on very small screens ── */
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tablet nav cleanup (768px breakpoint) ── */
@media (max-width: 768px) {
  /* Hide spiderfoot text label — too crowded on narrow viewports */
  .sf-indicator { display: none !important; }
  /* Tighten nav-right gap on tablets */
  .nav-right { gap: 8px; }
}

/* ── Mobile layout (640px breakpoint) ── */
@media (max-width: 640px) {
  /* Nav */
  .nav { padding: 12px 14px; }
  .quota-pill   { display: none !important; }
  .nav-version  { display: none; }
  .nav-right    { gap: 8px; }

  /* Page + Hero */
  .page { padding: 0 14px 60px; }
  .hero { padding: 40px 0 28px; }
  .hero h1 { font-size: 1.6rem; }

  /* Search container */
  .search-container { border-radius: var(--radius-lg); padding: 14px; }

  /* Search row — stack input + button vertically */
  .search-row { flex-direction: column; gap: 8px; margin-bottom: 10px; }
  .search-input { width: 100%; box-sizing: border-box; }
  #searchBtn { width: 100%; box-sizing: border-box; }

  /* Query type badge — reposition inside input area when stacked */
  .query-type-badge {
    right: 10px;
    top: 20px;
    transform: none;
  }

  /* Mode row — center toggle, drop keyboard hint (no physical keyboard) */
  .mode-row { justify-content: center; gap: 8px; flex-wrap: nowrap; }
  .search-hint { display: none !important; }

  /* Stat grid */
  .stat-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .stat-card-val { font-size: 1.3rem; }
  .stat-card-coverage { display: none; }

  /* Results header */
  .result-header { flex-direction: column; }
  .result-header > div:last-child {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  /* Panels */
  .panel { border-radius: var(--radius-lg); }

  /* Auth */
  .auth-card { border-radius: var(--radius-lg); }

  /* Cases panel */
  .cases-panel { width: 100%; }

  /* Data table */
  .data-table { font-size: .7rem; }
  .data-table th, .data-table td { padding: 6px 8px; }
}

/* ── Print / PDF output ── */
@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
