/* OZB Variation Swatches — single product page (module b). Self-contained styles. */

/* Keep the native <select> in the DOM (WooCommerce needs it) but out of sight. */
.ozb-vs-single .ozb-vs-native-select {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.ozb-vs-single-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 6px 0 2px;
}

/*
 * Geometry pinned with !important so theme button styles can't stretch the dots into
 * ovals (Flatsome adds min-width / padding / line-height to buttons).
 */
.ozb-vs-single .ozb-vs-swatch {
	flex: 0 0 auto;
	box-sizing: border-box !important;
	display: inline-block !important;
	width: 34px !important;
	height: 34px !important;
	min-width: 34px !important;
	min-height: 34px !important;
	max-width: 34px !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 1px solid #d3d3d3 !important;
	border-radius: 50% !important;
	line-height: 0 !important;
	aspect-ratio: 1 / 1;
	background: #fff;
	cursor: pointer;
	overflow: hidden;
	vertical-align: middle;
	box-shadow: none;
	transition: transform .12s ease, box-shadow .12s ease;
	-webkit-appearance: none;
	appearance: none;
}

.ozb-vs-single .ozb-vs-swatch .ozb-vs-chip {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
}

.ozb-vs-single .ozb-vs-swatch img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.ozb-vs-single .ozb-vs-swatch:hover {
	transform: scale(1.08);
}

.ozb-vs-single .ozb-vs-swatch.is-selected {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #222;
	border-color: #222 !important;
}

.ozb-vs-single .ozb-vs-swatch:focus-visible {
	outline: 2px solid #222;
	outline-offset: 2px;
}

/* Unavailable colour: dimmed with a subtle strike. */
.ozb-vs-single .ozb-vs-swatch.is-disabled {
	position: relative;
	opacity: .4;
	cursor: not-allowed;
}

.ozb-vs-single .ozb-vs-swatch.is-disabled::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top right, transparent 45%, #999 46%, #999 54%, transparent 55%);
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
	.ozb-vs-single .ozb-vs-swatch { transition: none; }
	.ozb-vs-single .ozb-vs-swatch:hover { transform: none; }
}
