/**
 * WooPlus Desktop Variation Swatches — storefront styles.
 * Brand violet active state, theme-agnostic, RTL-friendly.
 */

/* Hide the native select but keep it in the DOM for wc-add-to-cart-variation.js. */
select.wooplus-swatch-source {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	clip: rect(0 0 0 0);
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

.wooplus-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 4px 0 2px;
}

.wooplus-swatch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 40px;
	min-height: 40px;
	padding: 8px 14px;
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	color: #1f2430;
	background: #fff;
	border: 1.5px solid #d9dde6;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s, transform .12s;
	-webkit-appearance: none;
	appearance: none;
}

.wooplus-swatch:hover {
	border-color: #b794f6;
}

.wooplus-swatch.is-active {
	border-color: #6d28d9;
	box-shadow: 0 0 0 2px rgba(109, 40, 217, .18);
	color: #5b21b6;
}

/* Color-dot swatches: round, dot only. */
.wooplus-swatches.is-color .wooplus-swatch.is-dot {
	min-width: 0;
	padding: 4px;
	border-radius: 999px;
}

.wooplus-swatch__dot {
	display: block;
	width: 26px;
	height: 26px;
	border-radius: 999px;
}

.wooplus-swatches.is-color .wooplus-swatch.is-dot.is-active {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #6d28d9;
}

/* Unavailable combinations. */
.wooplus-swatch.is-disabled {
	opacity: .4;
	cursor: not-allowed;
	position: relative;
}

.wooplus-swatch.is-disabled::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 140%;
	height: 1.5px;
	background: #9aa1ad;
	transform: rotate(-20deg);
	transform-origin: center;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
