/**
 * Rozmarin catalog filters — styles.
 *
 * Matches the Figma "Каталог"/"Каталог Фільтр" frames:
 *   - Desktop sidebar: light, Tenor Sans headings, Nunito checkbox labels.
 *   - Mobile (<=991px): olive (#727667) off-canvas panel, white controls,
 *     categories collapse into a tap-to-open accordion.
 *
 * @package blomify
 */

.rz-filter {
	--rz-text: #2b2b2b;
	--rz-box: 165, 168, 156;      /* #A5A89C */
	--rz-olive: #727667;
	--rz-white: #ffffff;
	font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--rz-text);
	max-width: 265px;
}

.rz-filter__section + .rz-filter__section {
	margin-top: 44px;
}

/* Section titles: "Kategorie" / "Cena" — Tenor Sans 24. */
.rz-filter__title {
	font-family: "Tenor Sans", "Nunito", sans-serif;
	font-size: 24px;
	line-height: 1;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	color: var(--rz-text);
	margin: 0 0 20px;
	font-weight: 400;
}

/* -------- Categories -------- */

.rz-filter__cats {
	display: flex;
	flex-direction: column;
}

.rz-cat + .rz-cat {
	margin-top: 44px;
}

.rz-cat__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8.75px;
	width: 100%;
	padding: 3px 0 4px;
	margin: 0;
	background: none;
	border: 0;
	cursor: default;
	text-align: left;
	font: inherit;
}

.rz-cat__icon {
	display: none; /* mobile only */
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
}

.rz-cat__name {
	flex: 1 1 auto;
	font-family: "Tenor Sans", "Nunito", sans-serif;
	font-size: 14px;
	line-height: 1.2;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	color: var(--rz-text);
}

.rz-cat__count {
	flex: 0 0 auto;
	font-family: "Tenor Sans", "Nunito", sans-serif;
	font-size: 14px;
	line-height: 1.4;
	letter-spacing: 0.2143em;
	text-transform: uppercase;
	color: var(--rz-text);
}

.rz-cat__subs {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 6px;
}

/* -------- Checkbox rows -------- */

.rz-check {
	display: flex;
	align-items: center;
	gap: 8.75px;
	padding: 3px 0 4px;
	margin: 0;
	cursor: pointer;
	user-select: none;
}

.rz-check input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.rz-check__box {
	flex: 0 0 auto;
	position: relative;
	width: 14px;
	height: 14px;
	border-radius: 2px;
	background: rgba(var(--rz-box), 0.3);
	transition: background 0.15s ease;
}

.rz-check__box::after {
	content: "";
	position: absolute;
	left: 4.5px;
	top: 1.5px;
	width: 4px;
	height: 8px;
	border: solid var(--rz-white);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg) scale(0);
	transition: transform 0.15s ease;
}

.rz-check input:checked + .rz-check__box {
	background: rgba(var(--rz-box), 1);
}

.rz-check input:checked + .rz-check__box::after {
	transform: rotate(45deg) scale(1);
}

.rz-check input:focus-visible + .rz-check__box {
	outline: 2px solid var(--rz-text);
	outline-offset: 2px;
}

.rz-check__label {
	font-family: "Nunito", sans-serif;
	font-size: 14px;
	line-height: 1.2;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	color: var(--rz-text);
}

/* -------- Price -------- */

.rz-price {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.rz-price__track {
	position: relative;
	height: 16px;
	margin: 0 8px;
}

.rz-price__track::before {
	content: "";
	position: absolute;
	left: -8px;
	right: -8px;
	top: 50%;
	height: 1px;
	background: var(--rz-text);
	transform: translateY(-50%);
}

.rz-price__range {
	position: absolute;
	top: 50%;
	height: 1px;
	background: var(--rz-text);
	transform: translateY(-50%);
}

/* Dual native range sliders stacked; thumbs interactive, tracks invisible. */
.rz-filter .rz-price__slider {
	-webkit-appearance: none;
	appearance: none;
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 16px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	background-color: transparent;
	box-shadow: none;
	pointer-events: none;
}

.rz-price__slider:focus {
	outline: none;
}

.rz-price__slider::-webkit-slider-runnable-track {
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
	border: 0;
	height: 16px;
}

.rz-price__slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	pointer-events: auto;
	width: 16px;
	height: 16px;
	margin-top: 0;
	border-radius: 50%;
	background: #fdfdfd;
	border: 1px solid var(--rz-text);
	cursor: pointer;
}

.rz-price__slider::-moz-range-thumb {
	pointer-events: auto;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fdfdfd;
	border: 1px solid var(--rz-text);
	cursor: pointer;
}

