/*
 * Starfiniti Filters. Colours and fonts come from the theme.
 *
 * A store sets its own look with four custom properties, on `:root` or on `.sffilters-panel`:
 * `--sffilters-accent` (ticked checkboxes, the slider, the main button), `--sffilters-accent-text`
 * (the tick and the text of the main button), `--sffilters-border` (the checkbox outline) and `--sffilters-radius`.
 * `--sffilters-page` and `--sffilters-page-text`, on `:root` or on `.sffilters-results`, colour the page links under
 * the products when the brand colour of the page builder is not the one to use.
 * `--sffilters-button` and `--sffilters-button-text`, on `:root` or on `.sffilters-bar`, do the same for the
 * "Filters" button on small screens.
 *
 * Fixed sizes are in pixels and sizes that follow the text in em. None is in rem, because themes set the root
 * font size differently (Bricks uses 10px).
 */

.sffilters-panel {
	display: grid;
	gap: 24px;
	margin: 0 0 24px;
}

.sffilters-filter {
	background: none;
	border: 0;
	margin: 0;
	min-width: 0;
	padding: 0;
}

.sffilters-filter__title {
	background: none;
	font-weight: 600;
	margin: 0 0 8px;
	padding: 0;
}

.sffilters-options {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sffilters-options .sffilters-options {
	margin-left: 24px;
}

.sffilters-option {
	margin: 0;
}

/*
 * A list with options under options is a tree. Every row leaves room for an arrow on its left, and the options
 * under one option fold away behind that arrow. The arrow is the `summary` of a `details` element, so it works
 * without the script. It sits beside the first line of its option.
 */

.sffilters-options--tree .sffilters-option {
	position: relative;
}

.sffilters-options--tree .sffilters-option__control {
	margin-left: 24px;
}

.sffilters-branch__toggle {
	align-items: center;
	border-radius: var(--sffilters-radius, 4px);
	color: inherit;
	cursor: pointer;
	display: flex;
	height: 2em;
	height: calc(1lh + 8px);
	justify-content: center;
	left: 0;
	list-style: none;
	position: absolute;
	top: 0;
	width: 24px;
}

.sffilters-branch__toggle::-webkit-details-marker {
	display: none;
}

.sffilters-branch__toggle::before {
	border-bottom: 1.5px solid;
	border-right: 1.5px solid;
	box-sizing: border-box;
	content: "";
	height: 0.45em;
	transform: translate(-25%, 0) rotate(-45deg);
	transition: transform 0.12s;
	width: 0.45em;
}

.sffilters-branch[open] > .sffilters-branch__toggle::before {
	transform: translate(0, -25%) rotate(45deg);
}

.sffilters-branch__toggle:focus-visible {
	outline: 2px solid var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
	outline-offset: -2px;
}

.sffilters-option__control {
	align-items: baseline;
	color: inherit;
	cursor: pointer;
	display: flex;
	gap: 9.6px;
	padding: 4px 0;
}

.sffilters-option__control input {
	flex: none;
	margin: 0;
}

/*
 * Checkboxes are drawn here, so they look the same in every browser and take the accent colour of the store.
 * The box sits in the middle of the first line of its label, whatever the font and line height of the store.
 * It stays square where the theme gives every input a padding, and the label takes the colour of the panel.
 */

.sffilters-option__control input[type="checkbox"] {
	-webkit-appearance: none;
	align-self: flex-start;
	appearance: none;
	background: #fff;
	border: 1.5px solid var(--sffilters-border, #767676);
	border-radius: 0.25em;
	box-sizing: border-box;
	cursor: pointer;
	display: inline-grid;
	font-size: inherit;
	height: 1.25em;
	line-height: inherit;
	margin-top: 0.1em;
	margin-top: calc((1lh - 1.25em) / 2);
	min-width: 0;
	padding: 0;
	place-content: center;
	transition: background-color 0.12s, border-color 0.12s, box-shadow 0.12s;
	width: 1.25em;
}

.sffilters-option__control input[type="checkbox"]::before {
	background: var(--sffilters-accent-text, #fff);
	clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0, 43% 62%);
	content: "";
	height: 0.72em;
	transform: scale(0);
	transition: transform 0.12s;
	width: 0.72em;
}

.sffilters-option__control:hover input[type="checkbox"] {
	border-color: var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
	box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.18);
}

.sffilters-option__control input[type="checkbox"]:checked {
	background: var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
	border-color: var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
}

.sffilters-option__control input[type="checkbox"]:checked::before {
	transform: scale(1);
}

.sffilters-option__control input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
	outline-offset: 2px;
}

