/* Shared APF choice swatches (Malow solid colors + MJ Design / Grospol images). */

.apf-swatches-product .wapf-field-container.apf-swatch-field-enhanced select.apf-swatch-select-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.apf-swatches-product .wapf-field-container.apf-swatch-field-enhanced .wapf-field-input {
	position: relative;
	overflow: visible;
}

.apf-swatches-product .apf-swatch-root {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin: 0;
	padding: 0;
}

.apf-swatches-product .apf-swatch-group__label {
	display: block;
	width: 100%;
	margin: 18px 0 10px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: inherit;
}

.apf-swatches-product .apf-swatch-group:first-child .apf-swatch-group__label {
	margin-top: 0;
}

.apf-swatches-product .apf-swatch-items {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.apf-swatches-product .apf-swatch-item {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
	cursor: pointer;
	overflow: visible;
}

.apf-swatches-product .apf-swatch-item.selected {
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.85);
}

.apf-swatches-product .apf-swatch-face {
	display: block;
	width: 100%;
	height: 100%;
}

/* Solid color mode (Malow Body / Door). */
.apf-swatches-product .apf-swatch-item--color {
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
	height: var(--wvs-single-product-item-width, 30px);
	width: var(--wvs-single-product-item-width, 30px);
}

.apf-swatches-product .apf-swatch-item--color.selected {
	box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.85);
}

.apf-swatches-product .apf-swatch-item--light .apf-swatch-face--color,
.apf-swatches-product .apf-swatch-item--white .apf-swatch-face--color {
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.apf-swatches-product .apf-swatch-tick--wvs {
	background-image: var(--wvs-tick);
	background-position: 50%;
	background-repeat: no-repeat;
	background-size: 60%;
	display: block;
	height: 100%;
	left: 0;
	pointer-events: none;
	position: absolute;
	top: 0;
	width: 100%;
	z-index: 2;
}

/* Image mode (MJ Design fabric / Grospol material). */
.apf-swatches-product .apf-swatch-item--image {
	display: inline-flex;
	width: 36px;
	height: 36px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 2px;
}

.apf-swatches-product .apf-swatch-item--image.selected {
	box-shadow: 0 0 0 2px #111;
}

.apf-swatches-product .apf-swatch-face--image {
	border-radius: 1px;
	background: #e8e8e8 center / cover no-repeat;
}

.apf-swatches-product .apf-swatch-item--image:hover {
	z-index: 20;
}

.apf-swatches-product .apf-swatch-item--image:hover .apf-swatch-face--image::after,
.apf-swatches-product .apf-swatch-item--image:focus-visible .apf-swatch-face--image::after {
	content: "";
	position: absolute;
	bottom: calc(100% + 12px);
	left: 50%;
	width: 120px;
	height: 120px;
	margin-left: -60px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 2px;
	background-color: #fff;
	background-image: var(--material-preview);
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	pointer-events: none;
}

.apf-swatches-product .apf-swatch-tick--check {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	font-size: 14px;
	line-height: 1;
	text-shadow: 0 0 2px rgba(0, 0, 0, 0.75);
	pointer-events: none;
}

.apf-swatches-product .apf-swatch-tick--check::before {
	content: "✓";
}
