/* Puls Shop Filters - bar and panel. Own classes only (puls-sf-), no theme dependencies. */

.puls-sf-bar {
	display: flex;
	align-items: center;
	gap: 8px;
}

.puls-sf-track {
	display: flex;
	flex: 1 1 auto;
	gap: 8px;
	min-width: 0;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
}

.puls-sf-track::-webkit-scrollbar {
	display: none;
}

.puls-sf-item[hidden] {
	display: none;
}

.puls-sf-track > .puls-sf-item {
	flex: 0 0 auto;
	scroll-snap-align: start;
}

.puls-sf-pill {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	height: 40px;
	padding: 0 16px;
	border: 0;
	border-radius: 20px;
	background: #e9e9e9;
	color: #222;
	font: inherit;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
}

.puls-sf-pill::after,
.puls-sf-panel summary::after {
	content: "";
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
}

.puls-sf-pill:hover,
.puls-sf-pill:focus-visible,
.puls-sf-pill[aria-expanded="true"] {
	background: #dcdcdc;
}

.puls-sf-next {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 4px;
	background: #222;
	color: #fff;
	font: inherit;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

/* Without the Popover API the body is a plain block under its pill: expanded, but usable. */
.puls-sf-pop {
	box-sizing: border-box;
	margin: 6px 0 0;
	padding: 16px;
	border-radius: 8px;
	background: #fff;
	color: #222;
}

/* Native popover: top layer, so no theme z-index can cover it. JS sets top/left; centred without JS. */
@supports selector(:popover-open) {
	.puls-sf-pop {
		position: fixed;
		inset: auto;
		margin: 0;
		top: 20vh;
		left: 50%;
		transform: translateX(-50%);
		min-width: 240px;
		max-width: min(360px, calc(100vw - 16px));
		max-height: 70vh;
		overflow: auto;
		border: 0;
		box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
	}

	.puls-sf-pop[style*="left"] {
		transform: none;
	}
}

.puls-sf-panel .puls-sf-item {
	border-bottom: 1px solid #e9e9e9;
}

.puls-sf-panel summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 0;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
}

.puls-sf-panel summary::-webkit-details-marker {
	display: none;
}

.puls-sf-panel details[open] > summary::after {
	transform: translateY(2px) rotate(-135deg);
}

.puls-sf-body {
	padding: 0 0 14px;
}
