
.select2-container {

    .select2-selection {
        @extend .form-control;
        display: flex !important;
        align-items: center;
        border: $input-border-width solid var(--gray-300) !important;
        border-radius: $input-border-radius !important;
        //height: auto !important;
        min-height: $input-height;
        padding: 6px 16px !important;
        background-color: var(--white) !important;

        .select2-selection__arrow {
            top: 50% !important;
            right: 10px !important;
            transform: translateY(-50%);
            border-color: var(--dark) transparent transparent transparent !important;
        }

        .select2-selection__rendered {
            display: inline-flex;
            align-items: center;
            flex-wrap: wrap;
            color: var(--dark) !important;
        }

        .select2-selection__choice {
            display: inline-flex;
            align-items: center;
            background-color: var(--primary) !important;
            border-color: var(--primary) !important;
            color: var(--white) !important;
            margin-top: 2px !important;
            margin-left: 0 !important;
            margin-right: 5px !important;

            .rtl & {
                margin-right: 0 !important;
                margin-left: 5px !important;
            }

            .select2-selection__choice__remove {
                color: var(--white) !important;
                border-color: var(--primary) !important;
                top: auto !important;

                &:hover {
                    background-color: transparent !important;
                }
            }
        }


        .select2-selection__clear {
            position: absolute;
            right: 28px;
            color: var(--danger);
            font-size: 24px !important;
            float: none !important;
            font-weight: normal !important;
            height: auto !important;
            margin-right: 0 !important;
            padding-right: 0;
        }

    }

    .select2-selection__placeholder {
        color: var(--dark) !important;
    }

    &.select2-container--disabled .select2-selection {
        background-color: $input-disabled-bg !important;
    }
}

.select2-bg-white {
    .select2-container .select2-selection {
        background-color: var(--white) !important;
    }
}

.select2-dropdown {
    background: var(--white);
    border: 1px solid var(--gray-300) !important;
    border-radius: 12px !important;
    z-index: 1094;
    padding: 8px 0 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);

    &.select2-dropdown--below {
        top: 8px;
    }

    &.select2-dropdown--above {
        top: -8px;
    }

    .select2-search {
        padding: 8px 16px 16px !important;

        .select2-search__field {
            border: 1px solid var(--gray-300) !important;
            border-radius: 8px !important;
            height: 36px !important;
        }
    }

    .select2-results {
        li {
            padding: 8px 16px !important;
        }
    }

}
