/**
 * Shortcode [wallmood_filters] — jedna kategoria na linię: Nazwa | przyciski.
 */

.wallmood-filters {
	--wmf-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	--wmf-text: #000000;
	--wmf-text-muted: #6b6b6b;
	--wmf-bg: #ffffff;
	--wmf-surface: #ffffff;
	--wmf-surface-hover: #d8d8d8;
	--wmf-border: #d8d8d8;
	--wmf-separator: #cccccc;
	--wmf-accent: #000000;
	--wmf-accent-text: #ffffff;
	--wmf-radius-btn: 5px;
	--wmf-font-size: 14px;
	--wmf-font-size-sm: 12px;
	--wmf-line-height: 1.4;
	--wmf-gap: 6px;
	--wmf-gap-md: 10px;
	--wmf-gap-lg: 20px;
	--wmf-transition: 0.15s ease;

	box-sizing: border-box;
	display: block;
	width: 100%;
	margin: 0 0 28px;
	padding: 0;
	font-family: var(--wmf-font);
	font-size: var(--wmf-font-size);
	font-weight: 400;
	line-height: var(--wmf-line-height);
	color: var(--wmf-text);
	background: transparent;
	border: 0;
}

.wallmood-filters *,
.wallmood-filters *::before,
.wallmood-filters *::after {
	box-sizing: border-box;
}

.wallmood-filters .wallmood-filters__heading {
	display: block;
	margin: 0 0 12px;
	padding: 0;
	font-family: var(--wmf-font);
	font-size: var(--wmf-font-size);
	font-weight: 600;
	font-style: normal;
	line-height: 1.3;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	color: var(--wmf-text);
	background: transparent;
	border: 0;
}

.wallmood-filters h1.wallmood-filters__heading,
.wallmood-filters h2.wallmood-filters__heading,
.wallmood-filters h3.wallmood-filters__heading,
.wallmood-filters h4.wallmood-filters__heading {
	font-size: var(--wmf-font-size);
	font-weight: 600;
	margin: 0 0 12px;
	padding: 0;
}

.wallmood-filters__bar {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 14px;
	width: 100%;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
}

/* Jedna linia na kategorię: STYL + przyciski w ramce (jak na karcie produktu) */
.wallmood-filters__groups {
	display: flex;
	flex-direction: column;
	gap: 2px;
	width: 100%;
	min-width: 0;
}

.wallmood-filters__category {
	display: block;
	margin: 0 0 5px;
	padding: 0;
}

.wallmood-filters__category:last-child {
	margin-bottom: 0;
}

.wallmood-filters__category-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.wallmood-filters .wallmood-filters__category-label {
	display: inline;
	margin: 0;
	padding: 0;
	font-family: var(--wmf-font);
	font-size: var(--wmf-font-size);
	font-weight: 400;
	font-style: normal;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	color: var(--wmf-text);
	background: transparent;
	border: 0;
	box-shadow: none;
}

.wallmood-filters h1.wallmood-filters__category-label,
.wallmood-filters h2.wallmood-filters__category-label,
.wallmood-filters h3.wallmood-filters__category-label,
.wallmood-filters h4.wallmood-filters__category-label {
	font-size: var(--wmf-font-size);
	font-weight: 400;
	line-height: 1.3;
	margin: 0;
	padding: 0;
}

.wallmood-filters__options {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	min-width: 0;
	flex: 1 1 auto;
}

.wallmood-filters .wallmood-filters__category-clear {
	display: none;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	align-self: center;
	width: 24px;
	height: 24px;
	min-width: 24px;
	min-height: 24px;
	margin: 0;
	padding: 0;
	font-family: var(--wmf-font);
	font-weight: 400;
	line-height: 0;
	color: var(--wmf-text-muted);
	background: transparent;
	background-image: none;
	border: 0;
	border-radius: 5px;
	outline: none;
	box-shadow: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: color var(--wmf-transition), background-color var(--wmf-transition);
}

.wallmood-filters .wallmood-filters__category-clear.is-visible,
.wallmood-filters .wallmood-filters__category-clear:not([hidden]) {
	display: inline-flex;
}

.wallmood-filters .wallmood-filters__category-clear:hover,
.wallmood-filters .wallmood-filters__category-clear:focus {
	color: var(--wmf-text);
	background-color: var(--wmf-border);
	outline: none;
}

.wallmood-filters .wallmood-filters__category-clear span {
	display: block;
	width: 24px;
	height: 24px;
	font-size: 16px;
	line-height: 24px;
	text-align: center;
	transform: translateY(-1px);
}

