/* Product filters on the shop and category pages (inc/catalog-filters.php, js/catalog-filters.js).
 * >= 992px: left sidebar + product grid (3 columns, 4 from 1400px).
 * <  992px: "Filtrai" button next to the sorting opens a side panel (dialog); without JS the
 *           filters are shown above the grid as a plain form.
 */

.lv-cf {
	--lv-cf-blue: #0F69AF;
	--lv-cf-blue-dark: #0B4F86;
	--lv-cf-text: #212121;
	--lv-cf-muted: #5F6B7A;
	--lv-cf-line: #E6EBF0;
	--lv-cf-soft: #EEF5FB;
	font-family: 'Inter', sans-serif;
	color: var(--lv-cf-text);
}

.lv-cf *,
.lv-cf *::before,
.lv-cf *::after {
	box-sizing: border-box;
}

.lv-cf-main {
	min-width: 0;
	transition: opacity .15s ease;
}

.lv-cf.is-loading .lv-cf-main {
	opacity: .5;
}

/* ---------------------------------------------------------------
 * Panel (sidebar on desktop)
 * ------------------------------------------------------------ */
.lv-cf-panel__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--lv-cf-line);
}

.lv-cf-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--lv-cf-text);
}

.lv-cf-close {
	display: none;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--lv-cf-text);
	cursor: pointer;
}

.lv-cf-close:hover,
.lv-cf-close:active {
	background: #F2F5F8;
	color: var(--lv-cf-text);
}

.lv-cf-close:focus {
	outline: none;
}

.lv-cf-close:focus-visible {
	outline: 2px solid var(--lv-cf-blue);
	outline-offset: 2px;
}

.lv-cf-ico {
	flex: none;
	display: block;
}

/* Groups */
.lv-cf-group {
	border-bottom: 1px solid var(--lv-cf-line);
}

.lv-cf-group__head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px 28px 14px 0;
	position: relative;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--lv-cf-text);
	cursor: pointer;
	list-style: none;
	border-radius: 6px;
}

.lv-cf-group__head::-webkit-details-marker {
	display: none;
}

.lv-cf-group__head::after {
	content: "";
	position: absolute;
	right: 6px;
	top: 50%;
	width: 8px;
	height: 8px;
	margin-top: -6px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .15s ease;
}

.lv-cf-group:not([open]) > .lv-cf-group__head::after {
	transform: rotate(-45deg);
	margin-top: -4px;
}

.lv-cf-group__head:hover {
	color: var(--lv-cf-blue);
}

.lv-cf-group__head:focus {
	outline: none;
}

.lv-cf-group__head:focus-visible {
	outline: 2px solid var(--lv-cf-blue);
	outline-offset: 2px;
}

.lv-cf-group__n {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--lv-cf-blue);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
}

.lv-cf-group__body {
	padding: 0 0 16px;
}

/* Checkbox options */
.lv-cf-opts {
	margin: 0;
	padding: 0;
	list-style: none;
}

.lv-cf-opt {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0;
	padding: 5px 0;
	list-style: none;
}

.lv-cf-check {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--lv-cf-blue);
	cursor: pointer;
}

.lv-cf-check:focus {
	outline: none;
}

.lv-cf-check:focus-visible {
	outline: 2px solid var(--lv-cf-blue);
	outline-offset: 2px;
}

.lv-cf-opt label {
	display: flex;
	flex: 1 1 auto;
	justify-content: space-between;
	gap: 8px;
	min-width: 0;
	margin: 0;
	font-size: 14px;
	line-height: 1.45;
	color: var(--lv-cf-text);
	cursor: pointer;
}

.lv-cf-opt__name {
	min-width: 0;
	overflow-wrap: anywhere;
}

.lv-cf-opt__count {
	flex: none;
	color: var(--lv-cf-muted);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
}

.lv-cf-check:disabled,
.lv-cf-check:disabled + label {
	cursor: default;
	opacity: .5;
}

.lv-cf-opt label:hover .lv-cf-opt__name {
	color: var(--lv-cf-blue);
}

