/* Items hidden by the brand filter */
[data-wcbf-hide] {
	display: none !important;
}

.wcbf-box {
	--wcbf-bg: #f8f8f8;
	--wcbf-text: #3f4349;
	--wcbf-icon: #4a4e55;
	--wcbf-radius: 999px;
	--wcbf-height: 52px;
	--wcbf-option-pad: 10px 18px; /* space around every item in the opened list */
	--wcbf-pad: 14px; /* left/right space inside the dropdown - change this to move the text */
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0 0 24px;
}

.wcbf-box *,
.wcbf-box *::before,
.wcbf-box *::after {
	box-sizing: border-box;
}

.wcbf-box .wcbf-label {
	display: block;
	margin: 0 0 8px;
	padding-inline: var(--wcbf-pad);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--wcbf-text);
}

/* Pill: select + chevron sit side by side (no overlap possible) */
.wcbf-box .wcbf-selectbox {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	height: var(--wcbf-height);
	padding: 0 var(--wcbf-pad);
	background: var(--wcbf-bg);
	border-radius: var(--wcbf-radius);
	transition: box-shadow .2s ease;
}

.wcbf-box .wcbf-selectbox:focus-within {
	box-shadow: 0 0 0 2px rgba(0, 0, 0, .12);
}

.wcbf-box .wcbf-select {
	flex: 1 1 auto;
	display: block;
	width: 100%;
	min-width: 0;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	padding-inline: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	-webkit-padding-start: 0 !important;
	text-indent: 0 !important;
	text-align: start !important;
	font-size: 16px; /* prevents iOS zoom */
	line-height: 1.2;
	color: var(--wcbf-text);
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
	text-overflow: ellipsis;
}

.wcbf-box .wcbf-select option {
	padding: var(--wcbf-option-pad) !important;
	min-height: 40px;
	line-height: 1.4;
	color: #1d2024;
	background: #fff;
}

.wcbf-box .wcbf-chevron {
	flex: 0 0 20px;
	width: 20px !important;
	height: 20px !important;
	color: var(--wcbf-icon);
	pointer-events: none;
}

.wcbf-box .wcbf-status {
	margin: 10px 0 0;
	padding-inline: var(--wcbf-pad);
	font-size: 14px;
	color: #667085;
}

.wcbf-admin-note {
	padding: 10px 14px;
	font-size: 13px;
	color: #7a2e0e;
	background: #fff4ed;
	border: 1px dashed #f79009;
	border-radius: 8px;
}

@media (max-width: 767px) {
	.wcbf-box { --wcbf-height: 48px; }
}

/* Loading state while the filtered grid is fetched */
.wcbf-box.wcbf-loading .wcbf-selectbox {
	opacity: .7;
}

.wcbf-grid-loading {
	opacity: .45;
	pointer-events: none;
	transition: opacity .2s ease;
}

/* ---------- Styled list (desktop) ---------- */

/* the real <select> stays in the DOM (form value, accessibility) but is visually hidden */
.wcbf-box.wcbf-custom .wcbf-select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
	overflow: hidden;
}

.wcbf-box.wcbf-custom .wcbf-chevron {
	margin-inline-start: auto;
	transition: transform .2s ease;
}

.wcbf-box.wcbf-open .wcbf-chevron {
	transform: rotate(180deg);
}

.wcbf-box .wcbf-btn {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex !important;
	align-items: center;
	width: 100%;
	height: 100% !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 calc(var(--wcbf-pad) + 30px) 0 var(--wcbf-pad) !important;
	font-family: inherit;
	font-size: 16px !important;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-align: start;
	color: var(--wcbf-text) !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: var(--wcbf-radius) !important;
	box-shadow: none !important;
	outline: none !important;
	cursor: pointer;
}

.wcbf-box .wcbf-btn:hover,
.wcbf-box .wcbf-btn:focus,
.wcbf-box .wcbf-btn:active {
	color: var(--wcbf-text) !important;
	background: transparent !important;
	box-shadow: none !important;
}

.wcbf-box .wcbf-btn-text {
	display: block;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wcbf-box .wcbf-list {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 8px);
	z-index: 99999;
	margin: 0 !important;
	padding: 8px !important;
	list-style: none !important;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 12px 32px rgba(16, 24, 40, .16), 0 0 0 1px rgba(16, 24, 40, .06);
}

.wcbf-box .wcbf-list[hidden] {
	display: none !important;
}

.wcbf-box .wcbf-list.wcbf-up {
	top: auto;
	bottom: calc(100% + 8px);
}

.wcbf-box .wcbf-opt {
	position: relative;
	margin: 0 !important;
	padding: var(--wcbf-option-pad) !important;
	list-style: none !important;
	font-size: 16px;
	line-height: 1.4;
	color: #1d2024;
	border-radius: 12px;
	cursor: pointer;
}

.wcbf-box .wcbf-opt.is-active {
	background: #f2f2f2;
}

.wcbf-box .wcbf-opt[aria-selected="true"] {
	font-weight: 600;
}
