/**
 * "Fits you" size chips - PDP variation chips + RCC popup pill fit badges.
 * Big tap targets (44px+) because the 5.8% variable-product add-to-cart leak
 * is worst on mobile. The native select is hidden accessibly, never removed.
 */

/* The select keeps working underneath - just visually retired. */
select.aifa-chips-replaced {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.aifa-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 6px 0 10px;
}

.aifa-chip {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	min-width: 52px;
	padding: 8px 16px;
	border: 2px solid #d8cfec;
	border-radius: 12px;
	background: #fff;
	color: #3a1f4d;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
	-webkit-tap-highlight-color: transparent;
}

.aifa-chip:hover:not(.aifa-chip--disabled):not(.aifa-chip--selected) {
	border-color: #7c3aed;
	box-shadow: 0 2px 8px rgba(124, 58, 237, .18);
}

.aifa-chip--selected {
	background: #7c3aed;
	border-color: #7c3aed;
	color: #fff;
}

.aifa-chip--disabled {
	opacity: .35;
	text-decoration: line-through;
	cursor: not-allowed;
}

/* Your size, from your active measurement set. */
.aifa-chip--yours {
	border-color: #16a34a;
	box-shadow: 0 0 0 3px rgba(22, 163, 74, .22);
}

.aifa-chip--yours.aifa-chip--selected {
	background: #16a34a;
	border-color: #16a34a;
}

.aifa-chip__fit-tag {
	display: block;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .02em;
	color: #16a34a;
	text-transform: uppercase;
}

.aifa-chip--selected .aifa-chip__fit-tag {
	color: #eafff1;
}

/* A crew member / friend's size - their set colour rings the chip. */
.aifa-chip--fits-other {
	box-shadow: 0 0 0 3px var(--aifa-set-color, #7c3aed);
}

/* Made to Measure - the free custom-fit option. */
.aifa-chip--mtm {
	border-image: linear-gradient(135deg, #ec4899, #8b5cf6) 1;
	border-radius: 12px;
	border-style: solid;
	background: linear-gradient(135deg, #fff0fa, #f3ecff);
}

.aifa-chip--mtm.aifa-chip--selected {
	background: linear-gradient(135deg, #ec4899, #8b5cf6);
	color: #fff;
}

.aifa-chip__mtm-tag {
	display: block;
	font-size: 10px;
	font-weight: 700;
	color: #a21caf;
	text-transform: uppercase;
	letter-spacing: .02em;
}

.aifa-chip--selected .aifa-chip__mtm-tag {
	color: #ffe4f7;
}

/* Smart Fit verdict line, under the size chips. */
.aifa-chips-verdict {
	margin: 4px 0 10px;
	font-size: 14px;
	font-weight: 600;
	color: #16a34a;
}

.aifa-chips-verdict__who {
	font-weight: 500;
	color: #6b6480;
}

/* The relocated honest fit-stats line sits tight against the chips. */
.aifa-fit-stats--at-chips {
	margin: 2px 0 10px !important;
}

/* RCC popup pills: fit badges only (the pills already handle selection). */
.rcc-var-pill.aifa-pill--yours {
	box-shadow: 0 0 0 3px rgba(22, 163, 74, .35);
	position: relative;
}

.rcc-var-pill.aifa-pill--fits-other {
	box-shadow: 0 0 0 3px var(--aifa-set-color, #7c3aed);
}

@media (prefers-reduced-motion: reduce) {
	.aifa-chip {
		transition: none;
	}
}
