.wmp-selector {
	margin-bottom: 20px;
}

.wmp-selector__label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: var(--color-gray-800, #333);
}

.wmp-selector__items {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/*
 * 1.5x the original 64px thumbnail. The colour count sits underneath so a
 * design thumbnail is not mistaken for a colour swatch of the current product.
 */
.wmp-item {
	position: relative;
	display: block;
	width: 96px;
	border: 2px solid rgba(0, 0, 0, .12);
	border-radius: 4px;
	overflow: hidden;
	transition: border-color .2s ease, transform .2s ease;
	line-height: 0;
	text-decoration: none;
}

.wmp-item img {
	width: 96px;
	height: 96px;
	object-fit: cover;
	display: block;
}

.wmp-item__colors {
	display: block;
	padding: 3px 2px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	color: var(--color-gray-800, #444);
	background: rgba(0, 0, 0, .03);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.wmp-item:hover {
	border-color: rgba(0, 0, 0, .4);
	transform: translateY(-2px);
}

.wmp-item--active {
	border-color: var(--wd-primary-color, #111);
	cursor: default;
}

.wmp-item--active:hover {
	transform: none;
}

.wmp-item--oos {
	opacity: .45;
}

.wmp-item--oos:after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top left, transparent 47%, rgba(0, 0, 0, .35) 49%, rgba(0, 0, 0, .35) 51%, transparent 53%);
}

@media (max-width: 768px) {
	.wmp-item {
		width: 81px;
	}

	.wmp-item img {
		width: 81px;
		height: 81px;
	}
}

/* Collection title shown above the selector on a collection page. */
.wmp-selector__collection {
	display: block;
	margin-bottom: 4px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--wd-primary-color, #111);
	text-decoration: none;
}

.wmp-selector__collection:hover {
	text-decoration: underline;
}

/* Brief dim while the next product is fetched. */
.single-product-page.wmp-loading {
	opacity: .55;
	pointer-events: none;
	transition: opacity .15s ease;
}
