/* Select2 Custom Styling */
.select2-container {
    min-width: 180px;
}

.select2-container--default .select2-selection--multiple {
    background-color: #edc900 !important;
    border: none !important;
    border-radius: 0 !important;
    min-height: 45px !important;
    padding: 0 35px 0 10px !important;
    /* Spacing for the clear button on the right */
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    font-family: "Work Sans", sans-serif !important;
    font-weight: 600 !important;
    color: #000 !important;
}

.select2-container .select2-selection__placeholder {
    color: #000 !important;
    font-family: "Work Sans", sans-serif !important;
    font-weight: 600 !important;
    font-size: 16px !important;
}

.select2-container .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    overflow: hidden;
    white-space: nowrap;
}

/* Selected Item/Choice Styling */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: rgba(0, 0, 0, 0.1) !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 8px 0 0 !important;
    padding: 2px 8px !important;
    color: #000 !important;
    font-family: "Work Sans", sans-serif !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    display: flex !important;
    align-items: center !important;
    flex-direction: row-reverse !important;
}

/* Choice remove button */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    background: none !important;
    border: none !important;
    color: #000 !important;
    margin-left: 8px !important;
    font-weight: bold !important;
    font-size: 18px !important;
    padding: 0 !important;
    position: static !important;
    line-height: 1;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #ff0000 !important;
}

/* Hide all choices except the first one */
.select2-container .select2-selection--multiple .select2-selection__choice:nth-child(n+2) {
    display: none !important;
}

/* Multi-selection clear button (at the far right) */
.select2-container--default .select2-selection--multiple .select2-selection__clear {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 20px !important;
    color: #000 !important;
    cursor: pointer;
    z-index: 2;
}

/* Dynamic Counter Badge - now positioned inside the bar */
.select2-selection__rendered[data-count-more]:not([data-count-more="0"])::after {
    content: "+" attr(data-count-more);
    background-color: #028BA2 !important;
    color: #fff !important;
    padding: 0 6px !important;
    margin-left: 5px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    display: inline-flex !important;
    align-items: center;
    height: 20px;
    border-radius: 2px;
}

/* Dropdown Results Styling */
.select2-dropdown {
    background-color: #edc900 !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
}

.select2-results__option {
    font-family: "Work Sans", sans-serif !important;
    font-weight: 600 !important;
    padding: 10px 15px !important;
    font-size: 15px !important;
    color: #000 !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #008ba2 !important;
    color: #fff !important;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

/* "Selected" indicator in dropdown */
.select2-container--default .select2-results__option[aria-selected="true"]::after {
    content: "×";
    float: right;
    font-weight: bold;
    color: #028BA2;
    font-size: 20px;
    line-height: 1;
}

.select2-container .select2-selection__placeholder {
    color: #000 !important;
    font-family: "Work Sans", sans-serif !important;
    font-weight: 600 !important;
    font-size: 15px !important;
}

.select2-container--default .select2-search--inline .select2-search__field {
    color: #000 !important;
    font-family: "Work Sans", sans-serif !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    margin: 0 !important;
}

.select2-container .select2-search--inline .select2-search__field {
    color: #000 !important;
    margin: 0 !important;
    height: 20px!important;
}

.select2-container--default .select2-search__field::placeholder {
    color: #000;
    margin-bottom: 15px;
}

/* Vendor prefixes for older browser compatibility: */
.select2-container--default .select2-search__field::-webkit-input-placeholder {
    /* Chrome, Opera, Safari */
    color: #000;
    margin-bottom: 15px;
}

.select2-container--default .select2-search__field:-moz-placeholder {
    /* Firefox 18- */
    color: #000;
    opacity: 1;
    /* Firefox adds a lower opacity by default */
}

.select2-container--default .select2-search__field::-moz-placeholder {
    /* Firefox 19+ */
    color: #000;
    opacity: 1;
}

.select2-container--default .select2-search__field:-ms-input-placeholder {
    /* IE 10+ */
    color: #000;
}

.select2-container--default .select2-results__option--selected {
    background-color: #D4B507 !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #D4B507 !important;
}


.partner-filter-blocks {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    gap: 20px !important;
    flex-wrap: wrap !important;
    margin-bottom: 40px;
}

.select2-selection__arrow {
    display: none;
}

.select2-results__options {

    /* Hide scrollbar for Chrome, Safari and Opera (WebKit browsers) */
    &::-webkit-scrollbar {
        display: none;
    }

    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Ensure scrolling is possible (though the bar is hidden) */
.select2-results__options {
    overflow-y: auto;
}

/* Container for the multiple select to position the arrow correctly */
.select2-container--default .select2-selection--multiple {
    position: relative;
    padding-right: 30px !important;
    /* Extra room for the arrow */
    min-height: 38px;
    /* Ensures consistent height */
}

/* Add the down arrow icon using a pseudo-element */
.select2-container--default .select2-selection--multiple:after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 8px;
    background-image: url('data:image/svg+xml,<svg width="12" height="8" viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 7.4L0 1.4L1.4 0L6 4.6L10.6 0L12 1.4L6 7.4Z" fill="%231C1B1F"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    pointer-events: none;
    transition: transform 0.2s ease;
    /* Smooth rotation */
}

/* Rotate the arrow when the dropdown is open */
.select2-container--default.select2-container--open .select2-selection--multiple:after {
    transform: translateY(-50%) rotate(180deg);
}