/* Swatches */
.unbxd-ce-hidden-select {
	display: none !important;
}

ul.unbxd-ce-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	list-style: none !important;
	margin: 0 0 1em;
	padding: 0;
}

li.unbxd-ce-swatch {
	/* flex (not list-item) so ::marker never renders; also shrugs off
	   theme background-image bullets and li margins */
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: 2px solid transparent;
	border-radius: 6px;
	padding: 2px;
	margin: 0;
	line-height: 0;
	list-style: none;
	background: none;
	transition: border-color 0.15s ease, opacity 0.15s ease;
}

/* Neutralize theme ::before/::marker bullets with class+element specificity */
ul.unbxd-ce-swatches > li.unbxd-ce-swatch::before,
ul.unbxd-ce-swatches > li.unbxd-ce-swatch::marker {
	content: none !important;
	display: none;
}

.unbxd-ce-swatch.selected {
	border-color: #111;
}

.unbxd-ce-swatch.disabled {
	opacity: 0.35;
	cursor: not-allowed;
	position: relative;
}

.unbxd-ce-swatch.disabled::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	border-top: 1px solid rgba(0, 0, 0, 0.4);
	transform: rotate(-30deg);
}

.unbxd-ce-swatch:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

.unbxd-ce-swatch-color {
	display: block;
	width: var(--unbxd-ce-swatch-size, 32px);
	height: var(--unbxd-ce-swatch-size, 32px);
	border-radius: var(--unbxd-ce-swatch-radius, 50%);
	border: 1px solid rgba(0, 0, 0, 0.15);
}

.unbxd-ce-swatch-image {
	width: calc(var(--unbxd-ce-swatch-size, 32px) * 1.5);
	height: calc(var(--unbxd-ce-swatch-size, 32px) * 1.5);
	object-fit: cover;
	border-radius: 4px;
	display: block;
}

.unbxd-ce-swatch-label {
	display: inline-block;
	padding: 7px 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	line-height: 1.2;
	background: #fff;
}

.unbxd-ce-swatch-name {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	line-height: 1.2;
	text-align: center;
	color: inherit;
}

.unbxd-ce-swatch.selected .unbxd-ce-swatch-label {
	background: #111;
	color: #fff;
	border-color: #111;
}
