/*!
 * Voski Category Back Button 1.0.0
 *
 * Uses the theme's fonts and the widget's text color. Tune per site with these custom properties
 * (set them on the widget or any ancestor, e.g. `.widget_product_categories { --voski-cb-color: #111; }`):
 *   --voski-cb-color           back link and level name color (default: the widget's text color)
 *   --voski-cb-back-size       back link font size        (default .8125rem)
 *   --voski-cb-back-weight     back link font weight      (default 600)
 *   --voski-cb-back-tracking   back link letter spacing   (default .12em)
 *   --voski-cb-back-transform  back link text transform   (default uppercase)
 *   --voski-cb-title-size      level name font size       (default 1.125em)
 *   --voski-cb-title-weight    level name font weight     (default 600)
 *   --voski-cb-current-weight  weight of the highlighted category in the list (default 600)
 *   --voski-cb-gap             space between header and list (default .75em)
 */

[data-voski-cb-view][hidden] {
	display: none !important;
}

.voski-cb-head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: .125em;
	margin: 0 0 var(--voski-cb-gap, .75em);
	padding: 0;
}

/* Two-class selectors so generic theme rules such as `.widget a` don't restyle the header. */
.voski-cb-head .voski-cb-back,
.voski-cb-head .voski-cb-title {
	/* Themes often color only links inside list items; without this the header falls back to the
	   generic link color (often an accent or browser blue) instead of matching the list. */
	color: var(--voski-cb-color, inherit) !important;
	text-decoration: none;
	box-shadow: none;
	border: 0;
	background: none;
}

.voski-cb-head .voski-cb-back {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	min-height: 44px;
	margin: 0;
	padding: 0;
	font-size: var(--voski-cb-back-size, .8125rem);
	font-weight: var(--voski-cb-back-weight, 600);
	letter-spacing: var(--voski-cb-back-tracking, .12em);
	text-transform: var(--voski-cb-back-transform, uppercase);
	line-height: 1.2;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}

.voski-cb-head .voski-cb-back:hover .voski-cb-back-label,
.voski-cb-head .voski-cb-back:focus-visible .voski-cb-back-label,
.voski-cb-head .voski-cb-title:hover,
.voski-cb-head .voski-cb-title:focus-visible {
	text-decoration: underline;
	text-underline-offset: .2em;
}

.voski-cb-icon {
	flex: none;
	width: 1.25em;
	height: 1.25em;
	margin-left: -.2em;
}

.rtl .voski-cb-icon {
	margin-right: -.2em;
	margin-left: 0;
	transform: scaleX(-1);
}

.voski-cb-head .voski-cb-title {
	display: block;
	font-size: var(--voski-cb-title-size, 1.125em);
	font-weight: var(--voski-cb-title-weight, 600);
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.voski-cb-list > .current-cat > a,
.voski-cb-list > .current-cat-parent > a {
	font-weight: var(--voski-cb-current-weight, 600);
}

.voski-cb-head a:focus:not(:focus-visible),
.voski-cb-list a:focus:not(:focus-visible) {
	outline: none;
}

@keyframes voski-cb-enter {
	from {
		opacity: 0;
		transform: translateX(-10px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.voski-cb-enter {
		animation: voski-cb-enter .2s ease-out;
	}
}
