/* Smart Shop Filters, styled to sit with the Salient theme. */
.ssf {
	--ssf-accent: var(--nectar-accent-color, #303192);
	--ssf-border: #e4e6ec;
	--ssf-muted: #6b7180;
	--ssf-text: #1d2130;
	--ssf-bg: #fff;
	color: var(--ssf-text);
	font-size: 14px;
	line-height: 1.4;
	margin-bottom: 30px;
}
.ssf *, .ssf *::before, .ssf *::after { box-sizing: border-box; }

.ssf-open, .ssf-close, .ssf-backdrop { display: none; }

.ssf-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--ssf-text);
}
.ssf-title { font-weight: 700; font-size: 16px; flex: 1; }
.ssf-clear { font-size: 13px; color: var(--ssf-accent); text-decoration: underline; }

/* Groups */
.ssf-group { border-bottom: 1px solid var(--ssf-border); }
.ssf-group > summary {
	list-style: none;
	cursor: pointer;
	padding: 14px 24px 14px 0;
	font-weight: 600;
	font-size: 14px;
	position: relative;
	user-select: none;
}
.ssf-group > summary::-webkit-details-marker { display: none; }
.ssf-group > summary::after {
	content: "";
	position: absolute;
	right: 4px;
	top: 50%;
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-70%) rotate(45deg);
	transition: transform .15s ease;
}
.ssf-group[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.ssf-group > summary:focus-visible { outline: 2px solid var(--ssf-accent); outline-offset: 2px; }
.ssf-label-unit { font-weight: 400; color: var(--ssf-muted); }
.ssf-badge {
	display: inline-block;
	min-width: 20px;
	padding: 1px 6px;
	margin-left: 6px;
	border-radius: 10px;
	background: var(--ssf-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-align: center;
	vertical-align: 1px;
}
.ssf-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: var(--ssf-accent); }
.ssf-body { padding: 0 0 16px; }

/* Checkbox options */
.ssf .ssf-options { list-style: none; margin: 0; padding: 0; }
.ssf .ssf-options li { margin: 0; padding: 0; list-style: none; }
.ssf .ssf-options li::before { display: none; }
.ssf-options label, .ssf-links a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
	cursor: pointer;
	color: var(--ssf-text);
	font-weight: 400;
	margin: 0;
}
.ssf-options input[type=checkbox] {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1.5px solid #9aa0ad;
	border-radius: 3px;
	background: #fff;
	display: grid;
	place-content: center;
	cursor: pointer;
}
.ssf-options input[type=checkbox]::before {
	content: "";
	width: 10px;
	height: 6px;
	border-left: 2px solid #fff;
	border-bottom: 2px solid #fff;
	transform: rotate(-45deg) translate(1px, -1px);
	opacity: 0;
}
.ssf-options input[type=checkbox]:checked { background: var(--ssf-accent); border-color: var(--ssf-accent); }
.ssf-options input[type=checkbox]:checked::before { opacity: 1; }
.ssf-options input[type=checkbox]:focus-visible { outline: 2px solid var(--ssf-accent); outline-offset: 2px; }
.ssf-options input[type=checkbox]:disabled, .ssf-options input[type=checkbox]:disabled ~ span { opacity: .45; cursor: default; }
.ssf-name { flex: 1; }
.ssf-count { color: var(--ssf-muted); font-size: 12px; }
.ssf-links a:hover .ssf-name { color: var(--ssf-accent); text-decoration: underline; }
.ssf-options .ssf-extra { display: none; }
.ssf-options.ssf-show-all .ssf-extra { display: block; }
.ssf-more {
	background: none !important;
	border: 0;
	padding: 6px 0 0 !important;
	color: var(--ssf-accent) !important;
	font-size: 13px !important;
	text-decoration: underline;
	cursor: pointer;
	box-shadow: none !important;
}

/* Range */
.ssf-slider { position: relative; height: 28px; margin: 4px 9px 8px; }
.ssf-track { position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 2px; background: var(--ssf-border); }
.ssf-fill { position: absolute; top: 0; height: 100%; background: var(--ssf-accent); border-radius: 2px; }
.ssf-slider input[type=range] {
	position: absolute;
	left: -9px;
	width: calc(100% + 18px);
	top: 0;
	height: 28px;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}
