/* Shop filter / sort / result bar (issue #187). Loaded last. Functional and accessibility fixes only: the old
   div/span controls are real buttons now, reset here so nothing visibly shifts. Colours are the existing theme's. */
:root {
	--sf-ink: #1a1a1a;
	--sf-light: #fefefe;
	--sf-muted: rgba(90, 90, 90, 0.75);
}

/* buttons that replaced div/span: look like the old element. Low specificity on purpose, so the theme's own
   .sfcDisp .sfcItem / .sfcTabCnt rules (font-size, weight, colour, padding) still win where they set a value. */
button.sfcItem,
.sfcTabCnt ul li button.sfOpt {
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	font: inherit;
	color: inherit;
	text-align: inherit;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}
.sfcTabCnt ul li button.sfOpt {
	padding: 0;
	margin: 0;
	display: block;
}
button.sfcItem {
	padding-left: 0;
	padding-right: 0;
}
.sfcDisp button.sfcItem:first-child {
	margin-left: 0;
}
.sfcTabDisp .sfcTabCnt ul li.active button.sfOpt {
	color: var(--sf-ink);
}

/* the two price range labels are read by screen readers; the slider keeps its look */
.sfOnlyLabel {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* visible keyboard focus */
.sfcDisp button.sfcItem:focus-visible,
.sfOpt:focus-visible,
.sfcBtmBtns button:focus-visible,
.priceRangeSlider input[type=range]:focus-visible {
	outline: 2px solid var(--sf-ink);
	outline-offset: 2px;
}
.sfResultBar button:focus-visible,
.sfEmpty button:focus-visible,
.sfMore button:focus-visible,
.sfResultCount:focus-visible {
	outline: 2px solid var(--sf-light);
	outline-offset: 2px;
}

/* the "Show N results" button is the primary action of the panel */
.sfcBtmBtns li button.sfApply {
	font-weight: 700;
}

/* result count, chips, clear all: above the grid, on the grid's dark band */
.sfResultBar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	padding: 0 6px 12px 6px;
	color: var(--sf-light);
	scroll-margin-top: 110px;
}
.sfResultBar[hidden], .sfEmpty[hidden], .sfMore[hidden], .sfResultBar [hidden], .sfEmpty [hidden] {
	display: none;
}
.sfResultCount {
	margin: 0 12px 0 0;
	font-size: .88em;
	font-weight: 600;
	letter-spacing: 0.033em;
}
.sfChips {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}
.sfChips li {
	margin: 4px 8px 4px 0;
}
.sfChip,
.sfClearAll,
.sfMore button {
	font: inherit;
	font-size: .77em;
	font-weight: 600;
	letter-spacing: 0.05em;
	color: var(--sf-light);
	background: rgba(26, 26, 26, 0.5);
	border: 1px solid rgba(254, 254, 254, 0.6);
	border-radius: 4px;
	padding: 8px 12px;
	min-height: 36px;
	cursor: pointer;
}
.sfChip:hover,
.sfClearAll:hover,
.sfMore button:hover {
	background: var(--sf-ink);
}
.sfChipX {
	margin-left: 8px;
}
.sfClearAll {
	background: none;
	text-transform: uppercase;
	margin: 4px 0;
}

.sfEmpty {
	text-align: center;
	color: var(--sf-light);
	padding: 30px 15px;
}
.sfEmpty p {
	font-size: .88em;
	font-weight: 600;
	margin-bottom: 12px;
}

.sfMore {
	text-align: center;
	padding: 20px 0 0;
}
.sfMore button {
	text-transform: uppercase;
	padding-left: 24px;
	padding-right: 24px;
}

.pingrid.sfLoading {
	opacity: .5;
	transition: opacity .15s ease;
}

@media (prefers-reduced-motion: reduce) {
	.pingrid.sfLoading { transition: none; }
}

/* Show more while a request is pending: still focusable, but visibly off and ignored by the script */
.sfMore button[aria-disabled="true"] {
	opacity: .5;
	cursor: not-allowed;
}
