/**
 * Shop filter sidebar: the card, collapsible sections, chip rows, the persons
 * stepper, the price slider, and the mobile off-canvas filter drawer.
 *
 * Built after the XD filter design: a white card with Peace Sans section
 * headings, a square +/− toggle per section, filter options as light chips
 * (icon, name, count), and the price section always open with its min/max
 * boxes above the slider.
 *
 * The `.bb-filter` classes and the toggle buttons are added server-side by
 * bb_shop_filters_widget_params() (includes/shop-filters.php), on shop
 * archives only. The icon tiles come from the plugin
 * (bb-woocommerce-addons/assets/css/attribute-icons.css, class
 * `.bb-attr-icon--filter`); this file only reshapes them for the rows.
 *
 * Several selectors carry `.widget` (or `#wrapper`) purely for specificity:
 * flatsome.css / flatsome-shop.css style widget lists and the price slider
 * with 3–4 part selectors, and the global SCSS sets widget titles uppercase.
 *
 * Loaded on shop archives only, by bb_enqueue_shop_filters() in
 * includes/shop-filters.php.
 */

/* --------------------------------------------------------------------------
 * Tokens
 * ----------------------------------------------------------------------- */

/* Brand values from styling-scss/_global_variables.scss. Declared on the
   sidebar itself, so the drawer copy (moved outside #wrapper) keeps them, and
   on the mobile filter button row. */
#shop-sidebar,
.category-filter-row {
	--bb-filter-petrol: #244757;
	--bb-filter-petrol-dark: #1a3540;
	--bb-filter-petrol-light: #ccdae1;
	--bb-filter-red: var(--fs-color-primary, #b01e22);
	--bb-filter-blush: #f4d5cd;
	--bb-filter-sand: #e8e2da;
	--bb-filter-sand-dark: #ddd4c9;
	--bb-filter-chip: #f9f6f4;
	--bb-filter-line: #ebe5de;
	--bb-filter-muted: #5f7883;
	--bb-filter-heading: "Peace Sans", sans-serif;
}

/* --------------------------------------------------------------------------
 * Card
 * ----------------------------------------------------------------------- */

/* The sidebar in the page only (the drawer copy sits outside #wrapper and
   gets the drawer's own padding and background instead). */
#wrapper #shop-sidebar {
	padding: 22px 20px 14px;
	border-radius: 16px;
	background-color: #fff;
	box-shadow: 0 3px 6px rgba(36, 71, 87, 0.08);
}

/* --------------------------------------------------------------------------
 * Sections
 * ----------------------------------------------------------------------- */

.bb-filter.widget {
	margin: 0;
	padding: 6px 0;
}

.bb-filter.widget:first-child {
	padding-top: 0;
}

.bb-filter.widget .widget-title {
	display: block;
	margin: 0;
	color: var(--bb-filter-petrol);
	font-family: var(--bb-filter-heading);
	font-size: 17px;
	font-weight: 400;
	letter-spacing: 0.01em;
	line-height: 1.2;
	text-transform: none;
}

/* Static sections (price) have no toggle button, so the title needs the
   spacing the button would otherwise carry. */
.bb-filter--static.widget .widget-title {
	padding: 5px 0;
}

.bb-filter.widget .is-divider {
	display: none;
}

/* Toggle: reset Flatsome's global button look (uppercase, min-height,
   padding, margin-right) down to a plain full-width row. */
.bb-filter__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	min-height: 0;
	margin: 0;
	padding: 5px 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-align: left;
	text-transform: inherit;
	cursor: pointer;
}

.bb-filter__toggle:focus-visible {
	border-radius: 4px;
	outline: 2px solid var(--bb-filter-petrol);
	outline-offset: 3px;
}

/* The +/− square. Both bars are pseudo-elements; opening rotates the vertical
   bar flat, so the plus folds into a minus. */
.bb-filter__icon {
	position: relative;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border-radius: 4px;
	background-color: var(--bb-filter-petrol-light);
	transition: background-color 0.2s ease;
}

