/**
 * Brillman hierarchical Product Type / Vehicle facets.
 *
 * Layout and typography come from the theme's existing .ais-HierarchicalMenu / .ais-Panel rules;
 * only the pieces the theme never had to style (collapse button, in-facet search) live here.
 */

.brillman-Facet .ais-Panel-header {
	position: relative;
}

.brillman-Facet .ais-Panel-collapseButton {
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	display: block;
	font: inherit;
	letter-spacing: inherit;
	padding: 0;
	text-align: left;
	text-transform: inherit;
	width: 100%;
}

.brillman-Facet .ais-Panel-body[hidden] {
	display: none;
}

.brillman-Facet-search {
	margin-bottom: 0.5rem;
}

.brillman-Facet-search .ais-SearchBox-input {
	width: 100%;
}

.brillman-Facet .ais-HierarchicalMenu-item--selected > div > .ais-HierarchicalMenu-link .ais-HierarchicalMenu-label {
	font-weight: 700;
}

.brillman-Facet .ais-HierarchicalMenu-link {
	align-items: center;
	display: flex;
	gap: 0.35em;
	justify-content: space-between;
	text-decoration: none;
}

/*
 * InstantSearch owns the refinement-chip DOM, so keep its raw prefixed value intact and
 * substitute the clean label visually. Mutating its text node makes the virtual DOM append
 * the raw value again on the next render.
 */
.ais-CurrentRefinements-categoryLabel[data-brillman-label] {
	font-size: 0;
}

.ais-CurrentRefinements-categoryLabel[data-brillman-label]::before {
	content: attr(data-brillman-label);
	font-size: 14px;
}

.brillman-Facet--empty {
	display: none;
}
