/**
 * Product Grouping — Variant Selector Styles
 *
 * Renders on single product pages for products that belong to a group.
 * Two display modes: color swatches and text pills.
 *
 * Selector types:
 *   .wf-variant-selector--color  — circular color swatches
 *   .wf-variant-selector--text   — rounded pill buttons
 *   .wf-variant-selector--image  — thumbnail buttons (future use, falls back to pill styles)
 *
 * @package WayfinderProductExtras
 */

/* ----------------------------------------------------------------
   Selector wrapper
   ---------------------------------------------------------------- */
.wf-variant-selector {
	margin: 16px 0 20px;
}

.wf-variant-selector__label {
	margin: 0 0 10px;
	font-family: var(--font-body, 'Roboto', sans-serif);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--color-dark-text, #313031);
}

.wf-variant-selector__options {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

/* ----------------------------------------------------------------
   Color swatches
   ---------------------------------------------------------------- */
.wf-swatch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	/* Ring is the focus/active indicator — use box-shadow so it sits
	   outside the swatch without affecting layout */
	box-shadow: 0 0 0 2px transparent, 0 0 0 4px transparent;
	transition: box-shadow 150ms ease, transform 150ms ease;
	text-decoration: none;
	flex-shrink: 0;
}

.wf-swatch:hover {
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--color-navy, #2B3157);
	transform: scale(1.08);
}

.wf-swatch:focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--color-orange, #FF7A3D);
}

.wf-swatch.is-active {
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--color-navy, #2B3157);
	pointer-events: none; /* Already on this page */
	cursor: default;
}

.wf-swatch__dot {
	display: block;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, 0.12);
}

/* ----------------------------------------------------------------
   Text pills
   ---------------------------------------------------------------- */
.wf-pill {
	display: inline-flex;
	align-items: center;
	padding: 7px 16px;
	border: 2px solid var(--color-navy, #2B3157);
	border-radius: 100px;
	font-family: var(--font-body, 'Roboto', sans-serif);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	line-height: 1;
	color: var(--color-navy, #2B3157);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 150ms ease,
	            color            150ms ease,
	            border-color     150ms ease;
}

.wf-pill:hover {
	background-color: var(--color-navy, #2B3157);
	color: var(--color-white, #ffffff);
	text-decoration: none;
}

.wf-pill:focus-visible {
	outline: 3px solid var(--color-orange, #FF7A3D);
	outline-offset: 2px;
}

.wf-pill.is-active {
	background-color: var(--color-orange, #FF7A3D);
	border-color: var(--color-orange, #FF7A3D);
	color: var(--color-white, #ffffff);
	pointer-events: none; /* Already on this page */
	cursor: default;
}

/* ----------------------------------------------------------------
   Image thumbnails (future use — styled like pills for now)
   ---------------------------------------------------------------- */
.wf-variant-selector--image .wf-pill {
	padding: 4px;
	border-radius: 6px;
	overflow: hidden;
	width: 52px;
	height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.wf-variant-selector--image .wf-pill img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ----------------------------------------------------------------
   Responsive
   ---------------------------------------------------------------- */
@media (max-width: 767px) {
	.wf-variant-selector__options {
		gap: 6px;
	}

	.wf-swatch {
		width: 40px;
		height: 40px;
	}

	.wf-swatch__dot {
		width: 32px;
		height: 32px;
	}

	.wf-pill {
		padding: 9px 14px;
		font-size: 12px;
		/* Ensure minimum touch target */
		min-height: 44px;
	}
}
