/**
 * VIOX Hierarchical Categories Filter – Tree Layout
 * Same filter_cat behaviour as XStore, with nested tree styling.
 */

.viox-hierarchical-cats .viox-cat-tree {
	list-style: none;
	margin: 0;
	padding: 0;
}

.viox-hierarchical-cats .viox-cat-tree .cat-item {
	margin: 0;
	padding: 0;
	position: relative;
}

.viox-hierarchical-cats .viox-cat-tree .cat-item > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.5em 0;
	text-decoration: none;
	transition: opacity 0.2s;
}

.viox-hierarchical-cats .viox-cat-tree .cat-item > a:hover {
	opacity: 0.8;
}

.viox-hierarchical-cats .viox-cat-tree .cat-item.current-item > a {
	font-weight: 600;
}

/* When inside category archive: highlight current category in tree */
.viox-hierarchical-cats .viox-cat-tree .cat-item.current-category > a {
	font-weight: 700;
}

/* Parent of current category (when viewing child category archive) */
.viox-hierarchical-cats .viox-cat-tree .cat-item.has-current-child > a {
	font-weight: 600;
}

/* Ensure ancestor's children are visible when on child category */
.viox-hierarchical-cats .viox-cat-tree .children.expanded {
	display: block;
}

/* Indent children */
.viox-hierarchical-cats .viox-cat-tree .children {
	list-style: none;
	margin: 0;
	padding-left: 1.25em;
	border-left: 1px solid rgba(0, 0, 0, 0.08);
	margin-left: 0.5em;
}

.viox-hierarchical-cats .viox-cat-tree .children .cat-item > a {
	padding: 0.4em 0;
	font-size: 0.95em;
}

/* Count badge */
.viox-hierarchical-cats .viox-cat-tree .count {
	opacity: 0.7;
	font-size: 0.9em;
	margin-left: 0.5em;
}