.bb-filter__icon::before,
.bb-filter__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 8px;
	height: 2px;
	margin: -1px 0 0 -4px;
	border-radius: 1px;
	background-color: var(--bb-filter-petrol);
	transition: transform 0.2s ease, background-color 0.2s ease;
}

.bb-filter__icon::after {
	transform: rotate(90deg);
}

.bb-filter__toggle:hover .bb-filter__icon {
	background-color: #b8cbd4;
}

.bb-filter.is-open .bb-filter__icon {
	background-color: var(--bb-filter-petrol);
}

.bb-filter.is-open .bb-filter__icon::before,
.bb-filter.is-open .bb-filter__icon::after {
	background-color: #fff;
}

.bb-filter.is-open .bb-filter__icon::after {
	transform: rotate(0deg);
}

/* Collapsed: hide everything after the title. Only what FOLLOWS a title, so a
   widget without one can never end up hidden with no way to open it.
   !important because this is a state that must beat every layout rule on the
   section's content — the chip list below sets `display: flex` at the same
   specificity, and scripts (WooCommerce's price slider) set inline display. */
.bb-filter.is-collapsed > .widget-title ~ * {
	display: none !important;
}

/* Only on a toggle (the script adds the class briefly), not on every open
   section that arrives with an AJAX reload. */
.bb-filter.is-revealing > .widget-title ~ * {
	animation: bb-filter-reveal 0.22s ease both;
}

