/**
 * Hide the Elementor accordion item wrapping an empty FacetWP facet.
 *
 * On the shop / product-category filter panel (#pp-shop-filters) each FacetWP facet
 * is wrapped in its own Elementor nested-accordion item with a static title (e.g.
 * "Umbrella Pole Finish", "Fire Ring Type"). FacetWP renders an EMPTY .facetwp-facet
 * when a facet has no choices for the current view, but it can't remove the Elementor
 * accordion item around it — so the title row stays, expanding to nothing
 * ("Filter is empty" — BugHerd #378/#379). And on a category archive, the facets
 * irrelevant to that category are exactly the empty ones the client wants hidden
 * (BugHerd #395).
 *
 * :has() lets the accordion item hide ITSELF whenever its checkbox facet rendered no
 * choices — data-driven, live on every FacetWP re-render, no per-category matrix.
 * Scoped to .facetwp-type-checkboxes so it never touches the sort/reset/pager facets.
 *
 * Gated behind body.pp-fwp-ready (set by the companion JS on the facetwp-loaded event)
 * so facets don't flash-hide on first paint before FacetWP populates their choices.
 *
 * See pp-custom/includes/facetwp-hide-empty-accordion.php for context.
 */

body.pp-fwp-ready #pp-shop-filters .e-n-accordion-item:has( .facetwp-type-checkboxes ):not( :has( .facetwp-checkbox ) ) {
	display: none;
}
