//select-dropdown
.select2-container--default {
    left: 0 !important;
    right: 0 !important;

    &.select2-container--focus {
        .select2-selection--multiple {
            border: none;
        }
    }

    .select2-selection--multiple {
        border: none;
        padding: 0;
        padding-left: $space20+2;
        min-height: unset;
        cursor: pointer;

        .select2-selection__rendered {
            display: flex;
            flex-wrap: wrap;
        }

        .select2-selection__choice {
            background-color: $white;
            border: $common-border;
            border-radius: 5px;
            margin: 0 $space10 0 0;
            padding: 3px;
        }

        .select2-selection__choice {
            display: flex;

            .select2-selection__choice__remove {
                width: unset;
                position: unset;
                border-right: none;
                order: 2;
                padding: 0;
                height: 15px;

                span {
                    font-size: 0;

                    &::after {
                        content: '';
                        background: url("../images/close1.svg") no-repeat;
                        width: 12px;
                        height: 12px;
                        display: inline-block;
                        background-size: 10px;
                    }
                }

                &:hover {
                    background: transparent;
                }
            }

            .select2-selection__choice__display {
                @include font-size(15px);
                order: 1;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            &:not(:first-child) {
                .select2-selection__choice__display {
                    padding-left: $space5;
                }
            }
        }

        &::after {
            content: '';
            background: url("../images/dropdown.svg") no-repeat;
            background-position: right 5px center;
            width: 20px;
            height: 8px;
            display: inline-block;
            position: absolute;
            right: 0;
            top: 10px;
            transition: 0.3s all ease-in-out;
        }
    }

    .select2-selection--single {
        border: none;

        .select2-selection__rendered {
            color: $title-color;
            padding: 0;
            padding-left: 22px;
            @include font-size(15px);
        }

        .select2-selection__arrow {
            b {
                border: none;
                background: url("../images/dropdown.svg") no-repeat;
                background-position: right 5px center;
                width: 20px;
                height: 8px;
                left: unset;
                right: 0;
                transition: 0.3s all ease-in-out;
            }
        }
    }

    &.select2-container--open {
        .select2-selection--single {
            .select2-selection__arrow {
                b {
                    transform: rotate(-180deg);
                    border: none;
                }
            }
        }

        .select2-selection--multiple {
            &::after {
                transform: rotate(-180deg);
            }
        }
    }

    &.select2-container--disabled {
        .select2-selection--single {
            background-color: transparent;

            .select2-selection__arrow {
                b {
                    display: none;
                }
            }
        }

        .select2-selection--multiple {
            background: transparent;

            &::after {
                display: none;
            }

            .select2-selection__choice {
                background-color: transparent;
                border: none;
                border-radius: unset;
                margin: 0;
                padding: 0;

                &::after {
                    content: ',';
                    display: inline-block;
                    order: 3;
                }

                &:nth-last-of-type(1) {
                    &::after {
                        opacity: 0;
                    }
                }

                .select2-selection__choice__remove {
                    display: none;
                }
            }
        }

        .select2-selection__choice {
            .select2-selection__choice__display {
                padding-right: $space5;
            }
        }
    }

    .select2-results__option--highlighted {
        &.select2-results__option--selectable {
            background: $bg-light;
            color: $subtitle-color;
        }
    }

    .select2-results__option--selected {
        background: $bg-light;
    }

    .select2-dropdown {
        top: 14px;
        border: $common-border;
        border-radius: 5px;
        width: 100% !important;

        .select2-search--dropdown {
            padding: $space10;

            .select2-search__field {
                border: $common-border;
                border-width: 0 0 1px 0;
                color: $title-color;
            }
        }

        .select2-results {
            .select2-results__option {
                color: $subtitle-color;
                padding: $space10;
            }

            .select2-results__option--disabled {
                color: #cdcdcd;
            }
        }
    }
}

.select2-container--default,
.select2-selection--multiple,
.select2-selection--single,
.select2-selection__rendered,
.selection,
.select2-selection__choice {
    &:focus-visible {
        outline: none;
    }
}

.select2-hidden-accessible {
    width: auto !important;
    height: auto !important;
}

@media screen and (min-width:1366px) {
    .select2-container--default {
        .select2-selection--multiple {
            .select2-selection__choice {
                .select2-selection__choice__display {
                    @include font-size(16px);
                }
            }
        }

        .select2-selection--single {
            .select2-selection__rendered {
                @include font-size(16px);
            }
        }
    }
}