/* ==========================================================================
   Nova Ajax Product Filter — Category Accordion
   Pairs with novaapf-category-accordion.php and .js
   ========================================================================== */

/* Remove every icon/arrow the plugin injects by default (checkbox squares,
   bullet dots, etc.) on the category widget only. */
.novaapf-layered-nav ul li.novaapf-cat-item::before,
.novaapf-layered-nav ul li.novaapf-cat-item.chosen::before {
	content: none;
	display: none;
}

.novaapf-layered-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.novaapf-layered-nav ul li.novaapf-cat-item {
	margin: 0;
	border-bottom: 1px solid #eaeaea;
}

.novaapf-layered-nav > ul > li.novaapf-cat-item:last-child {
	border-bottom: none;
}

/* Header row: name + count + toggle. This row never changes height, so the
   count never drifts when the accordion opens or closes. */
.novaapf-layered-nav .novaapf-cat-row {
	display: flex;
	align-items: center;
	padding: 11px 0;
	cursor: pointer;
}

.novaapf-layered-nav .novaapf-cat-row a {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
	text-decoration: none;
	color: #333;
}

.novaapf-layered-nav .novaapf-cat-row a .name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Count sits directly beside the name, never floated, never centred. */
.novaapf-layered-nav .novaapf-cat-row .count {
	float: none;
	flex: 0 0 auto;
	margin-left: 6px;
	font-size: 0.85em;
	color: #999;
}

/* Toggle icon — only present in the markup for terms that actually have
   children, so it only ever appears where it should (requirement: only
   parents with children get a +/-). Built from two CSS bars, no icon font,
   no image request. */
.novaapf-layered-nav .novaapf-cat-row .novaapf-toggle {
	position: relative;
	flex: 0 0 16px;
	width: 16px;
	height: 16px;
	margin-left: auto;
}

.novaapf-layered-nav .novaapf-cat-row .novaapf-toggle::before,
.novaapf-layered-nav .novaapf-cat-row .novaapf-toggle::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	background: #555;
	transform: translate(-50%, -50%);
}

.novaapf-layered-nav .novaapf-cat-row .novaapf-toggle::before {
	width: 10px;
	height: 2px;
}

.novaapf-layered-nav .novaapf-cat-row .novaapf-toggle::after {
	width: 2px;
	height: 10px;
}

/* Expanded state: "+" becomes "-" by simply hiding the vertical bar. */
.novaapf-layered-nav li.novaapf-open > .novaapf-cat-row .novaapf-toggle::after {
	display: none;
}

/* Parent (top level) categories: bold. */
.novaapf-layered-nav > ul > li.novaapf-cat-item > .novaapf-cat-row a .name {
	font-weight: 600;
	color: #222;
}

/* Child categories: normal weight, slightly muted colour, indented. */
.novaapf-layered-nav ul.children {
	display: none; /* collapsed by default — no CSS hover, JS controls this */
	margin: 0 0 0 16px;
	padding: 0;
	list-style: none;
}

.novaapf-layered-nav ul.children .novaapf-cat-row {
	padding: 8px 0;
}

.novaapf-layered-nav ul.children .novaapf-cat-row a .name {
	font-weight: 400;
	color: #555;
}

/* Only the plugin's own JS toggles this class — never :hover. */
.novaapf-layered-nav li.novaapf-open > ul.children {
	display: block;
}

/* Currently active filter: highlighted, no matter which level it's on. */
.novaapf-layered-nav li.chosen > .novaapf-cat-row a .name {
	font-weight: 700;
	color: #000;
}

/* Leaf categories (no children) behave exactly like plain filter links:
   no toggle icon is ever printed for them (handled in PHP), and there is
   nothing else to override here — the shared .novaapf-cat-row styling
   above is all they need. */
