/**
 * Radio-button styling for selected variation attributes
 * (Width, Diamond Set, Diamond Type).
 *
 * The native <select> is kept in the DOM for WooCommerce but hidden here.
 */

/* Hide the native dropdown but keep it accessible to WooCommerce/JS. */
.hg-radio-variations__select {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.hg-radio-variations {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	width: 100%;
}

/* Each item shares the row equally so the group spans the full width. */
.hg-radio-variations__item {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Visually hide the actual radio input; the label is the clickable control. */
.hg-radio-variations__input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: -1px;
	pointer-events: none;
}

.hg-radio-variations__label {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	padding: 10px 8px;
	border: 1px solid #cfcfcf;
	border-radius: 0;
	background: #fff;
	color: #222;
	font-size: 14px;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
	user-select: none;
}

.hg-radio-variations__label:hover {
	border-color: #999;
}

/* Selected state. */
.hg-radio-variations__input:checked + .hg-radio-variations__label,
.hg-radio-variations__item.is-selected .hg-radio-variations__label {
	border-color: #222;
	background: #222;
	color: #fff;
}

/* Keyboard focus visibility. */
.hg-radio-variations__input:focus-visible + .hg-radio-variations__label {
	outline: 2px solid #222;
	outline-offset: 2px;
}

/* Unavailable option for the current combination. */
.hg-radio-variations__input:disabled + .hg-radio-variations__label,
.hg-radio-variations__item.is-disabled .hg-radio-variations__label {
	opacity: 0.4;
	cursor: not-allowed;
	text-decoration: line-through;
}

.hg-radio-variations__item.is-disabled.is-selected .hg-radio-variations__label {
	text-decoration: none;
}
