/* ==========================================================================
   WCGS - Variation swatches (color circles / image tiles)
   ========================================================================== */

.wcgs-swatch-group {
	margin-bottom: 4px;
}

/* Hide the real <select> visually but keep it in the DOM & accessible-ish;
   WooCommerce's variation script reads/writes its value directly. */
.wcgs-hidden-select {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.wcgs-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
}

.wcgs-swatch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-sizing: border-box;
	transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.wcgs-swatch:hover {
	transform: translateY(-1px);
}

/* Color circle */
.wcgs-swatch--color {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px #ddd;
}

.wcgs-swatch--color.wcgs-swatch--active {
	box-shadow: 0 0 0 2px #333;
}

/* Image tile */
.wcgs-swatch--image {
	width: 56px;
	height: 56px;
	padding: 2px;
	border: 2px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
}

.wcgs-swatch--image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.wcgs-swatch--image.wcgs-swatch--active {
	border-color: #333;
}

/* Text pill fallback */
.wcgs-swatch--text {
	padding: 6px 14px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 13px;
}

.wcgs-swatch--text.wcgs-swatch--active {
	border-color: #333;
	background: #f5f5f5;
}

.wcgs-swatch-label {
	margin-top: 6px;
	font-size: 12px;
	color: #666;
	min-height: 16px;
}
