.bp-select {
    font-family: $bpFont;
    width: $bpSelectWidth;
    display: inline-flex;
    cursor: pointer;
    position: relative;
    margin: 2px;
    align-items: center;
    border-style: inset;
    border-color: initial;
    border-image: initial;
    border-radius: 0px;
    border: 1px solid $bpSelectBorderColor;
    font-size: $bpSelectFontSize;
    font-weight: $bpSelectFontWeight;
    color: $bpSelectTextColor;
    background-color: $bpSelectBgColor;
    transition: background-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1), border 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);

    &.bp-select__selected {
        border: 1px solid $bpSelectFocusBorderColor;
        background-color: $bpSelectFocusBgColor;
        color: $bpSelectFocusTextColor;
    }

    &.bp-select__disabled {
        opacity: .5;
        cursor: not-allowed;
        touch-action: none;
        pointer-events: none;
    }

    &.bp-select__readonly {
        touch-action: none;
        pointer-events: none;
    }
    
    .bp-select__arrowDown {
        position: absolute;
        right: 10px;
        top: (42px - 12px) / 2;
        backface-visibility: visible;
        transition: transform .3s;
        transform: rotate(0deg);
        color: #a0a0a0;
        width: 12px;
        height: 12px;
        font-size: 12px;

        &.bp-select__arrowDownR {
            transform: rotate(180deg);
            color: #9a9a9a;
        }
    }

    .bp-select__main {
        transition: background-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1), border 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
        position: relative;
        box-sizing: border-box;
        width: 100%;
        padding: 0 30px 0 15px;
        height: 40px;
        line-height: 40px;

        .bp-select__mainContain {
            min-height: 0;
            width: auto;

            @extend .bp-ellipsis;

            .bp-select__mainContain_placeholder {
                color: #858588;
                font-size: $bpSelectFontSize;
            }

            .bp-select__label {
                padding: 0px 4px;
                background: transparent;
                border-radius: 6px;
                white-space: nowrap;
                width: auto;
                pointer-events: none;
                touch-action: none;

                & > div {
                  width: auto;
                  display: inline;
                }
            }

            .bp-select__label_sep {
                padding: 0 3px;
                font-weight: 300;
                color: #9e9e9e;
            }
        }
    }

    &.bp-select__multiple {
        .bp-select__main {
            height: auto;
            min-height: 40px;
            max-height: 40px * 2;

            .bp-select__mainContain {
                @extend .bp-ellipsisMultiline2;

                & > span {
                  display: block;
                }

                .bp-select__label {
                    background: #f3f3f3;
                    border-radius: 5px;
                    padding: 0px 6px;
                    margin-right: 5px;
                    display: inline;
                    align-self: auto;
                    display: inline-flex;
                    align-items: center;
                    height: 30px;
                    line-height: 30px;
                    flex-shrink: 0;
                    pointer-events: initial;
                    touch-action: initial;

                    & > * {
                      align-self: auto;
                    }
                }

                .bp-select_close {
                    box-sizing: content-box;
                    width: 12px;
                    height: 12px;
                    margin-left: 5px;
                    font-size: 12px;
                    background: #c1c1c1;
                    color: #929292;
                    border-radius: 50%;
                    padding: 4px;
                    transform: scale(0.8);
                    cursor: pointer;
                    align-self: auto;

                    &:hover {
                        background: #ababab;
                        color: #efefef;
                    }
                }
            }
        }
    }
}

.bp-select__dropdown {
    $selectListWidth: $bpSelectOptionWidth;
    $selectListHeight: $bpSelectOptionHeight * 6;

    overflow: hidden;
    font-size: $bpSelectFontSize;
    font-weight: $bpSelectFontWeight;
    color: $bpSelectTextColor;
    user-select: none;
    display: flex;

    .bp-select__dropdownList {
        border-right: none;
        border-radius: 0px;
        background-color: $bpSelectDropdownBgColor;
        width: $selectListWidth;
        height: $selectListHeight;
        box-sizing: content-box;
        padding: 6px 0px;
        overflow-y: visible;
        overflow-x: hidden;
        color: $bpSelectDropdownTextColor;
        border-right: 1px solid $bpSelectDropdownBorderColor;

        &:first-child {
            border-top-left-radius: 4px;
            border-bottom-left-radius: 4px;
        }

        &:last-child {
            border-top-right-radius: 4px;
            border-bottom-right-radius: 4px;
            border-right: none;
        }

        &__empty {
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 14px;
            color: #949494;
        }

        &__scroller {
            overflow-x: hidden;
            overflow-y: visible;
        }

        &__inner {
            width: $selectListWidth;
        }

        .bp-select__option {
            line-height: $bpSelectOptionHeight;
            height: $bpSelectOptionHeight;
            padding: 0 20px;
            cursor: pointer;

            &.bp-select__option_active {
                color: $bpSelectDropdownActiveColor;
            }

            &:hover {
                background-color: $bpSelectDropdownHoverBgColor;
            }

            &.bp-select__option_empty {
                color: #666;
            }

            &.bp-select__option_disabled {
                opacity: 0.5;
                pointer-events: none;
                touch-action: none;
            }
        }
    }
}


.bp-popover.bp-select__popover .bp-popover__main {
    background-color: $bpSelectDropdownBgColor;
    text-align: left;

    .bp-popover__arrow {
        filter: drop-shadow(0 2px 12px rgba($bpSelectDropdownBorderColor, 0.3));
    }

    &[direction^=bottom] {
        .bp-popover__arrow {
            border-bottom-color: $bpSelectDropdownBorderColor;

            &:after {
                border-bottom-color: $bpSelectDropdownBgColor;
            }
        }
    }

    &[direction^=left] {
        .bp-popover__arrow {
            border-left-color: $bpSelectDropdownBorderColor;

            &:after {
                border-left-color: $bpSelectDropdownBgColor;
            }
        }
    }

    &[direction^=right] {
        .bp-popover__arrow {
            border-right-color: $bpSelectDropdownBorderColor;

            &:after {
                border-right-color: $bpSelectDropdownBgColor;
            }
        }
    }

    &[direction^=top] {
        .bp-popover__arrow {
            border-top-color: $bpSelectDropdownBorderColor;

            &:after {
                border-top-color: $bpSelectDropdownBgColor;
            }
        }
    }
}