.lv-cf-check:disabled + label:hover .lv-cf-opt__name {
	color: inherit;
}

/* "Rodyti daugiau" (JS only; without JS all options are visible). */
.lv-cf-more {
	display: none;
	margin: 6px 0 0;
	padding: 4px 0;
	border: 0;
	background: transparent;
	color: var(--lv-cf-blue);
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.lv-cf-more:hover,
.lv-cf-more:active {
	color: var(--lv-cf-blue-dark);
	background: transparent;
}

.lv-cf-more:focus {
	outline: none;
}

.lv-cf-more:focus-visible {
	outline: 2px solid var(--lv-cf-blue);
	outline-offset: 2px;
	border-radius: 4px;
}

.lv-cf-js .lv-cf-more {
	display: inline-block;
}

.lv-cf-js .lv-cf-opt--more {
	display: none;
}

.lv-cf-js .lv-cf-group.is-expanded .lv-cf-opt--more {
	display: flex;
}

/* Price */
.lv-cf-range {
	display: none;
	position: relative;
	height: 28px;
	margin: 4px 10px 10px;
}

.lv-cf-js .lv-cf-range {
	display: block;
}

.lv-cf-range__track {
	position: absolute;
	left: 0;
	right: 0;
	top: 12px;
	height: 4px;
	border-radius: 4px;
	background: #DCE3EA;
}

.lv-cf-range__fill {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	border-radius: 4px;
	background: var(--lv-cf-blue);
}

.lv-cf-range input[type="range"] {
	position: absolute;
	left: -10px;
	top: 0;
	width: calc(100% + 20px);
	height: 28px;
	margin: 0;
	padding: 0;
	background: transparent;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}

.lv-cf-range input[type="range"]:focus {
	outline: none;
}

.lv-cf-range input[type="range"]::-webkit-slider-runnable-track {
	height: 28px;
	background: transparent;
}

.lv-cf-range input[type="range"]::-moz-range-track {
	height: 28px;
	background: transparent;
}

.lv-cf-range input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 20px;
	height: 20px;
	margin-top: 4px;
	border: 2px solid var(--lv-cf-blue);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(16, 24, 40, .2);
	pointer-events: auto;
	cursor: grab;
}

.lv-cf-range input[type="range"]::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border: 2px solid var(--lv-cf-blue);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(16, 24, 40, .2);
	pointer-events: auto;
	cursor: grab;
}

.lv-cf-range input[type="range"]:focus-visible::-webkit-slider-thumb {
	outline: 2px solid var(--lv-cf-blue);
	outline-offset: 2px;
}

.lv-cf-range input[type="range"]:focus-visible::-moz-range-thumb {
	outline: 2px solid var(--lv-cf-blue);
	outline-offset: 2px;
}

.lv-cf-price__inputs {
	display: flex;
	align-items: flex-end;
	gap: 8px;
}

.lv-cf-price__field {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	margin: 0;
	font-size: 13px;
	color: var(--lv-cf-muted);
}

.lv-cf-price__field input {
	width: 100%;
	min-width: 0;
	height: 40px;
	padding: 0 10px;
	border: 1px solid #CDD6DF;
	border-radius: 8px;
	background: #fff;
	color: var(--lv-cf-text);
	font: inherit;
	font-size: 15px;
	-moz-appearance: textfield;
}

.lv-cf-price__field input::-webkit-outer-spin-button,
.lv-cf-price__field input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.lv-cf-price__field input:focus {
	outline: none;
	border-color: var(--lv-cf-blue);
	box-shadow: 0 0 0 3px rgba(15, 105, 175, .18);
}

.lv-cf-price__sep {
	padding-bottom: 10px;
	color: var(--lv-cf-muted);
}

/* Footer: "Išvalyti filtrus" + submit */
.lv-cf-panel__foot {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-top: 16px;
}

.lv-cf-panel__foot [hidden] {
	display: none !important;
}