@keyframes bb-filter-reveal {
	from {
		opacity: 0;
		transform: translateY(-4px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

/* --------------------------------------------------------------------------
 * Chip rows (attribute filters)
 * ----------------------------------------------------------------------- */

.bb-filter.widget .woocommerce-widget-layered-nav-list {
	display: flex;
	flex-direction: column;
	gap: 5px;
	margin: 8px 0 6px;
	padding: 0;
}

/*
 * The whole `<li>` is the click target (Flatsome's PJAX binds on it), so the
 * row itself is the chip: icon and name in the link, count at the far end.
 */
.bb-filter.widget .woocommerce-widget-layered-nav-list > .wc-layered-nav-term {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 34px;
	margin: 0;
	padding: 0 10px;
	border: 1px solid var(--bb-filter-line);
	border-radius: 6px;
	background-color: var(--bb-filter-chip);
	color: var(--bb-filter-petrol);
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bb-filter.widget .wc-layered-nav-term > a,
.bb-filter.widget .wc-layered-nav-term > span:first-child {
	display: flex;
	align-items: center;
	flex: 1;
	gap: 8px;
	min-width: 0;
	padding: 6px 0;
	color: inherit;
}

/* No checkbox or "x" marker: the chip's own fill shows the selection.
   (Flatsome draws both on `a::before` from flatsome-shop.css.) */
.bb-filter.widget .wc-layered-nav-term > a::before {
	content: none;
	display: none;
}

.bb-filter.widget .wc-layered-nav-term .count {
	flex: 0 0 auto;
	margin-left: auto;
	color: inherit;
	font-size: 13px;
	line-height: inherit;
	opacity: 0.75;
}

.bb-filter.widget .wc-layered-nav-term:hover {
	border-color: var(--bb-filter-petrol-light);
	background-color: #fff;
}

/* Selected. */
.bb-filter.widget .woocommerce-widget-layered-nav-list > .wc-layered-nav-term.chosen {
	border-color: var(--bb-filter-petrol);
	background-color: var(--bb-filter-petrol);
	color: #fff;
}

.bb-filter.widget .woocommerce-widget-layered-nav-list > .wc-layered-nav-term.chosen:hover {
	border-color: var(--bb-filter-petrol-dark);
	background-color: var(--bb-filter-petrol-dark);
}

.bb-filter.widget .wc-layered-nav-term.chosen .count {
	opacity: 0.85;
}

/* A term with no products left in the current selection is rendered as a
   <span> instead of a link. */
.bb-filter.widget .wc-layered-nav-term > span:first-child {
	cursor: default;
	opacity: 0.45;
}

/* Icons as a plain glyph in the row rather than a coloured tile. */
.bb-filter .wc-layered-nav-term .bb-attr-icon--filter,
.bb-filter .wc-layered-nav-term .bb-attr-icon--filter.has-bg {
	width: 18px;
	height: 18px;
	border-radius: 0;
	background-color: transparent;
}

.bb-filter .wc-layered-nav-term .bb-attr-icon--filter img {
	width: 100%;
	height: 100%;
	border-radius: 0;
}

.bb-filter .wc-layered-nav-term.chosen .bb-attr-icon--filter img {
	filter: brightness(0) invert(1);
}

/* --------------------------------------------------------------------------
 * Persons stepper
 * ----------------------------------------------------------------------- */

.bb-persons-filter {
	margin: 8px 0 6px;
}

.bb-persons-filter .bb-persons-filter__label {
	display: block;
	margin: 0 0 8px;
	color: var(--bb-filter-muted);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.3;
}

.bb-persons-filter__stepper {
	display: flex;
	align-items: stretch;
	gap: 6px;
}

/* !important on the radius: Flatsome's `button_radius` option prints
   `button:not(.icon){border-radius:…!important}`. */
.bb-persons-filter .bb-persons-filter__step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 38px;
	width: 38px;
	height: 38px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 6px !important;
	background-color: var(--bb-filter-petrol-light);
	color: var(--bb-filter-petrol);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1;
	text-transform: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.bb-persons-filter .bb-persons-filter__step:hover {
	background-color: var(--bb-filter-petrol);
	color: #fff;
}

.bb-persons-filter .bb-persons-filter__step:focus-visible {
	outline: 2px solid var(--bb-filter-petrol);
	outline-offset: 2px;
}

/* 16px text: anything smaller makes iOS zoom in on focus. */
.bb-persons-filter .bb-persons-filter__input {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	height: 38px;
	margin: 0;
	padding: 0 10px;
	border: 1px solid var(--bb-filter-line);
	border-radius: 6px;
	background-color: #fff;
	box-shadow: none;
	color: var(--bb-filter-petrol);
	font-size: 16px;
	text-align: center;
	-moz-appearance: textfield;
	appearance: textfield;
}

.bb-persons-filter .bb-persons-filter__input::-webkit-outer-spin-button,
.bb-persons-filter .bb-persons-filter__input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

.bb-persons-filter .bb-persons-filter__input:focus {
	border-color: var(--bb-filter-petrol);
	box-shadow: 0 0 0 1px var(--bb-filter-petrol);
	outline: 0;
}

.bb-persons-filter__clear {
	display: inline-block;
	margin-top: 8px;
	color: var(--bb-filter-red);
	font-size: 13px;
	text-decoration: underline;
	text-underline-offset: 2px;
}

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

/* Boxes on top, slider underneath. */
.bb-filter.widget_price_filter .price_slider_wrapper {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 8px 0 10px;
}

.bb-filter.widget_price_filter .price_slider_amount {
	order: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	line-height: 1.2;
	text-align: left;
}

/* The inputs double as the min/max boxes. WooCommerce hides them with an
   inline style once the slider is up, hence the !important. */
.bb-filter.widget.widget_price_filter .price_slider_amount input#min_price,
.bb-filter.widget.widget_price_filter .price_slider_amount input#max_price {
	display: block !important;
	width: 76px;
	height: 32px;
	margin: 0;
	padding: 0 10px;
	border: 1px solid var(--bb-filter-line);
	border-radius: 6px;
	background-color: #fff;
	box-shadow: none;
	color: var(--bb-filter-petrol);
	font-size: 14px;
}

.bb-filter.widget.widget_price_filter .price_slider_amount input:focus {
	border-color: var(--bb-filter-petrol);
	box-shadow: 0 0 0 1px var(--bb-filter-petrol);
	outline: 0;
}

/* Typed prices apply on their own (bb-shop-filters.js), and the boxes already
   show the range, so the Filter button and the text label go. `.clear` is an
   empty float-clearer that would otherwise take a slot in the flex row. */
.ux-shop-ajax-filters .bb-filter.widget_price_filter .price_slider_amount .button,
.bb-filter.widget_price_filter .price_slider_amount .price_label,
.bb-filter.widget_price_filter .price_slider_amount .clear {
	display: none !important;
}

.bb-filter.widget.widget_price_filter .price_slider {
	order: 2;
	/* Room for the handles, which centre on the track ends. */
	margin: 0 8px 4px;
	background-color: var(--bb-filter-blush);
}

.bb-filter.widget.widget_price_filter .ui-slider-horizontal {
	height: 4px;
	border-radius: 99px;
}

.bb-filter.widget.widget_price_filter .ui-slider .ui-slider-range {
	background-color: var(--bb-filter-red);
	opacity: 0.35;
}

.bb-filter.widget.widget_price_filter .ui-slider .ui-slider-handle,
.bb-filter.widget.widget_price_filter .ui-slider .ui-slider-handle:last-child {
	top: -7px;
	width: 18px;
	height: 18px;
	margin-left: -9px;
	border: 2px solid #fff;
	background-color: var(--bb-filter-red);
	box-shadow: 0 1px 4px rgba(36, 71, 87, 0.35);
}

.bb-filter.widget.widget_price_filter .ui-slider .ui-slider-handle:focus-visible {
	outline: 2px solid var(--bb-filter-petrol);
	outline-offset: 2px;
}

/* --------------------------------------------------------------------------
 * Mobile filter button, pinned to the bottom
 * ----------------------------------------------------------------------- */

/*
 * Flatsome prints this row inside the category title, and for the sidebar
 * layouts only up to 849px (`show-for-medium`). The link's contents come from
 * the child's template override (woocommerce/loop/filter-button.php): a label
 * box and a separate funnel square with an active-filter badge, after the XD
 * design. Here the row floats at the bottom of the screen, so the filters are
 * one tap away anywhere in a long grid.
 *
 * `fixed`, not `sticky`: a sticky element only sticks within its parent — the
 * title bar — which scrolls away with the page.
 *
 * The row spans the full width so the button can centre without shrink-to-fit
 * wrapping its label, but lets taps through; only the button catches them. The
 * active-filter chips Flatsome prints beside the button are hidden — they
 * would grow the bar with every filter — and the badge carries the count
 * instead.
 */
.bb-filter-fab__label,
.bb-filter-fab__icon {
	display: inline-flex;
	align-items: center;
	height: 46px;
	border-radius: 12px;
	background-color: var(--bb-filter-sand);
	box-shadow: 0 4px 14px rgba(36, 71, 87, 0.18);
	color: var(--bb-filter-petrol);
	transition: background-color 0.2s ease;
}

.bb-filter-fab__label {
	min-width: 0;
	padding: 0 20px;
	overflow: hidden;
	font-family: var(--bb-filter-heading);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0.04em;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.bb-filter-fab__icon {
	position: relative;
	flex: 0 0 46px;
	justify-content: center;
	width: 46px;
}

.bb-filter-fab__funnel {
	display: block;
	width: 20px;
	height: 20px;
}

/* Number of active filters. */
.bb-filter-fab__count {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border: 2px solid #fff;
	border-radius: 99px;
	background-color: var(--bb-filter-red);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
}

.filter-button:hover .bb-filter-fab__label,
.filter-button:hover .bb-filter-fab__icon,
.filter-button:focus-visible .bb-filter-fab__label,
.filter-button:focus-visible .bb-filter-fab__icon {
	background-color: var(--bb-filter-sand-dark);
}

@media (max-width: 849px) {
	.category-filter-row.show-for-medium {
		position: fixed;
		right: 0;
		bottom: calc(16px + env(safe-area-inset-bottom, 0px));
		left: 0;
		z-index: 40;
		display: flex;
		justify-content: center;
		margin: 0;
		padding: 0;
		pointer-events: none;
		transition: opacity 0.2s ease, visibility 0.2s ease;
	}

	.category-filter-row.show-for-medium > .inline-block {
		display: none;
	}

	/* The link is only the tap area around the two boxes. Capped to the screen
	   width, where the label shortens with an ellipsis rather than wrapping. */
	.category-filter-row.show-for-medium .filter-button {
		display: inline-flex;
		align-items: center;
		gap: 10px;
		max-width: calc(100% - 32px);
		margin: 0;
		padding: 0;
		line-height: 1;
		pointer-events: auto;
	}

	.category-filter-row.show-for-medium .filter-button:focus-visible {
		border-radius: 12px;
		outline: 2px solid var(--bb-filter-petrol);
		outline-offset: 3px;
	}

	/* Out of the way while the drawer it opens is showing. Flatsome sets
	   `has-off-canvas` on <html> while an off-canvas panel is open. */
	.has-off-canvas .category-filter-row.show-for-medium {
		visibility: hidden;
		opacity: 0;
	}

	/* Room under the grid, so the pill never covers the last row of products
	   or the pagination. */
	.shop-container {
		padding-bottom: 72px;
	}
}

/* --------------------------------------------------------------------------
 * Off-canvas drawer (mobile)
 * ----------------------------------------------------------------------- */

/*
 * Drawer gutters, owned here instead of by Flatsome.
 *
 * Flatsome pads every off-canvas sidebar with `.off-canvas .sidebar-inner
 * { padding: 30px 20px }`. That padding sits around the sticky results bar
 * too: the bar floats 20px in from both drawer edges, with 30px of bare
 * padding under it once the list is scrolled to the end. So the bottom padding
 * goes, and the side gutter becomes a variable the bar can bleed out by —
 * the same negative-margin idiom Flatsome uses for its own mini-cart footer
 * (`.off-canvas-cart .ux-mini-cart-footer`).
 *
 * Two selectors because the layouts differ in which node is `.sidebar-inner`:
 * the right-sidebar layout moves `#shop-sidebar.sidebar-inner` itself into the
 * drawer, the off-canvas layout moves `#shop-sidebar` with the inner inside.
 */
.mfp-content #shop-sidebar {
	--bb-drawer-gutter: 20px;
}

.off-canvas #shop-sidebar.sidebar-inner,
.off-canvas #shop-sidebar > .sidebar-inner {
	padding: 30px var(--bb-drawer-gutter) 0;
}

/* Flatsome's drawer is 95% opaque, which lets the page's text show through
   behind the filters and beside the results bar. */
.off-canvas .mfp-content:has(#shop-sidebar) {
	background-color: #fff;
}

/*
 * The "show results" button is printed inside #shop-sidebar (so Magnific Popup
 * carries it into the drawer) but is only meaningful there: next to the desktop
 * sidebar the results are already on screen.
 */
#shop-sidebar .bb-filter-apply {
	display: none;
}

.mfp-content #shop-sidebar .bb-filter-apply {
	display: block;
	/* `.off-canvas-left .mfp-content` is the scroll container, so the bar sticks
	   to the bottom of the drawer while the filters scroll behind it. */
	position: sticky;
	bottom: 0;
	z-index: 3;
	/* Edge to edge across the drawer, the button itself back on the gutter. */
	margin: 16px calc(var(--bb-drawer-gutter, 20px) * -1) 0;
	padding: 12px var(--bb-drawer-gutter, 20px) calc(14px + env(safe-area-inset-bottom, 0px));
	background-color: #fff;
	box-shadow: 0 -10px 18px -6px rgba(0, 0, 0, 0.12);
}

