/**
 * Starel - Mosaic Colourway Swatches
 * Frontend v1.1.1
 *
 * The 48px circular treatment deliberately mirrors the established Vanity PDP
 * top-swatch language while retaining an isolated plugin namespace.
 */

.starel-mcs {
	--starel-mcs-black: #111;
	--starel-mcs-grey-fill: #f5f5f5;
	margin: 18px 0 22px;
	min-width: 0;
}

.starel-mcs__heading {
	margin: 0 0 8px;
	font: inherit;
	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.4;
	letter-spacing: 0.2px;
	text-transform: uppercase;
}

.starel-mcs__swatches {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	width: 100%;
	overflow-x: auto;
	overflow-y: visible;
	padding: 4px 2px 8px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.starel-mcs__swatches::-webkit-scrollbar {
	display: none;
}

.starel-mcs__item {
	display: inline-flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: center;
	max-width: 76px;
}

.starel-mcs__swatch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 3px;
	border: 2px solid transparent;
	border-radius: 999px;
	background: transparent;
	box-sizing: border-box;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.starel-mcs__swatch.is-active {
	border-color: var(--starel-mcs-black);
	cursor: default;
}

.starel-mcs__swatch:focus-visible {
	outline: 2px solid var(--starel-mcs-black);
	outline-offset: 3px;
}

.starel-mcs__swatch:not(.is-active):hover {
	border-color: #a8a8a8;
}

.starel-mcs__media {
	display: block;
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-radius: 999px;
	background: var(--starel-mcs-grey-fill);
	box-sizing: border-box;
}

.starel-mcs__media img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
}

.starel-mcs__swatch.is-outofstock .starel-mcs__media {
	opacity: 0.5;
}

.starel-mcs__stock {
	display: block;
	margin-top: 4px;
	font-size: 10px;
	line-height: 1.2;
	text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
	.starel-mcs__swatch {
		transition: border-color 160ms ease, opacity 160ms ease;
	}
}
