/* =====================================================================
   1423 (Part B) — Category filter module (rp_filter). Styled to match the
   category.html concept aside: white card, group dividers, rotating chevron,
   native red-accent checkboxes, right-aligned muted counts. Auto AJAX (the
   Apply button is gone — filtering is instant). Loaded via addStyle().
   ===================================================================== */
.rp-filter { --red:#db0f16; --red-dark:#b50c12; --ink:#181515; --muted:#6b6868; --line:#e7e8ec;
  font-family:'Outfit',sans-serif; color:var(--ink);
  background:#fff; border:1px solid var(--line); border-radius:14px; padding:1.25rem 1rem; }
.rp-filter *, .rp-filter *::before, .rp-filter *::after { box-sizing:border-box; }

/* head: "Filters" + Clear all */
.rp-filter__head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:1rem; }
.rp-filter__title { margin:0; font-size:16px; font-weight:700; letter-spacing:-.01em; }
.rp-filter__clear { display:inline-flex; align-items:center; gap:.3rem; font-size:12.5px; font-weight:600;
  color:var(--red); text-decoration:none; cursor:pointer; background:none; border:0; padding:0; font-family:inherit; }
.rp-filter__clear:hover { text-decoration:underline; }
.rp-filter__clear svg { width:11px; height:11px; flex:0 0 auto; }

/* collapsible group (divider between groups) */
.rp-filter__group { padding:.9rem 0; border-bottom:1px solid var(--line); }
.rp-filter__group:last-of-type { border-bottom:none; padding-bottom:0; }
.rp-filter__group:first-of-type { padding-top:0; }
.rp-filter__grouptitle { display:flex; align-items:center; justify-content:space-between; width:100%; gap:10px;
  font-weight:700; font-size:14px; color:var(--ink); cursor:pointer; user-select:none; list-style:none; }
.rp-filter__grouptitle::-webkit-details-marker { display:none; }
.rp-filter__grouptitle::marker { content:''; }
.rp-filter__chev { width:14px; height:14px; color:var(--muted); flex:0 0 auto; transition:transform .2s ease; }
.rp-filter__group[open] .rp-filter__chev { transform:rotate(180deg); }

/* options */
.rp-filter__options { display:flex; flex-direction:column; gap:.55rem; margin-top:.85rem; max-height:280px; overflow-y:auto;
  padding-right:14px; scrollbar-width:thin; scrollbar-color:#db0f16 #efe9e1; } /* 1460 — gap from the count + branded scrollbar */
.rp-filter__option { display:flex; align-items:center; gap:.55rem; font-size:13.5px; color:var(--ink); cursor:pointer; }
.rp-filter__option input[type=checkbox] { width:16px; height:16px; flex:0 0 auto; accent-color:var(--red); cursor:pointer; margin:0; }
.rp-filter__name { line-height:1.3; }
.rp-filter__option:hover .rp-filter__name { color:var(--red); }
.rp-filter__count { color:var(--muted); font-size:12px; margin-left:auto; flex:0 0 auto; }

/* branded scrollbar for long groups (1460) — red pill on a soft track */
.rp-filter__options::-webkit-scrollbar { width:10px; }
.rp-filter__options::-webkit-scrollbar-track { background:#efe9e1; border-radius:8px; margin:2px 0; }
.rp-filter__options::-webkit-scrollbar-thumb { background:#db0f16; border-radius:8px; border:2px solid #efe9e1; background-clip:padding-box; }
.rp-filter__options::-webkit-scrollbar-thumb:hover { background:#b50c12; }
