﻿/* Highlight active result */
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-color);
}

/* Highlight color override (kept from yours) */
.select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-color);
}
/* When we use a header search, hide the inline chip search */
.select2-container.s2-with-dropdown-search .select2-search--inline {
    display: none;
}

/* Compact “(n)” summary on the closed control */
.select2-container .select2-selection--multiple.s2-has-count {
    position: relative;
}

.select2-container .select2-selection--multiple.s2-has-count .select2-selection__choice,
.select2-container .select2-selection--multiple.s2-has-count .select2-search--inline {
    display: none !important;
}

.select2-container .select2-selection--multiple.s2-has-count::before {
    content: "(" attr(data-count) ")";
    position: absolute;
    top: 50%;
    left: .5rem;
    transform: translateY(-50%);
    color: var(--bs-secondary-color);
    pointer-events: none;
    line-height: 1;
    border-left: none !important;
    border-top: none !important;
}

/* Optional: tighten checkbox rows inside results */
.select2-results__option .s2-option-row {
    gap: .5rem;
    line-height: 1.25;
}

.select2-results__option .form-check-input {
    margin-top: 0; /* avoids vertical misalignment in some themes */
}

/*Fix select input for chart filters in separate task*/

/* Count-badge mode */
.select2-container.slm-count-mode .select2-selection--multiple .select2-selection__choice {
    display: none !important;
}

.select2-container.slm-count-mode .select2-selection--multiple .slm-count-badge {
    display: inline-block !important;
    margin-top: 4px;
    margin-left: 4px;
    padding: 0 6px;
    border-radius: 2px;
    background: #e9ecef;
    line-height: 1.6;
}

    .select2-container.slm-count-mode .select2-selection--multiple .slm-count-badge.is-empty {
        background: transparent;
        padding-left: 0;
        padding-right: 0;
        color: #6c757d;
    }
/* Hide Select2’s own placeholder node in count mode */
.select2-container.slm-count-mode .select2-selection--multiple .select2-selection__placeholder {
    display: none !important;
}

#select2-paginated-single-results > .select2-results__option {
    padding: 2px 4px !important;
    line-height: 1.15 !important;
}


#select2-paginated-single-results .s2-item-row {
    gap: .25rem;
}

.select2-container.select2-container--default.select2-container--open {
    z-index: 9999;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    inset-inline-end: 1.5rem !important;
}

  
.select-with-icon {
    position: relative;
}

.select-with-icon .select-with-icon__icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    z-index: 99999;
}
.select-list-wrapper[multiple="true"] .select2.select2-container {
    max-height: 2.27rem;
    overflow-y: auto;
}

.select-with-icon-left .select-with-icon__icon {
    left: 0.75rem;
}
.select-with-icon-left .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 1.75rem;
}


.select-with-icon-right .select-with-icon__icon {
    right: 1.75rem;
}
.select-with-icon-right .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-right: 1.75rem;
}

.select2-selection--multiple::before {
    content: "";
    position: absolute;
    right: 7px;
    top: 42%;
    border-top: 5px solid #888;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    cursor: pointer;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    font-size: unset !important;
}