/* Orderable Radio Variations - front-end styles */

.orv-wrapper {
	margin: 0 0 16px 0;
}

.orv-wrapper + .orv-wrapper {
	margin-top: 20px;
}

/* Native <select> stays in the DOM (screen readers and WooCommerce/Orderable
   JS still read it) but is visually hidden rather than display:none, which
   keeps it reachable for assistive tech that prefers native form controls. */
.orv-native-select {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Outer bordered list container, rows separated by dividers. */
.orv-options {
	border: 1px solid #e4e4e4;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.orv-radio {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 18px;
	border-bottom: 1px solid #ececec;
	cursor: pointer;
	user-select: none;
}

.orv-radio:last-child {
	border-bottom: none;
}

.orv-radio:hover {
	background-color: #fafafa;
}

/* Custom-styled native radio input (kept real/semantic for accessibility
   and native keyboard support -- just re-skinned, not hidden). */
.orv-radio-input {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 2px solid #c7c7c7;
	border-radius: 50%;
	position: relative;
	cursor: pointer;
	background: #fff;
	transition: border-color 0.15s ease;
}

.orv-radio-input:hover {
	border-color: #9a9a9a;
}

.orv-radio-input:checked {
	border-color: #2271b1;
}

.orv-radio-input:checked::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #2271b1;
	transform: translate(-50%, -50%);
}

.orv-radio-input:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.orv-radio-label {
	flex: 1 1 auto;
	font-size: 15px;
	line-height: 1.3;
	color: #1e1e1e;
}

/* Checkmark on the right, shown only for the checked option. Pure-CSS
   sibling selector so it stays correct even before/without JS running. */
.orv-radio-check {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #1e1e1e;
	opacity: 0;
	transform: scale(0.7);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.orv-radio-input:checked ~ .orv-radio-check {
	opacity: 1;
	transform: scale(1);
}

/* Disabled / unavailable option (kept struck-through and dimmed, matching
   the previous button-style treatment). */
.orv-radio.orv-disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.orv-radio.orv-disabled:hover {
	background-color: transparent;
}

.orv-radio.orv-disabled .orv-radio-label {
	text-decoration: line-through;
}

/* Briefly hidden while Orderable re-checks the matching variation after a
   radio selection (its own debounced check, separate from WooCommerce's),
   so the momentary "Sorry, that combination does not exist." state never
   flashes before the real result settles. See suppressAvailabilityFlash()
   / the orderable_variation_set listener in radio.js. */
.orderable-product__messages,
.woocommerce-variation-availability,
.single_variation_wrap .woocommerce-variation-availability {
	transition: opacity 0.15s ease;
}

.orv-suppress-availability {
	opacity: 0 !important;
}