.lv-cf-apply {
	flex: 1 1 auto;
	min-height: 44px;
	padding: 10px 16px;
	border: 0;
	border-radius: 10px;
	background: var(--lv-cf-blue);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.lv-cf-apply:hover,
.lv-cf-apply:active {
	background: var(--lv-cf-blue-dark);
	color: #fff;
}

.lv-cf-apply:focus {
	outline: none;
}

.lv-cf-apply:focus-visible {
	outline: 2px solid var(--lv-cf-blue);
	outline-offset: 2px;
}

.lv-cf-apply__js {
	display: none;
}

.lv-cf-js .lv-cf-apply__js {
	display: inline;
}

.lv-cf-js .lv-cf-apply__nojs {
	display: none;
}

a.lv-cf-reset,
a.lv-cf-reset:visited,
a.lv-cf-reset:hover,
a.lv-cf-reset:focus,
a.lv-cf-reset:active {
	flex: none;
	color: var(--lv-cf-blue);
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

a.lv-cf-reset:hover,
a.lv-cf-reset:active {
	color: var(--lv-cf-blue-dark);
}

a.lv-cf-reset:focus {
	outline: none;
}

a.lv-cf-reset:focus-visible {
	outline: 2px solid var(--lv-cf-blue);
	outline-offset: 2px;
	border-radius: 4px;
}

/* ---------------------------------------------------------------
 * Toolbar: result count, sorting, "Filtrai" button
 * ------------------------------------------------------------ */
.lv-cf-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 8px;
}

.woocommerce .lv-cf-bar .woocommerce-result-count,
.woocommerce .lv-cf-bar .woocommerce-ordering,
.lv-cf-bar form.woocommerce-ordering {
	float: none;
	margin: 0 !important;
}

.lv-cf-bar .woocommerce-ordering {
	margin-left: auto !important;
}

.lv-cf-open {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex: none;
	height: 44px;
	padding: 0 16px;
	border: 1px solid var(--lv-cf-blue);
	border-radius: 10px;
	background: #fff;
	color: var(--lv-cf-blue);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.lv-cf-open:hover,
.lv-cf-open:active {
	background: var(--lv-cf-soft);
	color: var(--lv-cf-blue-dark);
}

.lv-cf-open:focus {
	outline: none;
}

.lv-cf-open:focus-visible {
	outline: 2px solid var(--lv-cf-blue);
	outline-offset: 2px;
}

.lv-cf-open__n {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--lv-cf-blue);
	color: #fff;
	font-size: 12px;
	line-height: 1;
}

/* Active chips */
.lv-cf-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	margin: 8px 0 4px;
}

.lv-cf-chips__label {
	font-size: 14px;
	color: var(--lv-cf-muted);
}

.lv-cf-chips__list {
	display: contents;
	margin: 0;
	padding: 0;
	list-style: none;
}

.lv-cf-chips__list li {
	margin: 0;
	list-style: none;
}

a.lv-cf-chip,
a.lv-cf-chip:visited,
a.lv-cf-chip:hover,
a.lv-cf-chip:focus,
a.lv-cf-chip:active {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-width: 100%;
	padding: 5px 8px 5px 12px;
	border: 1px solid #CFE0EE;
	border-radius: 999px;
	background: var(--lv-cf-soft);
	color: var(--lv-cf-blue);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
}

a.lv-cf-chip:hover,
a.lv-cf-chip:active {
	background: #DCEBF7;
	border-color: #B5D0E6;
	color: var(--lv-cf-blue-dark);
}

a.lv-cf-chip:focus {
	outline: none;
}

a.lv-cf-chip:focus-visible {
	outline: 2px solid var(--lv-cf-blue);
	outline-offset: 2px;
}

a.lv-cf-chip span {
	min-width: 0;
	overflow-wrap: anywhere;
}

a.lv-cf-chip .lv-cf-ico {
	width: 16px;
	height: 16px;
}

