.biw-choice {
	box-sizing: border-box;
	min-width: 0;
	margin: 16px 0;
	padding: 18px 20px 20px;
	border: 0;
	border-radius: 16px;
}

/*
 * The NASA theme lays out quantity and purchase buttons on one flex/float row.
 * Keep that row intact and place our selector on a clean row below it.
 */
.single-product form.cart.biw-has-choice {
	flex-wrap: wrap !important;
}

.single-product form.cart .biw-choice--product {
	clear: both;
	float: none;
	flex: 0 0 100%;
	order: 99;
	width: 100%;
	max-width: 100%;
	margin: 16px 0 0;
}

.biw-choice[hidden],
.biw-choice.is-hidden {
	display: none !important;
}

.biw-choice legend {
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 4px;
	padding: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -.01em;
	color: #1f2937;
}

.biw-choice__help,
.biw-choice__status {
	margin: 0 0 13px;
	font-size: 12.5px;
	line-height: 1.45;
	color: #6b7280;
}

.biw-choice__options {
	display: grid;
	grid-template-columns: repeat(2, minmax(150px, 1fr));
	gap: 12px;
	max-width: 570px;
}

.biw-choice__options label {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	box-sizing: border-box;
	min-width: 0;
	min-height: 62px;
	margin: 0;
	padding: 12px 14px;
	border: 0;
	border-radius: 12px;
	background: rgba(255, 255, 255, .9);
	box-shadow: 0 3px 14px rgba(26, 57, 96, .07);
	cursor: pointer;
	transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease;
}

.biw-choice__options label:hover {
	transform: translateY(-1px);
	box-shadow: 0 7px 20px rgba(26, 57, 96, .11);
}

.biw-choice__options label:has(input:checked) {
	color: #fff;
	background: linear-gradient(135deg, #0878f9 0%, #0668d8 100%);
	box-shadow: 0 9px 24px rgba(8, 120, 249, .25);
	transform: translateY(-1px);
}

.biw-choice__options label:has(input:checked) input {
	accent-color: #fff;
}

.biw-choice__options label:focus-within {
	outline: 3px solid rgba(8, 120, 249, .2);
	outline-offset: 2px;
}

.biw-choice__options input {
	flex: 0 0 auto;
	width: 17px;
	height: 17px;
	margin: 0;
	accent-color: #0878f9;
}

.biw-choice__options strong {
	display: block;
	font-size: 14px;
	line-height: 1.25;
}

.biw-choice__options small {
	display: block;
	margin-top: 3px;
	font-size: 11.5px;
	line-height: 1.35;
	color: #6b7280;
	transition: color .18s ease;
}

.biw-choice__options label:has(input:checked) small,
.biw-choice__options label:has(input:checked) .woocommerce-Price-amount {
	color: rgba(255, 255, 255, .82);
}

.biw-choice--cart {
	clear: both;
	margin: 12px 0 0;
	padding: 14px 16px 16px;
	max-width: 520px;
}

.biw-choice--missing {
	background: linear-gradient(135deg, #fff3f4 0%, #fff8f8 100%);
	box-shadow: 0 8px 24px rgba(179, 45, 46, .08);
}

.biw-choice--missing .biw-choice__status {
	color: #b32d2e;
}

.biw-choice.is-loading {
	opacity: .65;
	pointer-events: none;
}

.biw-fixed-quantity {
	display: inline-block;
	min-width: 2em;
	text-align: center;
	font-weight: 600;
}

@media (max-width: 600px) {
	.biw-choice__options {
		grid-template-columns: 1fr;
	}

	.biw-choice__options label {
		width: 100%;
		box-sizing: border-box;
	}
}

@media (prefers-reduced-motion: reduce) {
	.biw-choice__options label {
		transition: none;
	}
}
