/* ─── Quick-filter strip ─────────────────────────────────────────────────────
   Mounts above any panel. Sticky below the topbar on scroll.
   Mobile-first: horizontal scroll on narrow viewports, full-width on desktop.
   ─────────────────────────────────────────────────────────────────────────── */

.v2-qfs {
  position: sticky;
  top: var(--topbar-h);
  z-index: 30;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  padding: 8px;
  margin: -2px 0 12px 0;
  background: rgba(9, 11, 15, 0.94);
  border: 1px solid rgba(42, 47, 58, 0.9);
  border-radius: 10px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 8px 24px rgba(0,0,0,0.34);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  /* horizontal scroll on small screens without showing scrollbar */
  overflow-x: auto;
  scrollbar-width: none;
  /* prevent vertical overflow bleed */
  overflow-y: visible;
}

.v2-qfs-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.v2-qfs-label {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.v2-qfs::-webkit-scrollbar {
  display: none;
}

/* ─── Segmented control wrapper ──────────────────────────────────────────── */

.v2-qfs-seg {
  display: inline-flex;
  flex-shrink: 0;
  background: #12151d;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 2px;
}

/* ─── Segmented control button ───────────────────────────────────────────── */

.v2-qfs-seg-btn {
  background: transparent;
  border: 0;
  padding: 6px 12px;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  /* meet 44px touch-target height via line-height + padding */
  min-height: 32px;
  line-height: 1.2;
  transition: background var(--t-fast, 140ms), color var(--t-fast, 140ms);
  -webkit-tap-highlight-color: transparent;
}

.v2-qfs-seg-btn:hover {
  color: var(--text);
}

.v2-qfs-seg-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.v2-qfs-seg-btn.is-active,
.v2-qfs-seg-btn[aria-pressed="true"] {
  background: #202736;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.v2-qfs-seg-btn[data-qfs-stance="Anti"].is-active,
.v2-qfs-seg-btn[data-qfs-stance="Anti"][aria-pressed="true"] {
  background: rgba(241, 45, 61, 0.20);
  color: #fff0f1;
  box-shadow: inset 0 0 0 1px rgba(255, 59, 77, 0.34);
}
.v2-qfs-seg-btn[data-qfs-stance="Pro"].is-active,
.v2-qfs-seg-btn[data-qfs-stance="Pro"][aria-pressed="true"] {
  background: rgba(35, 86, 217, 0.22);
  color: #e7eeff;
  box-shadow: inset 0 0 0 1px rgba(93, 134, 255, 0.34);
}

.v2-qfs-seg-btn:active {
  transform: scale(0.97);
}

/* ─── Sidecar chips wrapper ──────────────────────────────────────────────── */

.v2-qfs-sidecars {
  display: inline-flex;
  flex-shrink: 0;
  gap: 4px;
  align-items: center;
}

/* ─── Sidecar chip
   Inherits .v2-chip styles; these rules refine size for the strip context.
   ─────────────────────────────────────────────────────────────────────────── */

.v2-qfs-chip {
  font-size: 0.74rem !important;
  padding: 6px 10px !important;
  min-height: 32px !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.v2-qfs-chip:active {
  transform: scale(0.97);
}

/* ─── "More filters" button ──────────────────────────────────────────────── */

.v2-qfs-more {
  flex-shrink: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-muted);
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 500;
  font-family: var(--font-sans);
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  min-height: 32px;
  transition: color var(--t-fast, 140ms), border-color var(--t-fast, 140ms);
  -webkit-tap-highlight-color: transparent;
}

.v2-qfs-more:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.v2-qfs-more:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.v2-qfs-more:active {
  transform: scale(0.97);
}

/* ─── Mobile refinements (≤599px) ────────────────────────────────────────── */

@media (max-width: 599px) {
  .v2-qfs {
    gap: 4px;
    padding: 6px 0;
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .v2-qfs-seg-btn,
  .v2-qfs-chip,
  .v2-qfs-more {
    font-size: 0.72rem !important;
  }

  .v2-qfs-seg-btn {
    padding: 5px 10px;
  }
}

/* ─── Desktop (≥900px) ───────────────────────────────────────────────────── */

@media (min-width: 900px) {
  .v2-qfs {
    /* On desktop the side nav is visible; strip no longer needs to scroll */
    flex-wrap: wrap;
    overflow-x: visible;
  }
}
