/* Sticky & scroll sidebar (WoodMart Sidebar widget, includes/archive-sidebar). The widget gets
   .otlt-side when switched on; its container stays in view below the sticky header (--otlt-side-top
   from archive-sidebar.js, as the checkout's order summary), no taller than the window, and the
   widgets scroll inside it with no scrollbar, the top and bottom edges fading while there is more,
   and "Scroll for N more filters" under them. Spacing and fade size come from the widget's controls.
   Never the off-canvas (drawer) copy. */
.elementor-element:has(> .otlt-side):not([class*="wd-col-offcanvas"] *) {
	position: sticky;
	top: calc(var(--otlt-side-top, 0px) + var(--otlt-side-gap, 20px));
	max-height: calc(100vh - var(--otlt-side-top, 0px) - var(--otlt-side-gap, 20px) - var(--otlt-side-gap-b, 20px));
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	transition: top .3s cubic-bezier(.22, .61, .36, 1), max-height .3s cubic-bezier(.22, .61, .36, 1);
}

.elementor-element > .otlt-side:not([class*="wd-col-offcanvas"] *) {
	flex: 1 1 auto;
	min-height: 0;
	/* 4px each side for the price slider's handles, which sit centred on the track's ends. */
	margin-inline: -4px;
	padding-inline: 4px;
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: none;
}

.elementor-element > .otlt-side:not([class*="wd-col-offcanvas"] *)::-webkit-scrollbar {
	display: none;
}

/* Fade: room at both ends the size of the fade, so nothing is faded at rest (the top reaches into
   the container's padding), and both edges fade while the widgets scroll. */
.elementor-element > .otlt-side.otlt-side-fade:not([class*="wd-col-offcanvas"] *) {
	--f: var(--otlt-side-fade, 26px);
	margin-top: calc(var(--f) * -1);
	padding-block: var(--f);
}

.elementor-element > .otlt-side.otlt-side-fade.is-scroll:not([class*="wd-col-offcanvas"] *) {
	-webkit-mask-image: linear-gradient(transparent, #000 var(--f), #000 calc(100% - var(--f)), transparent);
	mask-image: linear-gradient(transparent, #000 var(--f), #000 calc(100% - var(--f)), transparent);
}

.otlt-side-n {
	display: none;
	flex: none;
	justify-content: center;
	padding-top: 10px;
	font-size: var(--evov-fs-xs, 12px);
	color: var(--color-gray-400, #8a8f98);
}

.otlt-side-n.is-on {
	display: flex;
}

/* Filter term search box: the theme gives it evov's dark form colour; here it follows the form
   colour around it. */
:root .wd-filter-search input {
	--wd-form-bg: inherit;
}

@media (prefers-reduced-motion: reduce) {
	.elementor-element:has(> .otlt-side):not([class*="wd-col-offcanvas"] *) {
		transition: none;
	}
}