.ssf-slider input[type=range]::-webkit-slider-runnable-track { background: none; border: 0; }
.ssf-slider input[type=range]::-moz-range-track { background: none; border: 0; }
.ssf-slider input[type=range]::-webkit-slider-thumb {
	-webkit-appearance: none;
	pointer-events: auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--ssf-accent);
	box-shadow: 0 1px 3px rgba(0,0,0,.2);
	cursor: grab;
}
.ssf-slider input[type=range]::-moz-range-thumb {
	pointer-events: auto;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid var(--ssf-accent);
	box-shadow: 0 1px 3px rgba(0,0,0,.2);
	cursor: grab;
}
.ssf-inputs { display: flex; align-items: center; gap: 8px; }
.ssf-inputs label {
	flex: 1;
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 0 8px;
	border: 1px solid #c9cdd6;
	border-radius: 4px;
	background: #fff;
	font-weight: 400;
}
.ssf-inputs label:focus-within { border-color: var(--ssf-accent); box-shadow: 0 0 0 1px var(--ssf-accent); }
.ssf .ssf-inputs input[type=number] {
	width: 100%;
	min-width: 0;
	border: 0 !important;
	padding: 8px 0 !important;
	margin: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	font-size: 14px !important;
	line-height: 1.2 !important;
	color: var(--ssf-text);
	-moz-appearance: textfield;
}
.ssf .ssf-inputs input[type=number]::-webkit-inner-spin-button,
.ssf .ssf-inputs input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ssf .ssf-inputs input[type=number]:focus { outline: none; }
.ssf-unit { color: var(--ssf-muted); font-size: 13px; }
.ssf-dash { color: var(--ssf-muted); }
.ssf-help { margin: 8px 0 0 !important; padding: 0 !important; font-size: 12px; color: var(--ssf-muted); }

/* Footer: auto-apply on desktop, so the button is only needed without JS and in the drawer. */
.ssf-foot { padding-top: 14px; }
.ssf-apply {
	width: 100%;
	padding: 12px 16px !important;
	border: 0;
	border-radius: 4px !important;
	background: var(--ssf-accent) !important;
	color: #fff !important;
	font-weight: 700;
	font-size: 14px !important;
	cursor: pointer;
}
.ssf-js .ssf-foot { display: none; }
.ssf-busy .ssf-form { opacity: .7; }

/* Results */
.post-area.ssf-loading { position: relative; }
.post-area.ssf-loading > * { opacity: .45; transition: opacity .15s ease; pointer-events: none; }
.post-area.ssf-loading::before {
	content: "";
	position: absolute;
	z-index: 5;
	left: 50%;
	top: 120px;
	width: 34px;
	height: 34px;
	margin-left: -17px;
	border: 3px solid #d6d8e3;
	border-top-color: var(--nectar-accent-color, #303192);
	border-radius: 50%;
	animation: ssf-spin .7s linear infinite;
}
@keyframes ssf-spin { to { transform: rotate(360deg); } }

.ssf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; width: 100%; clear: both; }
.ssf-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 16px;
	background: #eef0f8;
	color: #1d2130 !important;
	font-size: 13px;
	line-height: 1.3;
	text-decoration: none !important;
	border: 1px solid transparent;
}
.ssf-chip:hover { border-color: var(--nectar-accent-color, #303192); }
.ssf-chip span { font-size: 16px; line-height: 1; }
.ssf-chip-clear { background: none; text-decoration: underline !important; color: var(--nectar-accent-color, #303192) !important; }
.ssf-empty { font-size: 15px; margin: 10px 0 30px; }

/* Mobile and tablet: slide-out drawer */
@media (max-width: 999px) {
	.ssf-open {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		width: 100%;
		justify-content: center;
		padding: 12px 16px !important;
		border: 1px solid var(--ssf-text) !important;
		border-radius: 4px !important;
		background: #fff !important;
		color: var(--ssf-text) !important;
		font-weight: 700;
		font-size: 15px !important;
		cursor: pointer;
	}
	.ssf-open .ssf-badge { margin-left: 0; }
	.ssf-form {
		position: fixed;
		z-index: 100000;
		top: 0;
		bottom: 0;
		left: 0;
		width: min(88vw, 380px);
		background: var(--ssf-bg);
		display: flex;
		flex-direction: column;
		transform: translateX(-105%);
		transition: transform .25s ease;
		box-shadow: 4px 0 24px rgba(0,0,0,.2);
		visibility: hidden;
	}
	.ssf.is-open .ssf-form { transform: none; visibility: visible; }
	.ssf-head { padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 12px; }
	.ssf-close {
		display: block;
		background: none !important;
		border: 0;
		font-size: 30px !important;
		line-height: 1;
		padding: 0 4px !important;
		color: var(--ssf-text) !important;
		cursor: pointer;
	}
	.ssf-groups { flex: 1; overflow-y: auto; padding: 0 16px; -webkit-overflow-scrolling: touch; }
	.ssf-foot, .ssf-js .ssf-foot { display: block; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--ssf-border); }
	.ssf-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 99999; background: rgba(10, 12, 25, .45); }
	html.ssf-drawer-open, html.ssf-drawer-open body { overflow: hidden; }
}
