/**
 * Anker Dev - Variation Swatches
 *
 * Lays the generated swatch buttons next to each other and hides the original
 * WooCommerce <select>, which is kept in the DOM purely to drive variation logic.
 *
 * Visual styling is intentionally light so it inherits the WoodMart look; tweak
 * via your theme/child-theme if you need a different appearance.
 */

.anker-dev-swatches__source {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
	padding: 0;
	margin: -1px;
}

.anker-dev-swatches__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.anker-dev-swatch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	min-height: 40px;
	padding: 6px 14px;
	margin: 0;
	border: 1px solid var(--wd-form-brd-color, #e1e1e1);
	border-radius: var(--wd-brd-radius, 4px);
	background: #fff;
	color: inherit;
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
	user-select: none;
	transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.anker-dev-swatch:hover {
	border-color: var(--wd-primary-color, #242424);
}

.anker-dev-swatch.is-active {
	border-color: var(--wd-primary-color, #242424);
	color: var(--wd-primary-color, #242424);
	box-shadow: inset 0 0 0 1px var(--wd-primary-color, #242424);
	font-weight: 600;
}

.anker-dev-swatch.is-disabled {
	opacity: 0.4;
	cursor: not-allowed;
	text-decoration: line-through;
}

.anker-dev-swatch__label {
	pointer-events: none;
}
