$prefix-switch : #{$prefix}switch;
.#{$prefix-switch}{
    $width: 3.5em;
    $height: 2em;
    $inner-active-width: 2.5em;
    cursor: pointer;
    user-select: none;
    font-size: $font-size-base;
    min-width: $width;
    height: $height;
    display: inline-block;
    position: relative;
    overflow: hidden;
    vertical-align: middle;
    box-sizing: border-box;
    color: $color-background;
    transition: background-color $transition-hover-time $bezier,
                border $transition-hover-time $bezier,
                box-shadow $transition-hover-time $bezier;
    @include get-color-sub(background-color);
    border-radius: $height + 0.5em;
    &-inner{
        @include get-color-bg();
        width: $height;
        height: $height;
        border-radius: $height + 0.5em;
        transform: scale(0.85);
        box-shadow: 0 0 5px rgba(0,0,0,0.35);
        position: absolute;
        top: 0;
        left: 0;
        transition: transform $transition-hover-time $bezier,
                    left $transition-hover-time $bezier,
                    width $transition-hover-time $bezier;
    }
    &:active{
        .#{$prefix-switch}-inner{
            width: $inner-active-width;
        }
    }
    &-open{
        background-color: $color-primary;
        .#{$prefix-switch}-inner{
            left: 100%;
            transform: translateX(-100%) scale(0.85);
        }
    }
    &-slot{
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        align-content: space-between;
        text-align: center;
        &>*{
            flex: 1;
            transform: scale(0.9);
        }
        &-open{
            padding-left: 8px;
            padding-right: $height;
        }
        &-close{
            padding-right: 8px;
            padding-left: $height;
        }
    }
    // 尺寸
    &-size{
        &-large{
            font-size: $font-size-large;
        }
        &-small{
            font-size: $font-size-small;
        }
    }
    // disabled
    @include disabled();
}
