/**
 * DDG Mirror Substrate – Selector styling.
 *
 * Design tokens match ddg-variable-product.css:
 *   - Substrate row: same 2-column grid as other variation rows.
 *   - Option chips: same height/padding/font/colour as .ddg-variation-span.
 *   - Two chips always side-by-side (1fr 1fr grid inside the value cell).
 */

/* ── Substrate row — matches .ddg-variation-row--size-chooser layout ────── */
.single-product .ddg-variation-row--substrate {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 1rem 0.75rem;
	border-bottom: 1px solid #ececec;
	width: 100%;
}

/* ── Label row — same style as "Chọn kích thước" ────────────────────────── */
.ddg-substrate-label-row {
	width: 100%;
	padding: 0 0 0.75rem;
	text-align: center;
	font-weight: 600;
	font-size: 1rem;
	color: #2a2a2a;
	line-height: 1.35;
}

/* ── Options container — always 2 equal columns, centered ───────────────── */
.ddg-substrate-options {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	width: 100%;
	max-width: 460px;
}

/* ── Individual option chip — identical to .ddg-variation-span ──────────── */
.ddg-substrate-option {
	display: flex;
	width: 100%;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-height: 2.75rem;
	padding: 0.5rem 0.75rem;
	border: 1.5px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	color: #222;
	cursor: pointer;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	user-select: none;
	-webkit-user-select: none;
	transition: box-shadow 0.2s ease, transform 0.15s ease,
	            border-color 0.15s ease, background 0.15s ease;
}

.ddg-substrate-option:hover:not(.is-selected) {
	border-color: #c8c8c8;
	background: #fafafa;
	color: #222;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
	transform: translateY(-1px);
}

/* Visually hidden radio — keeps native behaviour, hidden from view */
.ddg-substrate-option input[type="radio"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
	opacity: 0;
	pointer-events: none;
}

/* Selected state — mirrors .ddg-variation-span.is-selected */
.ddg-substrate-option.is-selected {
	border-color: #002855;
	background: #002855;
	color: #fff;
	box-shadow: 0 2px 10px rgba(0, 40, 85, 0.22);
	transform: none;
}

.ddg-substrate-option.is-selected:hover {
	border-color: #002855;
	background: #002855;
	color: #fff;
	box-shadow: 0 2px 10px rgba(0, 40, 85, 0.22);
	transform: none;
}

/* Keyboard focus ring */
.ddg-substrate-option:focus-within {
	outline: 2px solid #002855;
	outline-offset: 3px;
}