.wallmood-filters .wallmood-filters__option--button {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 5px 12px;
	font-family: var(--wmf-font);
	font-size: var(--wmf-font-size-sm);
	font-weight: 400;
	line-height: 1.3;
	text-align: center;
	white-space: nowrap;
	color: var(--wmf-text);
	background-color: var(--wmf-surface);
	background-image: none;
	border: 1px solid var(--wmf-border);
	border-radius: var(--wmf-radius-btn);
	outline: none;
	box-shadow: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: color var(--wmf-transition), background-color var(--wmf-transition);
}

.wallmood-filters .wallmood-filters__option--button:hover,
.wallmood-filters .wallmood-filters__option--button:focus {
	color: var(--wmf-text);
	background-color: var(--wmf-surface-hover);
	border: 1px solid var(--wmf-border);
	outline: none;
	box-shadow: none;
	opacity: 1;
	text-decoration: none;
}

.wallmood-filters .wallmood-filters__option--button.is-active,
.wallmood-filters .wallmood-filters__option--button.is-active:hover,
.wallmood-filters .wallmood-filters__option--button.is-active:focus {
	color: var(--wmf-text);
	background-color: var(--wmf-surface-hover);
	border: 1px solid var(--wmf-border);
	opacity: 1;
	text-decoration: none;
}

.wallmood-filters .wallmood-filters__option--checkbox {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 5px 12px;
	font-family: var(--wmf-font);
	font-size: var(--wmf-font-size-sm);
	font-weight: 400;
	line-height: 1.3;
	color: var(--wmf-text);
	background-color: var(--wmf-surface);
	border: 1px solid var(--wmf-border);
	border-radius: var(--wmf-radius-btn);
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
	transition: background-color var(--wmf-transition);
}

.wallmood-filters .wallmood-filters__option--checkbox:has(.wallmood-filters__input:checked),
.wallmood-filters .wallmood-filters__option--checkbox:hover,
.wallmood-filters .wallmood-filters__option--checkbox:focus-within {
	background-color: var(--wmf-surface-hover);
}

.wallmood-filters .wallmood-filters__input {
	width: 14px;
	height: 14px;
	min-width: 14px;
	margin: 0;
	padding: 0;
	accent-color: var(--wmf-accent);
	flex-shrink: 0;
	cursor: pointer;
}

.wallmood-filters .wallmood-filters__label {
	font-family: var(--wmf-font);
	font-size: var(--wmf-font-size-sm);
	font-weight: 400;
	color: var(--wmf-text);
}

.wallmood-filters__footer {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: var(--wmf-gap-md);
	width: 100%;
	margin: 0;
	padding: 5px 0 0;
	border-top: 1px solid #eeeeee;
}

.wallmood-filters__count {
	display: inline-block;
	margin: 0;
	padding: 0;
	font-family: var(--wmf-font);
	font-size: var(--wmf-font-size-sm);
	font-weight: 400;
	white-space: nowrap;
	color: var(--wmf-text-muted);
}

.wallmood-filters--notice {
	padding: 12px 0;
	background: transparent;
	border: 0;
}

.wallmood-filters__empty {
	margin: 0;
	padding: 0;
	font-size: var(--wmf-font-size-sm);
	color: var(--wmf-text-muted);
}

.wallmood-filters__footer .wallmood-filters__count {
	margin-left: auto;
}

.products .product.wallmood-filter-hidden,
ul.products li.product.wallmood-filter-hidden,
.e-loop-item.wallmood-filter-hidden,
.product.wallmood-filter-hidden,
li.product.wallmood-filter-hidden,
article.product.wallmood-filter-hidden,
.elementor-loop-container .wallmood-filter-hidden {
	display: none !important;
}

/* Zatrzymaj automatyczne dociąganie Elementora podczas filtrowania */
body.wallmood-filters-active .wmf-pagination-frozen,
body.wallmood-filters-active .e-load-more-anchor,
body.wallmood-filters-active .elementor-infinite-scroll-anchor,
body.wallmood-filters-active .e-loop__load-more {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	overflow: hidden !important;
	pointer-events: none !important;
}

body.wallmood-filters-active .wmf-loop-frozen .elementor-pagination,
body.wallmood-filters-active .wmf-loop-frozen .e-load-more-anchor {
	display: none !important;
}

@media (max-width: 640px) {
	.wallmood-filters__category-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
	}

	.wallmood-filters__options {
		width: 100%;
	}
}
