/* Fix the z-index value for the mobile sidebar version */
@media (max-width: 767px) {
	.select2-dropdown {
		z-index: 1960;
	}
}

.select2-container {
	/*min-width: 200px !important;*/
	padding: 0;
}

.select2-container--default .select2-selection--single {
	position: relative;
	height: 40px;
	padding: 6px;
}

/* Select arrow (Icon) */
.select2-container--default .select2-selection--single .select2-selection__arrow {
	position: absolute;
	height: 35px;
}

/* Opened */
.select2-container--default .select2-selection--single, .select2-dropdown {
	background-color: #fff;
	border: 1px solid #ddd;
}

.select2-container--default .select2-selection--single {
	border-radius: 4px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
	color: #555;
}

.select2-dropdown {
	box-shadow: 0 4px 3px #ededed;
	padding: 8px;
}

.select2-results__option {
	padding: 8px 10px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
	background-color: #fafafa;
	color: #555;
}

.search-row .select2-container--default .select2-selection--single {
	font-size: 16px;
}
.serp-search-bar .select2-container--default .select2-selection--single {
	height: 45px;
	padding: 8px;
}
.serp-search-bar .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 40px;
}
.serp-search-bar .select2-container--default .select2-selection--single {
	font-size: 16px;
}

.select2-container--default.is-invalid .select2-selection--multiple.is-invalid {
	border-color: #dc3545;
}

.select2-container--default.is-invalid.select2-container--focus {
	border-color: #dc3545;
	box-shadow: 0 1px 0 #dc3545, 0 -1px 0 #dc3545, -1px 0 0 #dc3545, 1px 0 0 #dc3545;
}

.is-invalid .select2-selection {
	border-color: #dc3545 !important;
}

/* ═══ Multiple selection (Tags) - fix layout ═══
   Bootstrap 5 theme sets rendered to overflow:hidden + height:28px,
   causing the search field to overflow below the selection box.
   Fix: allow rendered to grow, increase selection min-height. */
.select2-container--bootstrap-5 .select2-selection--multiple {
	min-height: calc(1.5em + 0.75rem + 2px) !important;
}
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
	display: flex !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	gap: 4px !important;
	overflow: visible !important;
	min-height: calc(1.5em + 0.75rem) !important;
	padding: 0.375rem 0.75rem !important;
}
.select2-container--bootstrap-5 .select2-search--inline {
	display: flex !important;
	flex: 1 1 auto !important;
}
.select2-container--bootstrap-5 .select2-search--inline .select2-search__field {
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	min-height: 1.5em !important;
}

/* InoLeap: keep the select2 dropdown anchored inside its field wrapper.
   Document-level offset math misplaces the popup when the page uses CSS
   zoom, and the autofocus scroll then jumps the page. Only applies to
   fields initialized with dropdownCssClass 'ino-s2-dd'. */
.select2-container--open:has(> .ino-s2-dd) {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	display: block !important;
	width: 100% !important;
}
.select2-container--open:has(> .ino-s2-dd) > .select2-dropdown,
.select2-dropdown.ino-s2-dd {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	z-index: 1051;
}
