/* ==========================================
   ERS — BEROCKET AAPF OVERRIDES
   Dark-theme & brand colour fixes for the
   WooCommerce Ajax Products Filter widgets.
   ========================================== */

/* ---- Sidebar widget wrappers ---- */
.berocket_single_filter_widget,
.bapf_sfilter {
  background: transparent;
  color: var(--ers-text);
}

/* ---- Section headings (CATEGORY, BRAND, PRICE RANGE, etc.) ---- */
.bapf_head h3 {
  font-family: var(--ers-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ers-cta);      /* gold, matches ERG */
  margin: 0 0 8px;
}

/* ---- Checkbox labels ---- */
.bapf_sfilter label,
.berocket_aapf_widget label {
  color: var(--ers-text-dim) !important;
  font-family: var(--ers-body);
  font-size: 13px;
}
.bapf_sfilter label:hover,
.berocket_aapf_widget label:hover {
  color: var(--ers-text) !important;
}

/* ---- Checkbox inputs ---- */
.bapf_sfilter input[type="checkbox"] {
  accent-color: var(--ers-teal);
}

/* ---- Count badge (product count next to each term) ---- */
.bapf_count {
  color: var(--ers-text-dim) !important;
  font-size: 11px;
}

/* ============================================================
   PRICE RANGE SLIDER — ion.rangeSlider "flat" skin
   Replace default red/coral (#ed5565) with ERS teal
   ============================================================ */

/* Track (filled range) */
.irs--flat .irs-bar,
.irs--flat .irs-bar--single {
  background: var(--ers-teal) !important;
}

/* Drag handles */
.irs--flat .irs-handle > i:first-child {
  background: var(--ers-teal) !important;
}

/* Value tooltips (from / to / single) */
.irs--flat .irs-from,
.irs--flat .irs-to,
.irs--flat .irs-single {
  background: var(--ers-teal) !important;
  color: #fff !important;
  font-family: var(--ers-body);
  font-size: 11px;
  border-radius: 6px;
}

/* Tooltip arrows */
.irs--flat .irs-from::before,
.irs--flat .irs-to::before,
.irs--flat .irs-single::before {
  border-top-color: var(--ers-teal) !important;
}

/* Min / max labels (outer range) */
.irs--flat .irs-min,
.irs--flat .irs-max {
  color: var(--ers-text-dim) !important;
  background: transparent !important;
  font-family: var(--ers-body);
  font-size: 11px;
}

/* Track background (empty portion) */
.irs--flat .irs-line {
  background: var(--ers-border) !important;
  border-radius: 4px;
}

/* ============================================================
   BRAND FILTER — [ers_brand_filter_v2] shortcode styling
   Renders brand taxonomy as scrollable checkbox list
   ============================================================ */
.ers-brand-filter {
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ers-border) transparent;
  padding: 0;
  margin: 0;
}
.ers-brand-filter::-webkit-scrollbar { width: 4px; }
.ers-brand-filter::-webkit-scrollbar-track { background: transparent; }
.ers-brand-filter::-webkit-scrollbar-thumb { background: var(--ers-border); border-radius: 2px; }

.ers-brand-filter li {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ers-brand-filter label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  border-bottom: 1px solid var(--ers-line);
  cursor: pointer;
  color: var(--ers-text-dim) !important;
  font-family: var(--ers-body);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  transition: color .15s ease;
  width: 100%;
}
.ers-brand-filter li:last-child label { border-bottom: none; }
.ers-brand-filter label:hover { color: var(--ers-text) !important; }
.ers-brand-filter input[type="checkbox"] {
  accent-color: var(--ers-teal);
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}
.ers-brand-filter .bapf_count {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11px !important;
  color: var(--ers-text-dim) !important;
}
.ers-brand-filter label:hover .bapf_count { color: var(--ers-text) !important; }

/* ============================================================
   CATEGORY FILTER — [ers_category_filter] link-style
   Single-select: click to filter, click active to clear.
   ============================================================ */
.ers-category-filter {
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--ers-border) transparent;
}
.ers-category-filter::-webkit-scrollbar { width: 4px; }
.ers-category-filter::-webkit-scrollbar-track { background: transparent; }
.ers-category-filter::-webkit-scrollbar-thumb { background: var(--ers-border); border-radius: 2px; }

.ers-cat-item {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ers-line);
  padding: 0 !important;
}
.ers-cat-item:last-child { border-bottom: none; }

.ers-cat-link {
  display: block;
  flex: 1;
  padding: 7px 4px;
  font-family: var(--ers-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ers-text-dim) !important;
  text-decoration: none !important;
  transition: color .15s ease;
}
.ers-cat-link:hover { color: var(--ers-teal-light) !important; }

/* Active / selected state */
.ers-cat-active .ers-cat-link {
  color: var(--ers-cta) !important;
  font-weight: 600;
}
.ers-cat-active .bapf_count {
  color: var(--ers-cta) !important;
}
