/* ==========================================================================
   Air Market - v3 / tier 3 filter bar. Owned by the filter-bar builder.
   Pairs with assets/js/v3/filterbar.js. Styles [data-v3-slot="filterbar"]:
   job chips, result count, sort control.

   Every rule below is scoped under :root:is([data-ui="v3"],[data-ui="v4"],[data-ui="v5"]) - v0/v1/v2 render
   byte-identically. v4 inherits this bar unchanged (V4-SPEC.md §2.3), so it
   shares v3's gate rather than a private clause. Height comes from
   --v3-filterbar-h; inset and measure from --v3-gutter / --v3-max
   (store-v3-core.css §4). Colour comes from tokens.css or the --v3-* aliases,
   never a literal hex. Cursors are
   var(--cur-*) only - the shared .tab rule in components.css sets none, so
   this file supplies it for every control inside the slot. The count is
   Manrope with tabular-nums; JetBrains Mono never appears here.
   ========================================================================== */

:root:is([data-ui="v3"],[data-ui="v4"],[data-ui="v5"]) [data-v3-slot="filterbar"] {
  box-sizing: border-box;
  width: 100%;
  border-top: 1px solid var(--v3-line);
  background: var(--v3-paper);
}

:root:is([data-ui="v3"],[data-ui="v4"],[data-ui="v5"]) [data-v3-slot="filterbar"][hidden] { display: none; }

:root:is([data-ui="v3"],[data-ui="v4"],[data-ui="v5"]) .v3-fb-inner {
  box-sizing: border-box;
  max-width: var(--v3-max);
  margin: 0 auto;
  min-height: var(--v3-filterbar-h);
  padding: var(--space-8) var(--v3-gutter);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-12);
}

/* Chips - the Air_DS Tabs component (Style=Default), the same markup the
   Agents category row already uses. .v3-fb-chips only adjusts the wrapper's
   fit inside a 48px row; .tab's own look is untouched. */
:root:is([data-ui="v3"],[data-ui="v4"],[data-ui="v5"]) .v3-fb-chips {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  padding: 0;
  gap: var(--space-4);
}

:root:is([data-ui="v3"],[data-ui="v4"],[data-ui="v5"]) .v3-fb-chips .tab {
  cursor: var(--cur-pointer);
  border-radius: var(--radius-full);
}
:root:is([data-ui="v3"],[data-ui="v4"],[data-ui="v5"]) .v3-fb-chips .tab[aria-selected="true"] {
  background: var(--color-brand-100);
  color: var(--color-brand-800);
  font-weight: 600;
}
:root:is([data-ui="v3"],[data-ui="v4"],[data-ui="v5"]) .v3-fb-chips .tab:disabled { cursor: var(--cur-arrow); }

/* Count + sort, right-anchored; wraps under the chips on narrow bars rather
   than forcing a horizontal scrollbar on the whole row. */
:root:is([data-ui="v3"],[data-ui="v4"],[data-ui="v5"]) .v3-fb-meta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-16);
  margin-left: auto;
  white-space: nowrap;
}

:root:is([data-ui="v3"],[data-ui="v4"],[data-ui="v5"]) .v3-fb-count {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}

:root:is([data-ui="v3"],[data-ui="v4"],[data-ui="v5"]) .v3-fb-sort {
  display: inline-flex;
  align-items: center;
  gap: var(--space-8);
  cursor: var(--cur-pointer);
}

/* --text-3 (neutral/600, 4.81:1), NOT --color-text-tertiary (neutral/500,
   3.6:1) - store.css remapped the tertiary ramp for exactly this reason and
   13px label text has to clear 4.5:1. */
:root:is([data-ui="v3"],[data-ui="v4"],[data-ui="v5"]) .v3-fb-sort-label {
  font-family: var(--font);
  font-size: 13px;
  color: var(--text-3);
}

:root:is([data-ui="v3"],[data-ui="v4"],[data-ui="v5"]) .v3-fb-sort select {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  background: var(--color-surface-sunken);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-8);
  cursor: var(--cur-pointer);
}
:root:is([data-ui="v3"],[data-ui="v4"],[data-ui="v5"]) .v3-fb-sort select:focus-visible {
  outline: none;
  border-color: var(--color-border-focus);
}

/* ---- the #/browse route's own page shell -------------------------------
   #/browse is this file's view (see filterbar.js). Everything below the lede
   is v2's card grid, untouched (SCOPE DISCIPLINE: this file does not restyle
   appCard/rowGrid), the h1 is .page-title's job, and the empty state reuses
   store.css's unscoped .tab-empty. Only the lede needs a rule.

   Moved here from store-v3-mega.css at integration, together with the view
   itself: the paragraph and the code that prints it now live in one feature. */

:root:is([data-ui="v3"],[data-ui="v4"],[data-ui="v5"]) .v3-browse-lede {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 62ch;
  margin-top: -12px;
  margin-bottom: var(--space-20);
}