.bb-filter-apply__button {
	width: 100%;
	margin: 0;
}

/* --------------------------------------------------------------------------
 * Loading state
 * ----------------------------------------------------------------------- */

/*
 * The product grid gets Flatsome's own spotlight loader, which sits behind the
 * open drawer — so the drawer needs its own feedback: the filters dim and stop
 * responding until the new counts arrive, while the results button keeps its
 * label and shows a spinner.
 */
html.bb-filters-loading .mfp-content #shop-sidebar .widget {
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

html.bb-filters-loading .bb-filter-apply__button {
	opacity: 0.75;
}

html.bb-filters-loading .bb-filter-apply__button::after {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 8px;
	vertical-align: -2px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: bb-filter-spin 0.7s linear infinite;
}

@keyframes bb-filter-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	html.bb-filters-loading .bb-filter-apply__button::after {
		animation-duration: 2s;
	}

	.bb-filter.is-revealing > .widget-title ~ * {
		animation: none;
	}

	.bb-filter__icon,
	.bb-filter__icon::before,
	.bb-filter__icon::after,
	.bb-filter.widget .woocommerce-widget-layered-nav-list > .wc-layered-nav-term,
	.bb-persons-filter .bb-persons-filter__step,
	.category-filter-row.show-for-medium,
	.bb-filter-fab__label,
	.bb-filter-fab__icon {
		transition: none;
	}
}

