.uversa-flex-length {
	margin: var(--uversa-block-margin-top, 0) 0 var(--uversa-block-margin-bottom, 18px);
}

.uversa-flex-length label {
	display: block;
	margin-bottom: 7px;
	font-weight: 600;
	color: var(--uversa-label-color, #222);
	font-size: var(--uversa-label-font-size, 16px);
}

.uversa-flex-length label span {
	color: #f9b000;
}

.uversa-flex-length input {
	width: 180px;
	max-width: 100%;
	padding: 10px 12px;
	border: var(--uversa-border-width, 1px) solid var(--uversa-input-border, #777);
	border-radius: var(--uversa-input-radius, 4px);
	font-size: 16px;
	background: var(--uversa-input-bg, #fff);
	color: var(--uversa-input-color, #222);
	box-sizing: border-box;
}

.uversa-flex-length input:focus {
	outline: none;
	border-color: var(--uversa-focus-color, #f9b000);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--uversa-focus-color, #f9b000) 20%, transparent);
}

.uversa-flex-length input.uversa-invalid {
	border: 2px solid #c62828;
}

.uversa-flex-validation {
	display: none;
	margin-top: 6px;
	color: #c62828;
	font-size: 14px;
}

.uversa-flex-validation.is-visible {
	display: block;
}

button.uversa-flex-label-active {
	position: relative;
	min-width: 135px;
}

button.uversa-flex-label-active::after {
	content: attr(data-uversa-label);
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: inherit;
	color: inherit;
	border-radius: inherit;
	pointer-events: none;
}

.uversa-flex-integer-notice {
	display: none;
	margin-top: 6px;
	font-size: 14px;
	color: #b42318;
}

.uversa-flex-integer-notice.is-visible {
	display: block;
}


/* VIA: eigener Größen-Selector */

/* Die nativen WooCommerce-Größen werden nur optisch ausgeblendet. */
.uversa-via-size-enhanced
.wc-block-product-filter-chips__items {
	display: none !important;
}

/* Nativen Größenbutton unabhängig von WooCommerce-Wrappern ausblenden. */
.uversa-native-size-option {
	display: none !important;
}

/* Eigene Größenbuttons */
.uversa-via-size-options {
	display: flex;
	flex-wrap: wrap;
	gap: var(--uversa-option-gap, 8px);
	margin-top: var(--uversa-label-option-gap, 10px);
}

.uversa-via-size-option {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 38px;
	padding: var(--uversa-padding-y, 8px) var(--uversa-padding-x, 14px);
	border: var(--uversa-border-width, 1px) solid var(--uversa-option-border, #777);
	border-radius: var(--uversa-border-radius, 0);
	background: var(--uversa-option-bg, #fff);
	color: var(--uversa-option-color, #222);
	font: inherit;
	font-size: var(--uversa-option-font-size, 16px);
	font-weight: var(--uversa-option-font-weight, 400);
	line-height: 1.2;
	cursor: pointer;
	box-sizing: border-box;
}

.uversa-via-size-option:not(.is-selected):hover {
	background: var(--uversa-hover-bg, #f3f3f3) !important;
	border-color: var(--uversa-hover-border, #f9b000) !important;
	color: var(--uversa-hover-color, #111) !important;
	box-shadow: inset 0 0 0 var(--uversa-border-width, 1px) var(--uversa-hover-border, #f9b000) !important;
}

/* Aktive Größe */
.uversa-via-size-option.is-selected {
	background: var(--uversa-selected-bg, #111);
	border-color: var(--uversa-selected-border, #111);
	color: var(--uversa-selected-color, #fff);
}

/* Fokus */
.uversa-via-size-option:focus-visible {
	outline: 2px solid var(--uversa-focus-color, #f9b000);
	outline-offset: 2px;
}

/* Gutenberg-Block: Styling der nativen WooCommerce-Variantenauswahl. */
.uversa-flex-styled .uversa-size-attribute {
	margin-bottom: var(--uversa-group-gap, 18px) !important;
}

.uversa-flex-styled .uversa-size-attribute .wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute-name,
.uversa-flex-styled .uversa-length-attribute .wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute-name {
	display: block;
	margin: 0 0 var(--uversa-label-option-gap, 10px) !important;
	color: var(--uversa-label-color, #222) !important;
	font-size: var(--uversa-label-font-size, 16px) !important;
	font-weight: var(--uversa-label-font-weight, 400) !important;
}

.uversa-flex-styled .uversa-size-attribute .uversa-via-size-options {
	margin-top: 0;
}

.uversa-flex-styled .uversa-length-attribute .wc-block-product-filter-chips__items {
	display: flex;
	flex-wrap: wrap;
	gap: var(--uversa-option-gap, 8px) !important;
}

.uversa-flex-styled .uversa-length-attribute button {
	-webkit-tap-highlight-color: transparent;
	user-select: none;
	min-height: 38px;
	padding: var(--uversa-padding-y, 8px) var(--uversa-padding-x, 14px) !important;
	border: var(--uversa-border-width, 1px) solid var(--uversa-option-border, #777) !important;
	border-radius: var(--uversa-border-radius, 0) !important;
	background: var(--uversa-option-bg, #fff) !important;
	color: var(--uversa-option-color, #222) !important;
	font-size: var(--uversa-option-font-size, 16px) !important;
	font-weight: var(--uversa-option-font-weight, 400) !important;
	box-sizing: border-box;
}

.uversa-flex-styled .uversa-length-attribute button[aria-checked="true"] {
	background: var(--uversa-selected-bg, #111) !important;
	border-color: var(--uversa-selected-border, #111) !important;
	color: var(--uversa-selected-color, #fff) !important;
}

.uversa-flex-styled .uversa-length-attribute button:focus-visible {
	outline: 2px solid var(--uversa-focus-color, #f9b000) !important;
	outline-offset: 2px;
}

/* Vorschau im Website-Editor. */
.uversa-flexible-length-editor-preview {
	padding: 0;
	background: transparent;
}

.uversa-flexible-length-editor-preview .uversa-preview-size-group {
	margin-bottom: var(--uversa-group-gap, 18px);
}

.uversa-flexible-length-editor-preview .uversa-preview-label {
	margin-bottom: var(--uversa-label-option-gap, 10px);
	color: var(--uversa-label-color, #222);
	font-size: var(--uversa-label-font-size, 16px);
	font-weight: var(--uversa-label-font-weight, 400);
}

.uversa-flexible-length-editor-preview .uversa-preview-options {
	display: flex;
	flex-wrap: wrap;
	gap: var(--uversa-option-gap, 8px);
}

.uversa-flexible-length-editor-preview .uversa-preview-custom-length {
	margin: var(--uversa-block-margin-top, 0) 0 var(--uversa-block-margin-bottom, 18px);
}

.uversa-flexible-length-editor-preview .uversa-preview-custom-length label {
	display: block;
	margin-bottom: 7px;
	color: var(--uversa-label-color, #222);
	font-size: var(--uversa-label-font-size, 16px);
	font-weight: 600;
}

.uversa-flexible-length-editor-preview .uversa-preview-custom-length label span {
	color: var(--uversa-focus-color, #f9b000);
}

.uversa-flexible-length-editor-preview .uversa-preview-custom-length input {
	width: 180px;
	max-width: 100%;
	padding: 10px 12px;
	border: var(--uversa-border-width, 1px) solid var(--uversa-input-border, #777);
	border-radius: var(--uversa-input-radius, 4px);
	background: var(--uversa-input-bg, #fff);
	color: var(--uversa-input-color, #222);
	font-size: 16px;
	box-sizing: border-box;
}

/* v2.4.2: einheitliche Regeln für Editor und alle WooCommerce-Attribute. */
.uversa-flex-styled .uversa-option-attribute {
	display: block !important;
	margin: 0 0 var(--uversa-group-gap, 18px) !important;
	padding: 0 !important;
	row-gap: 0 !important;
}

.uversa-flex-styled .uversa-option-attribute .wp-block-woocommerce-add-to-cart-with-options-variation-selector-attribute-name {
	display: block !important;
	margin: 0 0 var(--uversa-label-option-gap, 10px) !important;
	padding: 0 !important;
	color: var(--uversa-label-color, #222) !important;
	font-family: inherit !important;
	font-size: var(--uversa-label-font-size, 16px) !important;
	font-style: normal !important;
	font-weight: var(--uversa-label-font-weight, 400) !important;
	line-height: 1.4 !important;
}

.uversa-flex-styled .uversa-option-attribute .wc-block-product-filter-chips__items,
.uversa-flex-styled .uversa-option-attribute .uversa-via-size-options {
	display: flex;
	flex-wrap: wrap;
	gap: var(--uversa-option-gap, 8px) !important;
	margin: 0 !important;
	padding: 0 !important;
}

.uversa-flex-styled .uversa-via-size-enhanced .wc-block-product-filter-chips__items {
	display: none !important;
}

.uversa-flex-styled .uversa-option-attribute button,
.uversa-flex-styled .uversa-option-attribute button * {
	font-family: inherit !important;
	font-size: var(--uversa-option-font-size, 16px) !important;
	font-style: normal !important;
	font-weight: var(--uversa-option-font-weight, 400) !important;
	line-height: 1.2 !important;
}

.uversa-flex-styled .uversa-option-attribute button {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: var(--uversa-padding-y, 8px) var(--uversa-padding-x, 14px) !important;
	border: var(--uversa-border-width, 1px) solid var(--uversa-option-border, #777) !important;
	border-radius: var(--uversa-border-radius, 0) !important;
	background: var(--uversa-option-bg, #fff) !important;
	color: var(--uversa-option-color, #222) !important;
	box-sizing: border-box !important;
	transition: background-color .18s ease, color .18s ease, border-color .18s ease !important;
}

.uversa-flex-styled .uversa-option-attribute button:not(.uversa-via-size-option):not([aria-checked="true"]):hover,
.uversa-flex-styled .uversa-option-attribute .uversa-via-size-option:not(.is-selected):hover {
	background: var(--uversa-hover-bg, #f3f3f3) !important;
	border-color: var(--uversa-hover-border, #f9b000) !important;
	color: var(--uversa-hover-color, #111) !important;
	box-shadow: inset 0 0 0 var(--uversa-border-width, 1px) var(--uversa-hover-border, #f9b000) !important;
	outline: var(--uversa-border-width, 1px) solid var(--uversa-hover-border, #f9b000) !important;
	outline-offset: calc(-1 * var(--uversa-border-width, 1px)) !important;
}

.uversa-flex-styled .uversa-option-attribute button:not(.uversa-via-size-option):not([aria-checked="true"]):hover::before,
.uversa-flex-styled .uversa-option-attribute button:not(.uversa-via-size-option):not([aria-checked="true"]):hover::after,
.uversa-flex-styled .uversa-option-attribute .uversa-via-size-option:not(.is-selected):hover::before,
.uversa-flex-styled .uversa-option-attribute .uversa-via-size-option:not(.is-selected):hover::after {
	border-color: var(--uversa-hover-border, #f9b000) !important;
	outline-color: var(--uversa-hover-border, #f9b000) !important;
}

.uversa-flex-styled .uversa-option-attribute button:not(.uversa-via-size-option):not([aria-checked="true"]):hover * {
	color: var(--uversa-hover-color, #111) !important;
	border-color: var(--uversa-hover-border, #f9b000) !important;
	outline-color: var(--uversa-hover-border, #f9b000) !important;
	box-shadow: none !important;
}

.uversa-flex-styled .uversa-option-attribute button:not(.uversa-via-size-option):not([aria-checked="true"]):hover *::before,
.uversa-flex-styled .uversa-option-attribute button:not(.uversa-via-size-option):not([aria-checked="true"]):hover *::after {
	border-color: var(--uversa-hover-border, #f9b000) !important;
	outline-color: var(--uversa-hover-border, #f9b000) !important;
	box-shadow: none !important;
}

.uversa-flex-styled .uversa-option-attribute button[aria-checked="true"],
.uversa-flex-styled .uversa-option-attribute button[aria-checked="true"] *,
.uversa-flex-styled .uversa-option-attribute .uversa-via-size-option.is-selected,
.uversa-flex-styled .uversa-option-attribute .uversa-via-size-option.is-selected * {
	background: var(--uversa-selected-bg, #111) !important;
	border-color: var(--uversa-selected-border, #111) !important;
	color: var(--uversa-selected-color, #fff) !important;
}

.uversa-flexible-length-editor-preview {
	font-family: inherit;
}

.uversa-flexible-length-editor-preview .uversa-preview-group {
	margin: 0 0 var(--uversa-group-gap, 18px);
}

.uversa-flexible-length-editor-preview .uversa-preview-label {
	margin: 0 0 var(--uversa-label-option-gap, 10px);
	padding: 0;
	font-family: inherit;
	font-size: var(--uversa-label-font-size, 16px);
	font-style: normal;
	font-weight: var(--uversa-label-font-weight, 400);
	line-height: 1.4;
}

.uversa-flexible-length-editor-preview .uversa-preview-option.is-selected {
	font-weight: var(--uversa-option-font-weight, 400);
}
