/*
	Application specific css file for Select2 plugin for jQuery
*/
.select2-container--bootstrap.select2 {
	width: 100%;
	line-height: 1.5;
	font-size: 1rem;
}

.select2-container--bootstrap :focus {
	outline: none;
}

.select2-container--bootstrap .select2-selection {
	height: auto;
	min-height: 38px;
	position: relative;
	overflow: hidden;
	
	border: 1px solid #ced4da;
	border-radius: 4px;
	background: transparent;
}

.select2-container--bootstrap .select2-selection .select2-selection__rendered {
	padding: .375rem 1.5rem .375rem .75rem;
	color: #495057;
	margin: 0 0 -.375rem 0;
	display: flex;
	flex-wrap: wrap;
	list-style: none;
}

.select2-container--bootstrap .select2-selection--multiple .select2-selection__choice {
	margin: 0 .5rem .375rem 0;
	padding: 0 .5em 0 0;
	line-height: 2;
	font-size: 75%;
	border-radius: .25rem;
	overflow: hidden;
	background-color: #007bff;
	color: #fff;
}

.select2-container--bootstrap .select2-selection--multiple .select2-selection__choice .select2-selection__choice__remove {
	height: 100%;
	display: inline-flex;
	padding: 0 .25rem 0 .375rem;
	margin-right: 0.125rem;
	cursor: pointer;
}

.select2-container--bootstrap .select2-selection--multiple .select2-selection__choice .select2-selection__choice__remove:hover {
	background-color: #0069d9;
}

.select2-container--bootstrap .select2-selection--multiple .select2-search--inline .select2-search__field {
	margin: 0;
}

/* BS outline-secondary */
.select2-container--bootstrap .select2-selection .select2-selection__clear {
	margin-right: .25rem;
	padding: 0 .25rem;
	border-radius: 1rem;
	border: 1px solid #6c757d;
	font-family: monospace;
	color: #6c757d;
	cursor: pointer;
}

.select2-container--bootstrap .select2-selection .select2-selection__clear:hover,
.select2-container--bootstrap .select2-selection .select2-selection__clear:not(:disabled):not(.disabled):active {
	color: #fff;
	background-color: #6c757d;
	border-color: #6c757d;
}

.select2-container--bootstrap .select2-selection .select2-selection__arrow {
	height: 100%;
	width: 1.5rem;
	padding: .375rem 0;
	position: absolute;
	top: 0;
	right: 0;
	
	border-left: 1px solid #ced4da;
	text-align: center;
}

.select2-container--bootstrap .select2-selection .select2-selection__arrow b {
	background: none;
	font-size: .95rem;
	font-weight: 900;
	font-family: 'Font Awesome 5 Free';
	color: #6c757d;
}

.select2-container--bootstrap .select2-selection .select2-selection__arrow b:before {
	content: '\f0d7';
}

/* Search input */
.select2-container--bootstrap .select2-search--dropdown .select2-search__field {
	width: 100%;
	padding: 0.375rem 0.75rem;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	background-color: #fff;
	background-clip: padding-box;
	border: 1px solid #ced4da;
	border-radius: 0.25rem;
}

.select2-container--bootstrap.select2-container--open.select2-container--above .select2-selection,
.select2-container--bootstrap.select2-container--open.select2-container--above .select2-selection--multiple {
	border-top-left-radius: 0;
	border-top-right-radius: 0;
}

.select2-container--bootstrap.select2-container--open.select2-container--below .select2-selection,
.select2-container--bootstrap.select2-container--open.select2-container--below .select2-selection--multiple {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

.select2-container--bootstrap .select2-dropdown {
	border: 1px solid rgba(0, 0, 0, .15);
	color: #212529;
}

.select2-container--bootstrap .select2-dropdown.select2-dropdown--above {
	border-bottom: 0;
}

.select2-container--bootstrap .select2-dropdown.select2-dropdown--below {
	border-top: 0;
}

.select2-container--bootstrap .select2-results__option,
.select2-container--bootstrap .select2-results__group {
	display: list-item;
	padding: .25rem 1.5rem;
}

.select2-container--bootstrap .select2-results__option[aria-selected=true] {
	text-decoration: line-through;
}

.select2-container--bootstrap .select2-results__option[role='group'] {
	margin-top: .5rem;
	padding: .25rem 0;
	border-top: 1px solid #e9ecef;
}

.select2-container--bootstrap .select2-results__option[role='group'] .select2-results__group {
	margin-bottom: .1rem;
}

.select2-container--bootstrap .select2-results__options--nested .select2-results__option {
}

/** Selected */
.select2-container--bootstrap .select2-results__option--highlighted[aria-selected] {
	color: #fff;
	background: #007bff;
}

/** Disabled */
.select2-container--bootstrap .select2-results__option[aria-disabled='true'] {
	color: #6c757d;
	background-color: transparent;
}

/** Select2 in Form group **/
.form-group .select2-container--bootstrap {
	position: relative;
	z-index: 2;
	width: 100% !important;
	margin-bottom: 0;
	display: table;
	table-layout: fixed;
}

/** Select2 in input group **/
.input-group > .select2-container--bootstrap {
	flex: 1 1 auto;
	width: 1% !important;
}

.input-group > .select2-container--bootstrap:not(:last-child) .select2-selection {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
}

.form-inline .select2-container--bootstrap.select2 {
	display: inline-block;
	min-width: 80px;
	vertical-align: middle;
}

/* Add readonly feature */
select[readonly] + .select2-container--bootstrap {
	pointer-events: none;
	touch-action: none;
}

.was-validated select:valid + .select2-container--bootstrap .select2-selection {
	border-color: #28a745;
}

.was-validated select:invalid + .select2-container--bootstrap .select2-selection {
	border-color: #dc3545;
}
