/*
	THE VARIATION DROPDOWNS (2026-11-17)
	====================================

	**THIS PAGE ALREADY HAD A CUSTOM DROPDOWN AND I BUILT A SECOND ONE
	ON TOP OF IT.** `shop-beast.js` replaces every WooCommerce
	`<select>` with `.sf-pick` — a button plus a `role="listbox"` <ul>,
	aria-expanded, aria-selected, keyboard, the lot — and the select
	already carried `sf-pick-native`. I checked for `.sb-*` and for
	swatches, saw neither, and shipped a `.sf-popt` beside it: two
	controls per attribute, live, for about ten minutes.

	The fix was to delete mine. `pdp-options.js` is gone and this file
	does the whole job in CSS, which is what it should have been from
	the start — `.sf-pick` works, so the only thing missing was the
	look.

	**CHECK FOR AN EXISTING CONTROL BEFORE BUILDING ONE**, and check it
	by looking at the rendered row rather than by guessing at class
	prefixes. One `querySelectorAll('.variations *')` would have shown
	`.sf-pick__btn` immediately.

	NOTHING ABOUT ANY PRODUCT IS WRITTEN HERE: attributes, labels,
	options and availability are all still shop-beast's, read from what
	WooCommerce rendered.
*/

/* ------------------------------------------------------------------ */
/*  Trigger                                                            */
/* ------------------------------------------------------------------ */
/*
	MATCH THEIR CHAIN OR LOSE SILENTLY. single-product.css carries
	`body.single-product .sf-pdp .sf-pdp__rail .sf-pick__btn` — (0,4,1)
	against a bare `.sf-pick__btn` at (0,1,0). The first cut of this
	file wrote the bare class, the rule was present and correct, and
	the radius stayed 6px. These selectors tie with theirs and this
	sheet is enqueued after it, so they win on order rather than by
	escalating to !important.
*/
body.single-product .sf-pdp .sf-pdp__rail .sf-pick__btn{
	/* 12px, the radius the rest of the page settled on */
	border-radius:12px;
	transition:border-color .2s ease;
}
body.single-product .sf-pdp .sf-pdp__rail .sf-pick__btn:hover,
body.single-product .sf-pdp .sf-pdp__rail .sf-pick__btn[aria-expanded="true"]{
	border-color:var(--wp--preset--color--accent-1, #ec1e79);
}

/* their caret is a bare span with a border trick; tint it to the accent */
.sf-pick__caret{
	border-color:var(--wp--preset--color--accent-1, #ec1e79);
	color:var(--wp--preset--color--accent-1, #ec1e79);
}

/* ------------------------------------------------------------------ */
/*  List                                                               */
/* ------------------------------------------------------------------ */
body.single-product .sf-pdp .sf-pdp__rail .sf-pick__list{
	border-radius:12px;
	box-shadow:0 16px 40px rgba(0,0,0,.55);
}

.sf-pdp__rail .sf-pick__opt{
	border-radius:8px;
	transition:background .15s ease;
}

/*
	THE CHOSEN ROW IS A MAGENTA FILL WITH A NEAR-BLACK LABEL — 4.55:1.
	White on this magenta measures 4.10:1 and fails AA, and these rows
	can carry a second line.

	`aria-selected` is shop-beast's own marker, so this follows the
	control's real state rather than a class we would have to maintain.

	**THIS REPLACES AN EXISTING CONVENTION, SO IT HAD TO BEAT IT.**
	single-product.css marks the chosen row with
	`.sf-pdp__rail .sf-pick__opt[aria-selected="true"]{ color: var(--sp-accent) }`
	— pink TEXT, no fill. The first cut of this file added the fill at
	(0,2,0) and lost the colour at (0,3,0), so the row rendered pink on
	pink and the selected option was invisible. Equal specificity plus
	later source order fixes it without !important.
*/
.sf-pdp__rail .sf-pick__opt[aria-selected="true"]{
	background:var(--wp--preset--color--accent-1, #ec1e79);
	color:#101014;
}
.sf-pdp__rail .sf-pick__opt[aria-selected="true"] *{ color:inherit; }

/*
	OUT OF STOCK STAYS LISTED AND DIMMED rather than disappearing, so
	the range still reads — a customer can see the colourway exists and
	is simply gone, which a vanished row cannot say. shop-beast marks
	those with `aria-disabled`.
*/
.sf-pdp__rail .sf-pick__opt[aria-disabled="true"]{ opacity:.4; }
.sf-pdp__rail .sf-pick__opt[aria-disabled="true"]:hover{ background:transparent; }

/* ------------------------------------------------------------------ */
/*  The open picker is not magenta                                     */
/* ------------------------------------------------------------------ */
/*
	Operator, 2026-11-19, with the dropdown open: "i dont want border
	pink". The field's own edge went to the full accent on hover and
	while open -- a 1px #ec1e79 rectangle round a control that is not an
	action, and the loudest thing on the rail at the moment you are
	using it. It brightens its own hairline instead, --sp-line's .16 to
	.45 of the same ink, which is the step the review form's fields take
	on focus.

	**IT IS STILL A STATE, AND IT HAS TO BE.** Dropping the change
	altogether would leave the open field looking exactly like the two
	closed ones beside it on a product with several attributes. Brighter
	is enough; coloured was not needed.

	**THE SELECTOR HAS TO BEAT (0,6,1), NOT (0,5,1).** Two files set this
	border and `single-product.css` reaches it twice -- once as
	`.sf-pick__btn:hover` (0,5,1) and once as `.sf-pick.is-open
	.sf-pick__btn` (0,6,1), which is HIGHER than this file's own
	`[aria-expanded="true"]` rule above and is what actually wins while
	the list is open. The two agreed on magenta, so nothing showed; they
	would not agree now. Matching the `.is-open` shape and loading later
	is what takes it. Both state selectors are kept so neither route is
	left painting the old colour.

	**NOT TOUCHED: the caret and the focus ring.** The chevron is drawn
	out of borders and is accent in both files, and `:focus-visible` puts
	a 2px accent outline on the button -- which a mouse click does not
	trigger on a button in Chrome, so only a keyboard user sees it and it
	is the one magenta here doing real work. Both are a line each if the
	accent is ever unwanted on this control at all.
*/
body.single-product .sf-pdp .sf-pdp__rail .sf-pick__btn:hover,
body.single-product .sf-pdp .sf-pdp__rail .sf-pick__btn[aria-expanded="true"],
body.single-product .sf-pdp .sf-pdp__rail .sf-pick.is-open .sf-pick__btn {
	border-color: rgba(242, 242, 244, 0.45);
}
