/* ===== Variation "radio pill" selector ===== */
.variations td.label label {
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: 13px;
	color: #52525b;
	font-weight: 600;
}

/* Hide the native select visually but keep it in the DOM/tab order for
   WooCommerce's own JS + form submission to keep working untouched. */
.avr-variation-radio-wrap select {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

:root {
	--avr-accent: #b5551a;
	--avr-accent-bg: #fdf1ea;
}

.avr-variation-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 6px 0 4px;
}

.avr-variation-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	/* grow (1) to fill leftover row width when there's only a few, similar-
	   length options (e.g. "10 mg / 20 mg / 40 mg") - matches the client's
	   reference, where those pills fill the row edge-to-edge - but never
	   shrink (0) below the label's own content width (basis: auto). That
	   shrink:0 is what actually fixes the bug: the old `flex: 1 1 0%` could
	   shrink pills below their content size once there were many of very
	   different lengths (e.g. a long iPhone model list), wrapping long
	   labels across multiple lines and colliding with the radio dot. */
	flex: 1 0 auto;
	white-space: nowrap;
	border: 1.5px solid #d4d4d8;
	border-radius: 8px;
	padding: 8px 14px;
	font-size: 14px;
	font-weight: 700;
	color: #18181b;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
	user-select: none;
}

.avr-variation-pill-label {
	white-space: nowrap;
}

.avr-variation-radio-dot {
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	border: 1.3px solid #a1a1aa;
	background: #fff;
	box-sizing: border-box;
	position: relative;
	transition: border-color 0.15s ease;
}

.avr-variation-pill.is-selected .avr-variation-radio-dot {
	border-color: var(--avr-accent);
}

.avr-variation-pill.is-selected .avr-variation-radio-dot::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--avr-accent);
	transform: translate(-50%, -50%);
}

.avr-variation-pill.is-selected {
	border-color: var(--avr-accent);
	background: var(--avr-accent-bg);
	color: #18181b;
}

.avr-variation-pill.is-disabled {
	color: #a1a1aa;
	text-decoration: line-through;
	border-color: #e4e4e7;
	cursor: not-allowed;
	background: #fafafa;
}

.avr-variation-pill.is-disabled .avr-variation-radio-dot {
	border-color: #d4d4d8;
}

/* ===== Quantity stepper ===== */
.avr-qty-label {
	text-transform: uppercase;
	letter-spacing: 2px;
	font-size: 13px;
	color: #52525b;
	font-weight: 600;
	display: block;
	margin: 20px 0 8px;
}

.avr-qty-stepper {
	display: inline-flex;
	align-items: center;
	border: 1.5px solid #e4e4e7;
	border-radius: 8px;
	overflow: hidden;
	width: fit-content;
}

.avr-qty-stepper button {
	background: none;
	border: none;
	font-size: 14px;
	width: 30px;
	height: 34px;
	cursor: pointer;
	color: #18181b;
	line-height: 1;
}

.avr-qty-stepper button:disabled {
	color: #d4d4d8;
	cursor: not-allowed;
}

.avr-qty-stepper input.qty {
	border: none;
	width: 30px;
	height: 34px;
	text-align: center;
	font-size: 14px;
	font-weight: 700;
	color: #312e81;
	-moz-appearance: textfield;
}

.avr-qty-stepper input.qty::-webkit-outer-spin-button,
.avr-qty-stepper input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
