/**
 * Variatie-swatches in productoverzichten (zie inc/archive-swatches.php).
 */
.vvz-swatches {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin-top: 4px;
}

/*
 * De knop "Opties selecteren" is in de Customizer al onzichtbaar gemaakt, maar nam nog ruimte in.
 * !important is nodig tegen de display-instelling van het grid-widget in Elementor.
 */
.jet-woo-product-button:has(.vvz-swatches) > .button {
	display: none !important;
}

.vvz-swatches__row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
}

.vvz-swatches button.vvz-swatch,
.vvz-swatches button.vvz-swatch:hover,
.vvz-swatches button.vvz-swatch:focus {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 2px;
	border: 0;
	border-radius: 2px;
	background: #fff;
	color: #333;
	font-size: 12px;
	line-height: 1;
	text-transform: none;
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .3);
	cursor: pointer;
	transition: box-shadow 150ms ease, opacity 150ms ease;
}

.vvz-swatches button.vvz-swatch--button {
	width: auto;
	min-width: 30px;
	padding: 0 8px;
}

.vvz-swatches button.vvz-swatch:hover,
.vvz-swatches button.vvz-swatch:focus-visible {
	box-shadow: 0 0 0 2px rgba(255, 255, 255, .7);
}

.vvz-swatches button.vvz-swatch.is-selected {
	box-shadow: 0 0 0 2px var(--e-global-color-primary);
}

.vvz-swatches button.vvz-swatch.is-unavailable {
	opacity: .35;
}

.vvz-swatches button.vvz-swatch.is-unavailable::after {
	content: '';
	position: absolute;
	top: 50%;
	left: -2px;
	right: -2px;
	height: 1px;
	background: #c91313;
	transform: rotate(-45deg);
}

.vvz-swatch__color,
.vvz-swatch__image {
	display: block;
	width: 100%;
	height: 100%;
}

.vvz-swatch__image {
	object-fit: contain;
}