/* --------------------------------------------------------------------------
 * Sort dropdown
 * ----------------------------------------------------------------------- */

/* WooCommerce's orderby select, in the look of the filter button: sand box,
   petrol Peace Sans label. Flatsome's chevron (a background image) stays;
   only the colour, shape and type change. Tokens are not available here (the
   form sits outside #shop-sidebar), so the brand values are written out. */
.woocommerce-ordering select.orderby {
	height: 46px;
	margin: 0;
	padding: 0 40px 0 18px;
	border: 0;
	border-radius: 12px;
	background-color: #e8e2da;
	box-shadow: 0 4px 14px rgba(36, 71, 87, 0.12);
	color: #244757;
	font-family: "Peace Sans", sans-serif;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.woocommerce-ordering select.orderby:hover {
	background-color: #ddd4c9;
}

.woocommerce-ordering select.orderby:focus-visible {
	outline: 2px solid #244757;
	outline-offset: 3px;
}

/* --------------------------------------------------------------------------
 * Active-filter pills above the grid
 * ----------------------------------------------------------------------- */

/* The row is always there (bb_active_filters_render()), with the height of one
   row of pills, so the grid does not move when the first filter is chosen.
   More pills than fit wrap onto a second row. Brand values written out: the
   bar sits outside #shop-sidebar, where the tokens are declared. */
.bb-active-filters {
	min-height: 36px;
	margin: 0 0 20px;
}

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

.bb-active-filters__item {
	margin: 0;
	list-style: none;
}

/* A selected chip from the sidebar, as a pill, with a remove cross. */
.bb-active-filters__pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 36px;
	padding: 0 12px 0 16px;
	border-radius: 99px;
	background-color: #244757;
	color: #fff;
	font-size: 14px;
	line-height: 1;
	white-space: nowrap;
	transition: background-color 0.15s ease;
}

.bb-active-filters__pill:hover,
.bb-active-filters__pill:focus-visible {
	background-color: #1a3540;
	color: #fff;
}

.bb-active-filters__pill:focus-visible,
.bb-active-filters__clear:focus-visible {
	outline: 2px solid #244757;
	outline-offset: 2px;
}

.bb-active-filters__x {
	position: relative;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.18);
}

.bb-active-filters__x::before,
.bb-active-filters__x::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 9px;
	height: 1.5px;
	border-radius: 1px;
	background-color: currentColor;
	transform: translate(-50%, -50%) rotate(45deg);
}

.bb-active-filters__x::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.bb-active-filters__clear {
	display: inline-flex;
	align-items: center;
	height: 36px;
	padding: 0 6px;
	color: #244757;
	font-size: 14px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bb-active-filters__clear:hover {
	color: #b01e22;
}
