/* Multiline product options, scoped to the enhanced variation form. */
.single-product form.variations_form.esp-variation-selects table.variations,
.single-product form.variations_form.esp-variation-selects table.variations tbody {
	display: block;
	width: 100%;
}

.single-product form.variations_form.esp-variation-selects table.variations tr {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
	gap: 6px;
	width: 100%;
	margin: 0 0 14px;
}

.single-product form.variations_form.esp-variation-selects table.variations th.label,
.single-product form.variations_form.esp-variation-selects table.variations td.value {
	display: block;
	width: 100%;
	min-width: 0;
	padding: 0 !important;
	text-align: start;
}

.single-product form.variations_form.esp-variation-selects table.variations th.label label {
	display: block;
	margin: 0 !important;
	padding: 0 !important;
	white-space: normal;
	overflow-wrap: anywhere;
}

.single-product form.variations_form.esp-variation-selects .esp-variation-select {
	display: block;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	font-family: inherit;
	font-size: 16px;
}

.single-product .esp-variation-select .select2-selection--single {
	height: auto;
	min-height: 48px;
	margin: 0;
	padding: 11px 40px 11px 12px;
	border: 1px solid #cfd8df;
	border-radius: 4px;
	background: #fff;
}

.single-product .esp-variation-select .select2-selection--single .select2-selection__rendered {
	padding: 0;
	color: var(--esp-ink, #111827);
	font-size: 16px;
	line-height: 1.5;
	white-space: normal;
	word-break: normal;
	overflow-wrap: anywhere;
	overflow: visible;
	text-overflow: clip;
}

.single-product .esp-variation-select .select2-selection--single .select2-selection__arrow {
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
}

.single-product .esp-variation-select .select2-selection--single:focus,
.single-product .esp-variation-select.select2-container--open .select2-selection--single {
	border-color: var(--esp-blue, #0875df);
	outline: 2px solid var(--esp-blue, #0875df);
	outline-offset: 2px;
}

.single-product .esp-variation-select.select2-container--disabled .select2-selection--single {
	background: #f3f4f6;
	cursor: not-allowed;
}

.single-product .esp-variation-select.select2-container--disabled .select2-selection__rendered {
	color: #6b7280;
}

.single-product form.variations_form.esp-variation-selects table.variations .reset_variations {
	display: block;
	width: fit-content;
	margin-top: 8px;
	line-height: 1.5;
}

/* SelectWoo attaches the popup to body, outside the product form. */
body.single-product > .select2-container:has(> .esp-variation-dropdown) {
	width: auto;
}

.esp-variation-dropdown {
	max-width: calc(100vw - 24px);
	border-color: #cfd8df;
	font-family: inherit;
	font-size: 16px;
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.esp-variation-dropdown .select2-results > .select2-results__options {
	max-height: min(320px, 50vh);
	overflow-x: hidden;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.esp-variation-dropdown .select2-results__option {
	min-height: 44px;
	padding: 10px 12px;
	font-size: 16px;
	line-height: 1.5;
	white-space: normal;
	word-break: normal;
	overflow-wrap: anywhere;
}
