.sigda-elastic-ordering {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	position: relative;
	flex: 0 0 auto !important;
	width: auto !important;
	max-width: 300px;
	margin: 0 !important;
}

.sigda-elastic-ordering__label {
	font-size: 14px;
	white-space: nowrap;
}

.sigda-elastic-ordering .sigda-native-catalog-filters__single-toggle {
	width: auto !important;
	min-width: 205px;
	min-height: 38px;
	margin: 0;
	padding: 7px 28px 7px 10px;
	border: 0;
	border-radius: 4px;
	background: #e7e7e7;
	color: #111;
	font: inherit;
	cursor: pointer;
}

/* The theme uses a flex toolbar. Prevent its generic flex children from
 * stretching the result counter and the custom ES ordering control. */
.wp-block-group:has(> .wc-block-product-results-count + .sigda-elastic-ordering) {
	flex-wrap: nowrap !important;
	align-items: center !important;
	gap: 20px !important;
}

.wp-block-group:has(> .wc-block-product-results-count + .sigda-elastic-ordering) > .wc-block-product-results-count {
	flex: 0 0 auto !important;
	width: auto !important;
	white-space: nowrap;
}

.sigda-elastic-ordering .sigda-native-catalog-filters__single-options {
	right: 0;
	left: auto;
	width: max-content;
	min-width: 220px;
}

.sigda-elastic-ordering .sigda-native-catalog-filters__single-options button {
	display: block;
	width: 100%;
	padding: 9px 12px;
	border: 0;
	background: #fff;
	color: #111;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.sigda-elastic-ordering .sigda-native-catalog-filters__single-options button:hover {
	background: #f2f2f2;
}

.sigda-elastic-pagination-wrap {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 22px 0 36px;
}

.sigda-elastic-pagination {
	min-width: 44px;
	min-height: 44px;
	margin: 0;
	padding: 0 12px 4px;
	border: 1px solid #d4d4d4;
	border-radius: 6px;
	background: #fff;
	color: #111;
	font: 42px/1 Arial, sans-serif;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.sigda-elastic-pagination:hover,
.sigda-elastic-pagination:focus-visible {
	border-color: #fc8001;
	background: #fff7ef;
	color: #fc8001;
	outline: none;
}

.sigda-elastic-pagination:disabled {
	background: #fff;
	color: #111;
	cursor: not-allowed;
	opacity: 0.45;
}


@media (max-width: 782px) {
	.wp-block-group:has(> .wc-block-product-results-count + .sigda-elastic-ordering) {
		box-sizing: border-box;
		gap: 8px !important;
		min-width: 0;
		padding-right: 4px;
	}

	.sigda-elastic-ordering {
		gap: 5px;
		min-width: 0;
		max-width: calc(100vw - 160px);
		margin-left: auto !important;
	}

	.sigda-elastic-ordering__label {
		align-self: center;
		font-size: 14px;
		line-height: 1.25;
	}

	.sigda-elastic-ordering .sigda-native-catalog-filters__single-toggle {
		box-sizing: border-box;
		width: 150px !important;
		min-width: 0 !important;
		max-width: calc(100vw - 210px);
		padding-right: 22px;
		font-size: 10px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}