a.lv-cf-chips__clear,
a.lv-cf-chips__clear:visited,
a.lv-cf-chips__clear:hover,
a.lv-cf-chips__clear:focus,
a.lv-cf-chips__clear:active {
	color: var(--lv-cf-blue);
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

a.lv-cf-chips__clear:hover,
a.lv-cf-chips__clear:active {
	color: var(--lv-cf-blue-dark);
}

a.lv-cf-chips__clear:focus {
	outline: none;
}

a.lv-cf-chips__clear:focus-visible {
	outline: 2px solid var(--lv-cf-blue);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Empty result */
.lv-cf-empty {
	margin: 20px 0 40px;
	padding: 40px 24px;
	border: 1px dashed #CDD6DF;
	border-radius: 14px;
	background: #FAFCFE;
	text-align: center;
}

.lv-cf-empty__title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--lv-cf-text);
}

.lv-cf-empty__text {
	margin: 0 0 20px;
	color: var(--lv-cf-muted);
	font-size: 15px;
	line-height: 1.5;
}

a.lv-cf-btn,
a.lv-cf-btn:visited,
a.lv-cf-btn:hover,
a.lv-cf-btn:focus,
a.lv-cf-btn:active {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 22px;
	border: 0;
	border-radius: 10px;
	background: var(--lv-cf-blue);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

a.lv-cf-btn:hover,
a.lv-cf-btn:active {
	background: var(--lv-cf-blue-dark);
}

a.lv-cf-btn:focus {
	outline: none;
}

a.lv-cf-btn:focus-visible {
	outline: 2px solid var(--lv-cf-blue);
	outline-offset: 3px;
}

/* ---------------------------------------------------------------
 * Desktop: sidebar + grid
 * ------------------------------------------------------------ */
@media (min-width: 992px) {
	.lv-cf {
		display: grid;
		grid-template-columns: 240px minmax(0, 1fr);
		gap: 32px;
		align-items: start;
		margin-top: 10px;
	}

	.lv-cf-panel {
		position: sticky;
		top: 16px;
		/* No inner scrollbar (owner 2026-11-28): sticky only while the whole panel fits the window;
		   a taller panel (.is-tall, js/catalog-filters.js) scrolls with the page. */
		/* overflow-y: auto clips on all sides: checkboxes and price inputs sat at x = 0, so their left
		   border and the focus ring (2px + 2px offset) were cut off. 6px room on each side, pulled back
		   with negative margins so the content stays aligned with the page. */
		margin: -6px -6px 0;
		padding: 6px 6px 6px;
	}

	.lv-cf-panel.is-tall {
		position: static;
	}

	.lv-cf-overlay {
		display: none !important;
	}

	/* With JS, desktop applies on change: no submit row (clearing is in the chips row). */
	.lv-cf-js .lv-cf-panel__foot {
		display: none;
	}

	.lv-cf-main ul.products {
		display: grid !important;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 20px;
		margin: 0 0 24px !important;
	}

	.lv-cf-main ul.products::before,
	.lv-cf-main ul.products::after {
		display: none !important;
	}

	.woocommerce .lv-cf-main ul.products li.product,
	.lv-cf-main ul.products li.product {
		width: auto !important;
		margin: 0 !important;
		float: none !important;
		min-width: 0;
	}
}

@media (min-width: 1400px) {
	.lv-cf-main ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* ---------------------------------------------------------------
 * Narrow screens
 * ------------------------------------------------------------ */
@media (max-width: 991.98px) {
	/* Without JS: plain form above the products. */
	.lv-cf-panel {
		margin: 0 0 16px;
		padding: 16px;
		border: 1px solid var(--lv-cf-line);
		border-radius: 12px;
	}

	.lv-cf-js .lv-cf-open {
		display: inline-flex;
	}

	/* With JS: side panel (dialog). */
	.lv-cf-js .lv-cf-panel {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		z-index: 100310;
		width: min(380px, 100%);
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		background: #fff;
		box-shadow: -12px 0 32px rgba(16, 24, 40, .18);
		transform: translateX(100%);
		visibility: hidden;
		transition: transform .25s ease, visibility 0s linear .25s;
	}

	.lv-cf-js .lv-cf.is-open .lv-cf-panel {
		transform: none;
		visibility: visible;
		transition: transform .25s ease, visibility 0s;
	}

	.lv-cf-js .lv-cf-form {
		display: flex;
		flex-direction: column;
		height: 100%;
	}

	.lv-cf-js .lv-cf-panel__head {
		flex: none;
		padding: 12px 12px 12px 20px;
	}

	.lv-cf-js .lv-cf-close {
		display: inline-flex;
	}

	.lv-cf-js .lv-cf-panel__body {
		flex: 1 1 auto;
		min-height: 0;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 0 20px;
	}

	.lv-cf-js .lv-cf-panel__foot {
		flex: none;
		padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
		border-top: 1px solid var(--lv-cf-line);
		background: #fff;
	}

	.lv-cf-overlay {
		position: fixed;
		inset: 0;
		z-index: 100300;
		background: rgba(16, 24, 40, .45);
	}

	html.lv-cf-lock,
	html.lv-cf-lock body {
		overflow: hidden;
	}

	.lv-cf-bar .woocommerce-ordering {
		flex: 1 1 160px;
		min-width: 0;
	}

	.lv-cf-bar .woocommerce-ordering select {
		width: 100%;
		max-width: 100%;
	}
}

@media (max-width: 767.98px) {
	.lv-cf-bar {
		flex-wrap: nowrap;
	}

	.lv-cf-empty {
		padding: 28px 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lv-cf-js .lv-cf-panel,
	.lv-cf-js .lv-cf.is-open .lv-cf-panel,
	.lv-cf-main,
	.lv-cf-group__head::after {
		transition: none;
	}
}

.lv-cf-main:focus {
	outline: none;
}

/* ---------------------------------------------------------------
 * The theme styles every <button> with !important (blue fill, 12px 16px padding, 14px);
 * these buttons need their own look in every state, same size on hover.
 * ------------------------------------------------------------ */
.lv-cf button.lv-cf-close,
.lv-cf button.lv-cf-close:hover,
.lv-cf button.lv-cf-close:focus,
.lv-cf button.lv-cf-close:active {
	width: 40px;
	height: 40px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: transparent !important;
	color: var(--lv-cf-text) !important;
	line-height: 1 !important;
}

.lv-cf button.lv-cf-close:hover,
.lv-cf button.lv-cf-close:active {
	background: #F2F5F8 !important;
}

.lv-cf button.lv-cf-more,
.lv-cf button.lv-cf-more:hover,
.lv-cf button.lv-cf-more:focus,
.lv-cf button.lv-cf-more:active {
	padding: 4px 0 !important;
	border: 0 !important;
	border-radius: 4px !important;
	background: transparent !important;
	color: var(--lv-cf-blue) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
}

.lv-cf button.lv-cf-more:hover,
.lv-cf button.lv-cf-more:active {
	color: var(--lv-cf-blue-dark) !important;
}

.lv-cf button.lv-cf-apply,
.lv-cf button.lv-cf-apply:hover,
.lv-cf button.lv-cf-apply:focus,
.lv-cf button.lv-cf-apply:active {
	padding: 10px 16px !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: var(--lv-cf-blue) !important;
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
}

.lv-cf button.lv-cf-apply:hover,
.lv-cf button.lv-cf-apply:active {
	background: var(--lv-cf-blue-dark) !important;
}

.lv-cf button.lv-cf-open,
.lv-cf button.lv-cf-open:hover,
.lv-cf button.lv-cf-open:focus,
.lv-cf button.lv-cf-open:active {
	padding: 0 16px !important;
	border: 1px solid var(--lv-cf-blue) !important;
	border-radius: 10px !important;
	background: #fff !important;
	color: var(--lv-cf-blue) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
}

.lv-cf button.lv-cf-open:hover,
.lv-cf button.lv-cf-open:active {
	background: var(--lv-cf-soft) !important;
	color: var(--lv-cf-blue-dark) !important;
}