.rz-price__slider::-moz-range-track {
	background: none;
}

.rz-price__fields {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.rz-price__field {
	position: relative;
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--rz-text);
	border-radius: 4px;
	padding: 8px 10px;
	min-width: 60px;
	max-width: 90px;
	background: transparent;
}

.rz-filter .rz-price__input {
	width: 100%;
	min-width: 0;
	height: auto;
	border: 0;
	border-radius: 0;
	background: none;
	background-color: transparent;
	padding: 0;
	margin: 0;
	box-shadow: none;
	font-family: "Nunito", sans-serif;
	font-size: 12.3px;
	line-height: 1.2;
	color: var(--rz-text);
	-moz-appearance: textfield;
}

.rz-price__input::-webkit-outer-spin-button,
.rz-price__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.rz-price__suffix {
	margin-left: 4px;
	font-family: "Nunito", sans-serif;
	font-size: 12.3px;
	color: var(--rz-text);
	white-space: nowrap;
}

.rz-filter__submit {
	margin-top: 16px;
	padding: 10px 18px;
	border: 1px solid var(--rz-text);
	background: var(--rz-text);
	color: #fff;
	font-family: "Nunito", sans-serif;
	text-transform: uppercase;
	cursor: pointer;
}

/* Mobile close (X) — hidden on desktop. */
.rz-filter__mobile-close {
	display: none;
}

/* =========================================================================
 * MOBILE — olive off-canvas panel (<=991px)
 * ====================================================================== */
@media (max-width: 991px) {

	/* Repaint the theme's off-canvas panel olive + white text. */
	.shop-sidebar #post_sidebar .widget-area,
	.shop-nosidebar #offsidebar .widget-area {
		background: var(--rz-olive, #727667) !important;
		border-left-color: rgba(255, 255, 255, 0.15) !important;
		padding: 56px 15px 30px !important;
	}

	.rz-filter {
		--rz-text: #ffffff;
		--rz-box: 255, 255, 255;
		max-width: none;
		color: #fff;
	}

	.rz-filter__title,
	.rz-cat__name,
	.rz-cat__count,
	.rz-check__label,
	.rz-price__suffix,
	.rz-price__input {
		color: #fff;
	}

	.rz-price__track::before,
	.rz-price__range {
		background: #fff;
	}

	.rz-price__slider::-webkit-slider-thumb {
		background: var(--rz-olive, #727667);
		border-color: #fff;
	}

	.rz-price__slider::-moz-range-thumb {
		background: var(--rz-olive, #727667);
		border-color: #fff;
	}

	.rz-price__field {
		border-color: #fff;
	}

	/* Category rows become a tap-to-open accordion. */
	.rz-cat + .rz-cat {
		margin-top: 0;
	}

	.rz-cat__head {
		justify-content: flex-start;
		gap: 9px;
		cursor: pointer;
		padding: 8px 0;
	}

	.rz-cat__icon {
		display: block;
		background: no-repeat center / contain;
		/* mynaui:filter-solid (funnel), white */
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M3 4.5A1.5 1.5 0 0 1 4.5 3h15A1.5 1.5 0 0 1 21 4.5v1.62a3 3 0 0 1-.879 2.121l-5.242 5.243a1 1 0 0 0-.293.707V19a1 1 0 0 1-.553.894l-4 2A1 1 0 0 1 8 21v-6.81a1 1 0 0 0-.293-.707L2.464 8.24A3 3 0 0 1 3 6.12z'/%3E%3C/svg%3E");
	}

	.rz-cat.is-open .rz-cat__icon {
		/* back arrow, white */
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 8l-4 4 4 4'/%3E%3Cpath d='M6 12h9a4 4 0 0 1 0 8h-1'/%3E%3C/svg%3E");
	}

	.rz-cat__count {
		display: none;
	}

	.rz-cat__subs {
		max-height: 0;
		overflow: hidden;
		margin-top: 0;
		transition: max-height 0.3s ease;
	}

	.rz-cat.is-open .rz-cat__subs {
		max-height: 1200px;
		margin: 4px 0 12px;
	}

	.rz-filter__price {
		margin-top: 32px;
	}

	/* Close (X) at top-right of the panel. */
	.rz-filter__mobile-close {
		display: block;
		position: absolute;
		top: 14px;
		right: 15px;
		width: 22px;
		height: 22px;
		padding: 0;
		border: 0;
		background: no-repeat center / 18px 18px;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
		cursor: pointer;
		z-index: 2;
	}
}
