/**
 * Select2 field styles for Elementor atomic form (e-form-select).
 */

.e-form-base .elementor-field-type-select.cfef-atomic-field-group,
form[data-e-type="e-form"] .elementor-field-type-select.cfef-atomic-field-group {
	width: 100%;
}

.e-form-base .elementor-field-type-select select.cfef-atomic-select2,
form[data-e-type="e-form"] .elementor-field-type-select select.cfef-atomic-select2 {
	width: 100%;
	max-width: 100%;
}

.e-form-base .elementor-field-type-select .select-caret-down-wrapper,
form[data-e-type="e-form"] .elementor-field-type-select .select-caret-down-wrapper {
	display: none !important;
}

.e-form-base .elementor-field-type-select span.select2.select2-container.select2-container--default,
form[data-e-type="e-form"] .elementor-field-type-select span.select2.select2-container.select2-container--default {
	width: 100% !important;
	max-width: 100% !important;
}

.e-form-base .elementor-field-type-select .select2-container--default .select2-selection--multiple,
form[data-e-type="e-form"] .elementor-field-type-select .select2-container--default .select2-selection--multiple {
	width: 100%;
	box-sizing: border-box;
	min-height: 40px !important;
	padding-right: 28px !important;
}

.e-form-base .elementor-field-type-select .select2-container--default .select2-selection--multiple .select2-selection__rendered,
form[data-e-type="e-form"] .elementor-field-type-select .select2-container--default .select2-selection--multiple .select2-selection__rendered {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	width: 100%;
	margin: 0;
	padding: 0;
}

.e-form-base .elementor-field-type-select .select2-container--default .select2-selection--multiple .select2-search--inline,
form[data-e-type="e-form"] .elementor-field-type-select .select2-container--default .select2-selection--multiple .select2-search--inline {
	flex: 1 1 auto;
	min-width: 2em;
}

/* Caret on the container — not on .select2-selection--multiple (avoids breaking inline search layout). */
.e-form-base .elementor-field-type-select .select2-container--default:has(.select2-selection--multiple)::after,
form[data-e-type="e-form"] .elementor-field-type-select .select2-container--default:has(.select2-selection--multiple)::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 8px;
	width: 0;
	height: 0;
	margin-top: -2px;
	border-style: solid;
	border-width: 5px 4px 0 4px;
	border-color: #888 transparent transparent transparent;
	pointer-events: none;
	z-index: 1;
}

.e-form-base .elementor-field-type-select .select2-container--default:has(.select2-selection--multiple.select2-selection--clearable)::after,
form[data-e-type="e-form"] .elementor-field-type-select .select2-container--default:has(.select2-selection--multiple.select2-selection--clearable)::after {
	right: 28px;
}

.e-form-base .elementor-field-type-select .select2-container--default.select2-container--open:has(.select2-selection--multiple)::after,
form[data-e-type="e-form"] .elementor-field-type-select .select2-container--default.select2-container--open:has(.select2-selection--multiple)::after {
	border-width: 0 4px 5px 4px;
	border-color: transparent transparent #888 transparent;
}

.e-form-base .elementor-field-type-select span.select2-selection.select2-selection--single.select2-selection--clearable,
form[data-e-type="e-form"] .elementor-field-type-select span.select2-selection.select2-selection--single.select2-selection--clearable,
.e-form-base .elementor-field-type-select .select2-container--default .select2-selection--single,
form[data-e-type="e-form"] .elementor-field-type-select .select2-container--default .select2-selection--single {
	min-height: 40px !important;
	padding-top: 6px !important;
}

.e-form-base .elementor-field-type-select .select2-container--default .select2-selection--single .select2-selection__clear,
form[data-e-type="e-form"] .elementor-field-type-select .select2-container--default .select2-selection--single .select2-selection__clear {
	margin-right: 25px !important;
	display: flex;
	align-items: center;
	padding-right: 0 !important;
	box-shadow: none;
}

.e-form-base .elementor-field-type-select button.select2-selection__clear span,
form[data-e-type="e-form"] .elementor-field-type-select button.select2-selection__clear span {
	margin-right: -5px !important;
	color: red;
}

.e-form-base .elementor-field-type-select .select2-container--default .select2-selection--single .select2-selection__placeholder,
form[data-e-type="e-form"] .elementor-field-type-select .select2-container--default .select2-selection--single .select2-selection__placeholder {
	font-family: var(--e-global-typography-text-font-family), sans-serif;
	font-weight: var(--e-global-typography-text-font-weight);
}

.e-form-base .elementor-field-type-select .select2-container .select2-search--inline .select2-search__field,
form[data-e-type="e-form"] .elementor-field-type-select .select2-container .select2-search--inline .select2-search__field { 
	min-width: 2em;
	max-width: 100%;
	height: 28px !important;
	margin-top: 5px !important;
	font-family: var(--e-global-typography-text-font-family), sans-serif;
	font-weight: var(--e-global-typography-text-font-weight);
	padding: 0 0 0 2px;
	border: none !important;
	box-shadow: none !important;
	outline: none !important;
	background: transparent !important;
}

.e-form-base .elementor-field-type-select .select2-container .select2-selection--multiple .select2-selection__clear,
form[data-e-type="e-form"] .elementor-field-type-select .select2-container .select2-selection--multiple .select2-selection__clear {
	box-shadow: none !important;
	margin-top: 9px;
}

.e-form-base .elementor-field-type-select .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
form[data-e-type="e-form"] .elementor-field-type-select .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
	height: 100%;
}

body.elementor-editor-active .e-form-base .elementor-field-type-select .select2-container--default .select2-selection--multiple .select2-selection__choice__remove,
body.elementor-editor-active form[data-e-type="e-form"] .elementor-field-type-select .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
	position: unset;
}

body.elementor-editor-active .e-form-base .elementor-field-type-select .select2-container--default .select2-selection--multiple .select2-selection__clear,
body.elementor-editor-active form[data-e-type="e-form"] .elementor-field-type-select .select2-container--default .select2-selection--multiple .select2-selection__clear {
	margin-top: 9px;
}

