@import '../abstracts/variables';
@import '../abstracts/mixins';

/* Switch css */
.switchWrap {
    display: inline-block;
    &__label {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        cursor: pointer;
        &.right {
            flex-direction: row-reverse;
        }
    }
    &__main {
        position: relative;
        display: inline-flex;
        align-items: center;
        cursor: pointer;
        width: 44px;
        height: 22px;
        @include responsive(vxxs) {
            width: 40px;
            height: 24px;
        }
        input {
            opacity: 0;
            width: 0;
            height: 0;
            &:checked+.slideSwitch {
                background-color: var(--hex-main-color-one);
                &:before {
                    -webkit-transform: translateX(20px);
                    -ms-transform: translateX(20px);
                    transform: translateX(20px);
                    @include responsive(vxxs) {
                        transform: translateX(16px);
                    }
                }
            }
            &:focus+.slider {
                box-shadow: 0 0 1px var(--hex-main-color-one);
            }
        }
        .slideSwitch {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #dfdfdf;
            -webkit-transition: .4s;
            transition: .4s;
            &:before {
                position: absolute;
                content: "";
                height: 17px;
                width: 17px;
                left: 3px;
                bottom: 3px;
                background-color: white;
                -webkit-transition: .4s;
                transition: .4s;
                @include responsive(vxxs) {
                    height: 18px;
                    width: 18px;
                }
            }
            &.rounded {
                border-radius: 30px;
                &::before {
                    border-radius: 50%;
                }
            }
        }
    }
}
