/* Ensure Select2 matches Bootstrap 3 form-control */
.select2-container .select2-selection--single {
    height: 34px !important;  /* Bootstrap 3 input height */
    padding: 6px 12px !important;
    border: 1px solid var(--color80);
    border-radius: 4px;
    display: flex;
    align-items: center;  /* Center vertically */
}

/* Customize dropdown */
.select2-container .select2-dropdown {
    background-color: #ffffff !important;
    border: 1px solid var(--color80) !important;
    border-top: none !important;
    max-height: none !important;
}

/* Change selected option background */
.select2-container .select2-results__option--selected {
    background-color: var(--color30) !important;
    color: white !important;
}

/* Hover effect */
.select2-container .select2-results__option--highlighted {
    background-color: var(--color40) !important;
    color: white !important;
}

/* Center text inside the selection box */
.select2-container .select2-selection__rendered {
    line-height: 22px !important; /* Adjust text vertical position */
    padding-left: 0 !important;
    padding-right: 0 !important;
    color: #555;
}

/* Fix alignment of the placeholder */
.select2-container .select2-selection__placeholder {
    line-height: 22px !important;
    color: #6c757d !important; /* Placeholder color */
}

/* Customize dropdown arrow */
.select2-container .select2-selection__arrow b {
    margin-top: 0 !important;
}

.select2-container .select2-results>.select2-results__options {
    max-height: none;
    overflow-y: auto;
}

/* Match Select2 with Bootstrap 3 input fields */
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--multiple {
    border: 1px solid var(--color35) !important;
    border-radius: 4px !important;
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, 0.6);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 8px rgba(102, 175, 233, 0.6);
}
.select2-container .select2-selection--multiple {
    border: 1px solid var(--color80) !important;
    border-radius: 4px !important;
}

.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,
.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.select2-container .select2-search--inline .select2-search__field {
    margin-top: 7px !important;
}

/* Ensure selected items are aligned properly */
.select2-container .select2-selection--multiple .select2-selection__choice {
    background-color: var(--color20) !important;
    color: white !important;
    border-radius: 4px !important;
    border: none !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover,
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus {
    background-color: var(--color40);
    color: #fff;
    outline: none;
}