/* -- custom-theme -- */

.select2-container--custom-theme {

	.select2-selection--single {
		height: 3rem;
		border: 0.0625px solid #ABB6C2;
		border-radius: 0.25rem;
		background-color: #fff;
		display: flex;
		padding: 0 1rem;

		&.not_valid{
			border: 1px solid #EC9582; 
			-webkit-box-shadow: 0px 0px 3px 0px #EC9582; 
			box-shadow: 0px 0px 3px 0px #EC9582;
		}

		&.disabled{
			border: 1px solid #E9EBED;
		}

		~.not_empty{
			border: 0.0625px solid #E9EBED;
		}

		&:focus-visible {
			outline: none;
		}

		.select2-selection__rendered {
			color: #333;
			padding: 0;
			display: flex;
			flex: 1 1 auto;
			align-items: center;

			> * {
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}
		}

		.select2-selection__clear {
			transition: all 0.2s ease-in-out;
			display: flex;
			flex: 0 0 0.75rem;
			align-items: center;
			margin-right: 5px;

			> * {
				all: revert;
				display: none !important;
			}

			&:before {
				font-size: 0.75rem;
				content: "\2716";
				flex: 1;
				display: flex;
				flex-direction: column;
				align-items: center;
			}

			&:hover {
				rotate: 0.5turn;
			}

			@media print {
				display: none;
			}
		}

		.select2-selection__arrow {
			transition: all 0.2s ease-in-out;
			display: flex;
			flex: 0 0 0.75rem;
			align-items: center;

			> * {
				all: revert;
				display: none !important;
			}

			&:before {
				font-family: bootstrap-icons;
				font-weight: bold;
				font-size: 0.75rem;
				content: "\25BC";
				flex: 1;
				display: flex;
				flex-direction: column;
				align-items: center;
			}

			@media print {
				display: none;
			}
		}

		&:hover {
			.select2-selection__arrow {
				color: #6D7885;
			}
		}
	}

	.select2-selection--multiple{
		min-height: 3.1rem;
		border: 1px solid #ABB6C2;
		border-radius: 0.25rem;
		background-color: #fff;
		display: flex;
		flex-direction: column-reverse;
		justify-content: space-between;
		padding: 0.7rem 1rem 0.8rem 1rem;
		width: 100%;

		&.not_valid{
			border: 1px solid #EC9582; 
			-webkit-box-shadow: 0px 0px 3px 0px #EC9582; 
			box-shadow: 0px 0px 3px 0px #EC9582;
		}

		&.disabled{
			border: 1px solid #E9EBED;
		}

		&:focus-visible {
			outline: none;
		}

		textarea:disabled,
		textarea[readonly] {
			background-color: #fff;
		}

		.select2-selection__rendered{
			width: 100%;			

			.select2-selection__choice{
				border: 1px solid #E9EBED;
				border-radius: 3px;
				display: flex;
				gap: 0.3rem;

				.select2-selection__choice__remove{
					padding: 4px 8px;
				}

				.select2-selection__choice__display{
					line-height: 2rem;
				}
			}
		}

		.select2-search.select2-search--inline{
			display: flex;
			
			.select2-selection__clear{
				margin: 0 0.5rem 0.5rem 0.5rem; 
			}
		}
	}

	&.select2-container--focus {
		.select2-selection--single {
			padding: 0 1rem;
		}
	}

	&.select2-container--open {
		.select2-selection--single {
			.select2-selection__arrow {
				rotate: 0.5turn;
			}
		}
	}

	.select2-dropdown {
		border: 0.0625rem solid #E9EBED;
		border-radius: 0;

		.select2-search {
			padding: 0.125rem;

			.select2-search__field {
				padding: 0.7rem 1rem;
				line-height: 1rem;
			}
		}
		.select2-results {
			.select2-results__options {
				overflow: auto;

				.select2-results__option {
					font-size: 0.9rem;
					padding: 0.5rem 1rem;
					transition: background-color 0.2s ease-in-out;

					&.select2-results__option--selected {
						background-color: #d0e0f0;
						padding: 0.5rem 1rem;

						&:after {
							color: #6D7885;
							content: "\2714" !important;
							font-size: 1rem !important;
							line-height: 1;
						}
					}

					&.select2-results__option--disabled{
						color: #6D7885;
						cursor: not-allowed;
					}

					&.select2-results__option--highlighted {
						background-color: #f0f0f0;
					}
				}
			}
		}
	}


	
}

.select2-hidden-accessible.not_empty + .select2-container--custom-theme.select2 .select2-selection--single,
.select2-hidden-accessible.not_empty + .select2-container--custom-theme.select2 .select2-selection--multiple {
	border-color: #E9EBED; 
}

.select2-hidden-accessible[disabled] + .select2-container--custom-theme.select2 .select2-selection--single,
.select2-hidden-accessible[disabled] + .select2-container--custom-theme.select2 .select2-selection--multiple {
	background-color:  #F5F5F5;
}

.select2-hidden-accessible[disabled] + .select2-container--custom-theme.select2 .select2-search__field {
	background-color:  #F5F5F5;
}