.vis-swatches {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--vis-gap, 10px);
	margin: 0 0 18px;
}

.vis-swatches.vis-align-center { justify-content: center; }
.vis-swatches.vis-align-right { justify-content: flex-end; }

.vis-swatches-label {
	flex-basis: 100%;
	font-weight: 600;
	margin-bottom: 4px;
	font-size: 14px;
	opacity: .85;
}

.vis-swatch {
	width: var(--vis-size, 60px);
	height: var(--vis-size, 60px);
	padding: 0;
	margin: 0;
	background: #fff;
	border: var(--vis-border-width, 2px) solid var(--vis-border-color, #e0e0e0);
	border-radius: var(--vis-radius, 8px);
	box-shadow: var(--vis-shadow, none);
	overflow: hidden;
	cursor: pointer;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
	transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.vis-swatch img,
.vis-swatch > span {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.vis-swatch:hover {
	border-color: var(--vis-border-color-hover, #9aa0a6);
}

.vis-swatch.vis-zoom:hover {
	transform: scale(1.06);
}

.vis-swatch.vis-active {
	border-color: var(--vis-border-color-active, #2271b1);
}

/* Tooltip */
.vis-swatch[data-tooltip]::after {
	content: attr(data-tooltip);
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(4px);
	background: #1f2937;
	color: #fff;
	font-size: 11px;
	line-height: 1.3;
	padding: 4px 8px;
	border-radius: 5px;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transition: opacity .15s ease, transform .15s ease;
	z-index: 6;
	margin-bottom: 6px;
}

.vis-swatch[data-tooltip]:hover::after {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}
