/**
 * kit-v2.css — Kit (Loadouts) tab v2 finish-pass (mockup 01-home-loadouts.html).
 * Loaded AFTER v2-theme.css + places-v2.css so it can lean on shared tokens.
 *
 * Adds:
 *   - .kit-appbar-v2     — BADGER wordmark + "KIT" title + total-loadouts count
 *                          + filter button (mirrors places-appbar-v2 pattern).
 *   - .kit-search-v2     — search bar matching places-search-v2.
 *   - .seg .ct           — small parenthesised count on each subtab pill
 *                          ("LOADOUTS (4)", "ITEMS (62)", "PACK", "SHARED").
 *   - .kit-active-hero   — the ACTIVE LOADOUT featured card (mockup .hero) shown
 *                          at the top of the loadouts body when one loadout is
 *                          marked active in localStorage.
 *
 * Item icons / item rows are NOT touched (locked rule). Mockup wordmark / search /
 * counts / hero are pure additions — the existing pills + body renderers stay
 * exactly where they were.
 */

/* =============================================================================
   KIT APP BAR
   ========================================================================== */

.kit-appbar-v2 {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px 12px;
}

.kit-appbar-v2 .mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  overflow: hidden;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px var(--line2);
}

.kit-appbar-v2 .mark img {
  width: 100%;
  height: 100%;
  display: block;
  transform: scale(1.22);
  filter: brightness(1.1);
}

.kit-appbar-v2 h1 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--ink-hi);
  text-transform: uppercase;
  line-height: 1;
  padding-top: 2px;
  margin: 0;
}

.kit-appbar-v2 .count {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--ink-low);
  padding-top: 5px;
  text-transform: uppercase;
}

.kit-appbar-v2 .spacer { flex: 1; }

.kit-appbar-v2 .abtn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--s1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-mid);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.kit-appbar-v2 .abtn:hover {
  background: var(--s2);
  color: var(--ink);
}

.kit-appbar-v2 .abtn svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =============================================================================
   KIT SEARCH BAR
   ========================================================================== */

.kit-search-v2 {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 14px;
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--ink);
}

.kit-search-v2 svg {
  width: 15px;
  height: 15px;
  stroke: var(--ink-low);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  flex-shrink: 0;
}

.kit-search-v2 input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--ink-hi);
  font-size: 13.5px;
  outline: none;
  padding: 0;
  margin: 0;
}

.kit-search-v2 input::placeholder {
  color: var(--ink-low);
}

/* =============================================================================
   SUBTAB PILL COUNTS
   ========================================================================== */

.kit-shell .segs .seg .ct {
  font-size: 10px;
  color: var(--ink-low);
  margin-left: 4px;
  letter-spacing: 0;
  font-weight: 600;
}

.kit-shell .segs .seg.active .ct {
  color: var(--olive);
}

/* =============================================================================
   ACTIVE LOADOUT HERO CARD
   Mockup target: .hero (01-home-loadouts.html lines ~95–122).
   Shown only when localStorage 'badger.kit.activeLoadoutId' resolves to a
   loadout that still exists.
   ========================================================================== */

.kit-active-hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 14px;
  background: linear-gradient(160deg, #1d2024 0%, #101214 70%);
  border: 1px solid var(--line2);
  box-shadow: var(--card-shadow);
  cursor: pointer;
}

.kit-active-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background:
    radial-gradient(420px 180px at 85% 0%, rgba(164, 174, 144, 0.10), transparent 70%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.022) 0 1px, transparent 1px 9px);
  pointer-events: none;
}

.kit-active-hero .inner {
  position: relative;
  padding: 18px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kit-active-hero .tagrow {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.kit-active-hero .tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mid);
  border: 1px solid var(--line2);
  border-radius: 6px;
  padding: 3px 7px;
  background: rgba(0, 0, 0, 0.25);
}

.kit-active-hero .tag.olive {
  color: var(--olive);
  border-color: rgba(164, 174, 144, 0.4);
  background: var(--olive-dim);
}

.kit-active-hero h3 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--ink-hi);
  text-transform: uppercase;
  line-height: 1;
  margin: 0;
}

.kit-active-hero .sub {
  font-size: 12px;
  color: var(--ink-mid);
  margin-top: -6px;
}

.kit-active-hero .statrow {
  display: flex;
  gap: 8px;
}

.kit-active-hero .stat {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px 8px;
}

.kit-active-hero .stat .v {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-hi);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.kit-active-hero .stat .v small {
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-mid);
  margin-left: 2px;
}

.kit-active-hero .stat .k {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-low);
  margin-top: 2px;
}

.kit-active-hero .readybar {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  margin-top: 2px;
}

.kit-active-hero .readybar i {
  display: block;
  height: 100%;
  background: var(--olive);
  border-radius: 2px;
}

.kit-active-hero .readyline {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--ink-low);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Section label for "YOUR LOADOUTS" header above the regular list. */
.kit-sect-v2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 16px 2px 10px;
}

.kit-sect-v2 h2 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin: 0;
}

.kit-sect-v2 .more {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-low);
}
