/* Hide the native variation <select> when swatches replace it (kept in DOM for WC JS). */
.wcc-swatches-field > select {
	display: none;
}

.wcc-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}

.wcc-swatch {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--wcc-swatch-size, 34px);
	height: var(--wcc-swatch-size, 34px);
	padding: 0 10px;
	border: 1px solid #d5d5d5;
	border-radius: var(--wcc-swatch-radius, 4px);
	background-size: cover;
	background-position: center;
	font-size: 13px;
	font-weight: 500;
	line-height: 1;
	color: #333;
	cursor: pointer;
	user-select: none;
	transition: border-color .15s, box-shadow .15s, transform .05s;
}

/* Color / image swatches are square (or circular) icons, no inner text. */
.wcc-swatch--color,
.wcc-swatch--image {
	width: var(--wcc-swatch-size, 34px);
	padding: 0;
	font-size: 0;
}

/* Text/label swatches keep gently rounded corners (never a full circle). */
.wcc-swatch--label {
	width: auto;
	padding: 0 12px;
	border-radius: 6px;
}

.wcc-swatch:hover {
	border-color: #999;
}

.wcc-swatch:active {
	transform: scale(.96);
}

/* Selected state */
.wcc-swatch.wcc-active {
	border-color: #111;
	box-shadow: 0 0 0 2px #111;
}

/* Checkmark on selected color/image swatches */
.wcc-swatch--color.wcc-active::after,
.wcc-swatch--image.wcc-active::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 48%;
	width: 6px;
	height: 11px;
	margin: -7px 0 0 -3px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	filter: drop-shadow(0 0 1px rgba(0, 0, 0, .6));
}

.wcc-swatch.wcc-disabled {
	opacity: .35;
	cursor: not-allowed;
}

.wcc-swatch.wcc-disabled::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top left, transparent 47%, rgba(0, 0, 0, .35) 48%, rgba(0, 0, 0, .35) 52%, transparent 53%);
	border-radius: inherit;
}

/* ── Chip style (icon + name), like Shopee ── */
.wcc-swatches--chip {
	gap: 10px;
}
.wcc-chip {
	width: auto;
	min-width: 0;
	height: auto;
	padding: 7px 12px;
	gap: 8px;
	border-radius: 6px;
	font-weight: 400;
}
.wcc-chip__icon {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	border-radius: 4px;
	background-size: cover;
	background-position: center;
	border: 1px solid rgba(0, 0, 0, .12);
}
.wcc-chip__name {
	font-size: 13px;
	line-height: 1.1;
	color: #333;
}
.wcc-chip.wcc-active {
	border-color: #c0392b;
	box-shadow: none;
}
.wcc-chip.wcc-active .wcc-chip__name {
	color: #c0392b;
	font-weight: 600;
}
/* No checkmark overlay in chip mode */
.wcc-chip.wcc-active::after {
	content: none;
}