.sffilters-option__control:has(input:checked) .sffilters-option__label {
	font-weight: 600;
}

/*
 * Swatches: the checkbox is there for the keyboard and for screen readers, the shopper sees a round chip with
 * the colour or the picture the store gave it, and the name under it. A ring marks the chosen ones.
 */

.sffilters-swatches {
	display: grid;
	gap: 12px 8px;
	grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
}

.sffilters-swatch {
	align-items: center;
	flex-direction: column;
	gap: 6px;
	padding: 4px 0;
	position: relative;
	text-align: center;
}

.sffilters-swatch input[type="checkbox"],
.sffilters-swatch .sffilters-option__count {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: 0;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.sffilters-swatch__chip {
	background: #fff center / cover no-repeat;
	border: 1px solid var(--sffilters-border, #767676);
	border-radius: 50%;
	box-sizing: border-box;
	flex: none;
	height: 40px;
	transition: box-shadow 0.12s;
	width: 40px;
}

.sffilters-swatch:hover .sffilters-swatch__chip {
	box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.18);
}

.sffilters-swatch input:checked + .sffilters-swatch__chip {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
}

.sffilters-swatch input:focus-visible + .sffilters-swatch__chip {
	outline: 2px solid var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
	outline-offset: 5px;
}

.sffilters-swatch .sffilters-option__label {
	flex: none;
	font-size: 0.875em;
	line-height: 1.3;
}

/* The values after the limit of a filter fold away behind "more", which then reads "less". */

.sffilters-rest__toggle {
	color: inherit;
	cursor: pointer;
	display: inline-block;
	font-size: 0.875em;
	list-style: none;
	margin: 4px 0;
	text-decoration: underline;
}

.sffilters-rest__toggle::-webkit-details-marker {
	display: none;
}

.sffilters-rest__toggle:focus-visible {
	outline: 2px solid var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
	outline-offset: 2px;
}

.sffilters-rest[open] > .sffilters-rest__toggle > .sffilters-rest__more,
.sffilters-rest:not([open]) > .sffilters-rest__toggle > .sffilters-rest__less {
	display: none;
}

/* Radio buttons are drawn the same way, round, with a dot in the accent colour. */

.sffilters-option__control input[type="radio"] {
	-webkit-appearance: none;
	align-self: flex-start;
	appearance: none;
	background: #fff;
	border: 1.5px solid var(--sffilters-border, #767676);
	border-radius: 50%;
	box-sizing: border-box;
	cursor: pointer;
	display: inline-grid;
	font-size: inherit;
	height: 1.25em;
	line-height: inherit;
	margin-top: 0.1em;
	margin-top: calc((1lh - 1.25em) / 2);
	min-width: 0;
	padding: 0;
	place-content: center;
	transition: border-color 0.12s, box-shadow 0.12s;
	width: 1.25em;
}

.sffilters-option__control input[type="radio"]::before {
	background: var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
	border-radius: 50%;
	content: "";
	height: 0.65em;
	transform: scale(0);
	transition: transform 0.12s;
	width: 0.65em;
}

.sffilters-option__control:hover input[type="radio"] {
	border-color: var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
	box-shadow: 0 0 0 3px rgba(128, 128, 128, 0.18);
}

.sffilters-option__control input[type="radio"]:checked {
	border-color: var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
}

.sffilters-option__control input[type="radio"]:checked::before {
	transform: scale(1);
}

.sffilters-option__control input[type="radio"]:focus-visible {
	outline: 2px solid var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
	outline-offset: 2px;
}

/* Where the system forces its own colours, the browser draws the checkbox and the radio button. */

@media (forced-colors: active) {
	.sffilters-option__control input[type="radio"] {
		-webkit-appearance: auto;
		appearance: auto;
	}

	.sffilters-option__control input[type="radio"]::before {
		display: none;
	}

	.sffilters-option__control input[type="checkbox"] {
		-webkit-appearance: auto;
		appearance: auto;
	}

	.sffilters-option__control input[type="checkbox"]::before {
		display: none;
	}
}

.sffilters-option__link {
	color: inherit;
	text-decoration: none;
}

.sffilters-option__link:hover .sffilters-option__label,
.sffilters-option__link:focus-visible .sffilters-option__label {
	text-decoration: underline;
}

.sffilters-option__link[aria-current="page"] .sffilters-option__label {
	font-weight: 700;
}

.sffilters-filter__all {
	font-size: 0.875em;
	margin: 0 0 8px;
}

.sffilters-option__label {
	flex: 1;
	min-width: 0;
}

.sffilters-option__count {
	font-size: 0.875em;
	font-variant-numeric: tabular-nums;
	opacity: 0.7;
}

.sffilters-range {
	align-items: center;
	display: flex;
	gap: 8px;
}

.sffilters-range__end {
	flex: 1;
	min-width: 0;
}

.sffilters-range__end input {
	box-sizing: border-box;
	width: 100%;
}

/* Price slider: two range inputs on one track. */

.sffilters-slider {
	color: var(--sffilters-accent, inherit);
	height: 20px;
	margin: 4px 0 12px;
	position: relative;
}

.sffilters-slider::before,
.sffilters-slider::after {
	background: currentColor;
	border-radius: 2px;
	content: "";
	height: 4px;
	margin-top: -2px;
	position: absolute;
	top: 50%;
}

.sffilters-slider::before {
	left: 0;
	opacity: 0.2;
	right: 0;
}

.sffilters-slider::after {
	left: calc(var(--sffilters-from, 0) * (100% - 20px) / 100 + 10px);
	right: calc((100 - var(--sffilters-to, 100)) * (100% - 20px) / 100 + 10px);
}

.sffilters-slider input {
	-webkit-appearance: none;
	appearance: none;
	background: none;
	border: 0;
	color: inherit;
	height: 100%;
	left: 0;
	margin: 0;
	padding: 0;
	pointer-events: none;
	position: absolute;
	top: 0;
	width: 100%;
	z-index: 1;
}

.sffilters-slider input::-webkit-slider-runnable-track {
	-webkit-appearance: none;
	background: none;
	height: 20px;
}

.sffilters-slider input::-moz-range-track {
	background: none;
}

.sffilters-slider input::-webkit-slider-thumb {
	-webkit-appearance: none;
	background: #fff;
	border: 2px solid currentColor;
	border-radius: 50%;
	box-sizing: border-box;
	cursor: pointer;
	height: 20px;
	pointer-events: auto;
	width: 20px;
}

.sffilters-slider input::-moz-range-thumb {
	background: #fff;
	border: 2px solid currentColor;
	border-radius: 50%;
	box-sizing: border-box;
	cursor: pointer;
	height: 20px;
	pointer-events: auto;
	width: 20px;
}

.sffilters-slider input:focus-visible {
	outline: none;
}

.sffilters-slider input:focus-visible::-webkit-slider-thumb {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.sffilters-slider input:focus-visible::-moz-range-thumb {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/*
 * Buttons. A theme that styles `.button` keeps its own look: these rules carry no weight (`:where`),
 * so they only show where the theme has no button style, as in Breakdance or Bricks.
 */

:where(.sffilters-toggle, .sffilters-drawer__show, .sffilters-more__button, .sffilters-apply) {
	appearance: none;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: var(--sffilters-radius, 4px);
	color: inherit;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	min-height: 44px;
	padding: 0.6em 1.1em;
	text-decoration: none;
}

:where(.sffilters-drawer__show) {
	background: var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
	border-color: transparent;
	color: var(--sffilters-accent-text, #fff);
}

/* Bar above the products: the button for small screens and the selected filters. */

.sffilters-bar {
	align-items: center;
	display: none;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 16px;
}

.sffilters-bar--active {
	display: flex;
}

.sffilters-bar .sffilters-toggle {
	display: none;
}

.sffilters-toggle__count {
	border: 1px solid currentColor;
	border-radius: 999px;
	display: inline-block;
	font-size: 0.75em;
	line-height: 1.6;
	min-width: 1.6em;
	padding: 0 0.3em;
	text-align: center;
}

.sffilters-chips {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.sffilters-chips li {
	margin: 0;
}

.sffilters-chip {
	border: 1px solid currentColor;
	border-radius: 999px;
	display: inline-flex;
	font-size: 0.875em;
	gap: 0.4em;
	padding: 0.15em 0.75em;
	text-decoration: none;
}

.sffilters-clear {
	font-size: 0.875em;
}

/* Load more. */

.sffilters-more {
	margin: 24px 0;
	text-align: center;
}

.sffilters-more--busy {
	opacity: 0.6;
	pointer-events: none;
}

.sffilters-hidden {
	display: none !important;
}

/* Small screens: the panel opens as a drawer. */

.sffilters-drawer {
	border: 0;
	bottom: 0;
	box-shadow: 0 0 32px rgba(0, 0, 0, 0.3);
	height: 100%;
	left: 0;
	margin: 0;
	max-height: none;
	max-width: none;
	padding: 0;
	top: 0;
	width: min(384px, 88vw);
}

.sffilters-drawer[open] {
	display: flex;
	flex-direction: column;
}

.sffilters-drawer::backdrop {
	background: rgba(0, 0, 0, 0.5);
}

.sffilters-drawer__head,
.sffilters-drawer__foot {
	flex: none;
	padding: 12px 16px;
}

.sffilters-drawer__head {
	align-items: center;
	border-bottom: 1px solid rgba(128, 128, 128, 0.3);
	display: flex;
	justify-content: space-between;
}

.sffilters-drawer__foot {
	border-top: 1px solid rgba(128, 128, 128, 0.3);
}

.sffilters-drawer__body {
	flex: 1;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 16px;
}

.sffilters-drawer__close {
	align-items: center;
	background: none;
	border: 0;
	border-radius: var(--sffilters-radius, 4px);
	color: inherit;
	cursor: pointer;
	display: inline-flex;
	font-size: 28px;
	height: 44px;
	justify-content: center;
	line-height: 1;
	margin: -8px -8px -8px 0;
	padding: 0;
	width: 44px;
}

.sffilters-drawer__show {
	width: 100%;
}

.sffilters-open {
	overflow: hidden;
}

/* The script sets this class below the width where the panel becomes a drawer (768px unless the store changes it). */

/* The bar takes the width it is given, also as an item of a row or of a centred column of the page builder. */

.sffilters-mobile .sffilters-bar {
	align-self: stretch;
	display: flex;
	flex-grow: 1;
}

/*
 * The button that opens the drawer is the one thing a shopper on a phone has to find, so it is a full-width
 * button in the accent colour with an icon, the same in every store. The rules are marked important, because
 * themes and page builders style every `.button` their own way. The font stays the one of the page.
 */

.sffilters-mobile .sffilters-bar .sffilters-toggle {
	--sffilters-button-color: var(--sffilters-button, var(--sffilters-accent, var(--bde-brand-primary-color, var(--bricks-color-primary, var(--wp--preset--color--primary, #1a1a1a)))));
	--sffilters-button-ink: var(--sffilters-button-text, var(--sffilters-accent-text, #fff));
	align-items: center !important;
	background: var(--sffilters-button-color) !important;
	border: 1px solid var(--sffilters-button-color) !important;
	border-radius: var(--sffilters-radius, var(--bde-button-border-radius, var(--bricks-border-radius, 4px))) !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	color: var(--sffilters-button-ink) !important;
	cursor: pointer;
	display: flex !important;
	flex: 1 1 100%;
	font-size: 16px !important;
	font-weight: 700 !important;
	gap: 0.5em;
	height: auto !important;
	justify-content: center !important;
	line-height: 1.2 !important;
	margin: 0 !important;
	min-height: 48px !important;
	opacity: 1 !important;
	padding: 0 16px !important;
	text-decoration: none !important;
	width: 100% !important;
}

.sffilters-mobile .sffilters-bar .sffilters-toggle::before {
	background: currentColor;
	content: "";
	flex: none;
	height: 1.25em;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 6h9M18 6h3M3 12h3M12 12h9M3 18h7M16 18h5'/%3E%3Ccircle cx='15' cy='6' r='2.5'/%3E%3Ccircle cx='9' cy='12' r='2.5'/%3E%3Ccircle cx='13' cy='18' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 6h9M18 6h3M3 12h3M12 12h9M3 18h7M16 18h5'/%3E%3Ccircle cx='15' cy='6' r='2.5'/%3E%3Ccircle cx='9' cy='12' r='2.5'/%3E%3Ccircle cx='13' cy='18' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
	width: 1.25em;
}

.sffilters-mobile .sffilters-bar .sffilters-toggle:is(:hover, :active) {
	filter: brightness(0.92);
}

.sffilters-mobile .sffilters-bar .sffilters-toggle:focus-visible {
	outline: 2px solid var(--sffilters-button-color) !important;
	outline-offset: 2px;
}

/* The number of filters in use is the button turned inside out. */

.sffilters-mobile .sffilters-bar .sffilters-toggle .sffilters-toggle__count {
	background: var(--sffilters-button-ink) !important;
	border-color: var(--sffilters-button-ink) !important;
	color: var(--sffilters-button-color) !important;
}

.sffilters-mobile .sffilters-panel {
	display: none;
}

.sffilters-mobile .sffilters-drawer .sffilters-panel {
	display: grid;
	margin: 0;
}

.sffilters-results {
	transition: opacity 0.15s;
}

.sffilters-loading .sffilters-results {
	opacity: 0.5;
	pointer-events: none;
}

/*
 * Horizontal panel: a row of buttons above the products, each opening its filter under it. In the drawer on
 * small screens the same buttons are rows, one under the other, and the script lays the vertical panel out
 * the same way there.
 */

.sffilters-panel--horizontal {
	align-items: center;
	display: flex;
	flex-flow: row wrap;
	gap: 8px;
}

.sffilters-drop {
	position: relative;
}

.sffilters-drop__toggle,
.sffilters-panel--horizontal > .sffilters-filter--toggle .sffilters-option__control {
	align-items: center;
	border: 1px solid rgba(128, 128, 128, 0.35);
	border-radius: var(--sffilters-radius, 4px);
	box-sizing: border-box;
	cursor: pointer;
	display: inline-flex;
	gap: 8px;
	height: 40px;
	line-height: 1;
	padding: 0 14px;
	white-space: nowrap;
}

.sffilters-drop__toggle {
	font-weight: 600;
	list-style: none;
	user-select: none;
}

.sffilters-drop__toggle::-webkit-details-marker {
	display: none;
}

.sffilters-drop__toggle::after {
	border-bottom: 1.5px solid;
	border-right: 1.5px solid;
	box-sizing: border-box;
	content: "";
	height: 0.45em;
	margin-top: -0.2em;
	transform: rotate(45deg);
	transition: transform 0.12s;
	width: 0.45em;
}

.sffilters-drop[open] > .sffilters-drop__toggle::after {
	margin-top: 0.2em;
	transform: rotate(225deg);
}

.sffilters-drop__toggle:hover,
.sffilters-drop[open] > .sffilters-drop__toggle,
.sffilters-drop--active > .sffilters-drop__toggle,
.sffilters-panel--horizontal > .sffilters-filter--toggle .sffilters-option__control:is(:hover, :has(input:checked)) {
	border-color: var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
}

.sffilters-drop__toggle:focus-visible {
	outline: 2px solid var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
	outline-offset: 2px;
}

.sffilters-drop__count {
	align-items: center;
	background: var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
	border-radius: 999px;
	box-sizing: border-box;
	color: var(--sffilters-accent-text, #fff);
	display: inline-flex;
	font-size: 0.75em;
	height: 1.6em;
	justify-content: center;
	min-width: 1.6em;
	padding: 0 0.4em;
}

.sffilters-drop__body {
	background: var(--sffilters-surface, #fff);
	border: 1px solid rgba(128, 128, 128, 0.35);
	border-radius: var(--sffilters-radius, 4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	box-sizing: border-box;
	left: 0;
	margin-top: 6px;
	max-height: min(60vh, 420px);
	max-width: min(420px, calc(100vw - 32px));
	min-width: min(300px, calc(100vw - 32px));
	width: max-content;
	overflow: auto;
	padding: 12px 16px;
	position: absolute;
	top: 100%;
	z-index: 50;
}

.sffilters-drop--end > .sffilters-drop__body {
	left: auto;
	right: 0;
}

/* The button already names the filter, so its title stays for screen readers only. */

.sffilters-drop .sffilters-filter__title {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: 0;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.sffilters-panel--horizontal > .sffilters-filter--toggle {
	display: flex;
}

.sffilters-panel--horizontal > .sffilters-filter--toggle .sffilters-option__label {
	flex: none;
}

/* In the row the checkbox sits in the middle of its button, not on the first line of a label. */

.sffilters-panel--horizontal > .sffilters-filter--toggle .sffilters-option__control input[type="checkbox"] {
	align-self: center;
	margin-top: 0;
}

/* Above the products the chosen filters and "Clear all" are in the bar right under the row. */

.sffilters-panel--horizontal > .sffilters-clear {
	display: none;
}

.sffilters-drawer .sffilters-panel--horizontal > .sffilters-clear {
	display: inline;
}

.sffilters-drawer .sffilters-panel--horizontal {
	align-items: stretch;
	flex-flow: column nowrap;
	gap: 8px;
}

/* A store may part the filters of its panel with lines and space. In the drawer the rows do that. */

.sffilters-drawer .sffilters-panel--horizontal .sffilters-filter {
	border: 0;
	margin: 0;
	padding: 0;
}

.sffilters-drawer :is(.sffilters-drop__toggle, .sffilters-panel--horizontal > .sffilters-filter--toggle .sffilters-option__control) {
	display: flex;
	width: 100%;
}

/* The arrow and the count of a single checkbox go to the far end, the number of chosen values stays by the title. */

.sffilters-drawer .sffilters-drop__toggle::after,
.sffilters-drawer .sffilters-panel--horizontal > .sffilters-filter--toggle .sffilters-option__count {
	margin-left: auto;
}

.sffilters-drawer .sffilters-panel--horizontal > .sffilters-filter--toggle > .sffilters-option {
	flex: 1;
}

.sffilters-drawer .sffilters-drop__body {
	border: 0;
	box-shadow: none;
	margin: 0;
	max-height: none;
	max-width: none;
	min-width: 0;
	padding: 10px 2px 6px;
	position: static;
	width: auto;
}

/*
 * Inside the Breakdance shop element the builder styles every label, checkbox and radio button as the fields
 * of a checkout form: labels become blocks with a line height of one, checked boxes get its own tick. The panel
 * can sit there, for example the horizontal row added with the WooCommerce loop hook, so its controls are set
 * back to their own look.
 */

.breakdance-woocommerce label.sffilters-option__control {
	color: inherit;
	display: flex;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.breakdance-woocommerce .sffilters-option__control:not(.sffilters-swatch) input[type="checkbox"],
.breakdance-woocommerce .sffilters-option__control input[type="radio"] {
	background: #fff;
	border: 1.5px solid var(--sffilters-border, #767676);
	height: 1.25em;
	width: 1.25em;
}

.breakdance-woocommerce .sffilters-option__control:not(.sffilters-swatch) input[type="checkbox"] {
	border-radius: 0.25em;
}

.breakdance-woocommerce .sffilters-option__control input[type="radio"] {
	border-radius: 50%;
}

.breakdance-woocommerce .sffilters-option__control:not(.sffilters-swatch) input[type="checkbox"]:checked {
	background: var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
	border-color: var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
}

.breakdance-woocommerce .sffilters-option__control input[type="radio"]:checked {
	background: #fff;
	border-color: var(--sffilters-accent, var(--bde-brand-primary-color, #1a1a1a));
}

/*
 * Page links under the product list. WooCommerce, the Breakdance post loop and Bricks each print their own
 * markup and style it their own way, so the links are drawn here, the same in every store: a row of boxes,
 * the page being viewed filled in.
 *
 * The look still belongs to the site. The font is the one of the page, the colour is `--sffilters-page` when
 * the store sets it on `:root` or on `.sffilters-results`, then the accent of the panel, then the brand colour
 * of the page builder, then a dark grey, and the corners follow the buttons of the site. The rules are marked important, because
 * the builders write theirs per element, which no selector here could outweigh.
 */

.sffilters-results :is(.woocommerce-pagination, .bde-posts-pagination, .bricks-pagination):not(.sffilters-hidden) {
	--sffilters-page-color: var(--sffilters-page, var(--sffilters-accent, var(--bde-brand-primary-color, var(--bricks-color-primary, var(--wp--preset--color--primary, #1a1a1a)))));
	align-items: center !important;
	border: 0 !important;
	display: flex !important;
	flex-flow: row wrap !important;
	gap: 6px !important;
	justify-content: center !important;
	margin: 32px 0 0 !important;
	padding: 0 !important;
	width: 100%;
}

.sffilters-results :is(.woocommerce-pagination, .bde-posts-pagination, .bricks-pagination):not(.sffilters-hidden) ul {
	align-items: center !important;
	background: none !important;
	border: 0 !important;
	display: flex !important;
	flex-flow: row wrap !important;
	gap: 6px !important;
	height: auto !important;
	justify-content: center !important;
	list-style: none !important;
	margin: 0 !important;
	min-width: 0 !important;
	padding: 0 !important;
}

.sffilters-results :is(.woocommerce-pagination, .bde-posts-pagination, .bricks-pagination):not(.sffilters-hidden) li {
	background: none !important;
	border: 0 !important;
	display: block !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

.sffilters-results :is(.woocommerce-pagination, .bde-posts-pagination, .bricks-pagination):not(.sffilters-hidden) .bde-posts-prev-next-link {
	display: flex !important;
	margin: 0 !important;
}

.sffilters-results :is(.woocommerce-pagination, .bde-posts-pagination, .bricks-pagination):not(.sffilters-hidden) .bde-posts-prev-next-link:empty {
	display: none !important;
}

.sffilters-results :is(.woocommerce-pagination, .bde-posts-pagination, .bricks-pagination):not(.sffilters-hidden) :is(li > a, li > span, .bde-posts-prev-next-link > a) {
	align-items: center !important;
	background: transparent !important;
	border: 1px solid rgba(128, 128, 128, 0.35) !important;
	border-radius: var(--sffilters-radius, var(--bde-button-border-radius, var(--bricks-border-radius, 4px))) !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	color: inherit !important;
	display: inline-flex !important;
	font-family: inherit !important;
	font-size: inherit !important;
	font-weight: 600 !important;
	height: 40px !important;
	justify-content: center !important;
	line-height: 1 !important;
	margin: 0 !important;
	min-width: 40px !important;
	padding: 0 12px !important;
	text-decoration: none !important;
	transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}

.sffilters-results :is(.woocommerce-pagination, .bde-posts-pagination, .bricks-pagination):not(.sffilters-hidden) :is(li > a, .bde-posts-prev-next-link > a):is(:hover, :focus-visible) {
	border-color: var(--sffilters-page-color) !important;
	color: var(--sffilters-page-color) !important;
}

.sffilters-results :is(.woocommerce-pagination, .bde-posts-pagination, .bricks-pagination):not(.sffilters-hidden) :is(li > span.current, li > a.is-active) {
	background: var(--sffilters-page-color) !important;
	border-color: var(--sffilters-page-color) !important;
	color: var(--sffilters-page-text, var(--sffilters-accent-text, #fff)) !important;
}

.sffilters-results :is(.woocommerce-pagination, .bde-posts-pagination, .bricks-pagination):not(.sffilters-hidden) :is(li > span.dots, .bde-posts-navigation-numbers--ellipses > span) {
	border-color: transparent !important;
	min-width: 20px !important;
	padding: 0 !important;
}

.sffilters-results :is(.woocommerce-pagination, .bde-posts-pagination, .bricks-pagination):not(.sffilters-hidden) :is(li > a, .bde-posts-prev-next-link > a):focus-visible {
	outline: 2px solid var(--sffilters-page-color);
	outline-offset: 2px;
}

/*
 * The Breakdance shop element lays the result count, the sorting and the products out itself.
 * The wrapper around them takes that layout over, so they stay where the store put them.
 */

.breakdance-woocommerce > .sffilters-results {
	align-items: inherit;
	display: inherit;
	flex-flow: inherit;
	gap: inherit;
	justify-content: inherit;
	width: 100%;
}

.breakdance-woocommerce > .sffilters-results > :is(.sffilters-bar, .sffilters-more) {
	flex-basis: 100%;
	margin-bottom: 0;
	margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
	.sffilters-results,
	.sffilters-branch__toggle::before,
	.sffilters-swatch__chip,
	.sffilters-drop__toggle::after,
	.sffilters-results :is(.woocommerce-pagination, .bde-posts-pagination, .bricks-pagination):not(.sffilters-hidden) :is(li > a, li > span, .bde-posts-prev-next-link > a),
	.sffilters-option__control input[type="radio"],
	.sffilters-option__control input[type="radio"]::before,
	.sffilters-option__control input[type="checkbox"],
	.sffilters-option__control input[type="checkbox"]::before {
		transition: none;
	}
}
