components/toggle-switch/ToggleSwitch.module.scss
.toggle-switch {
    position: relative;
    width: 75px;
    display: inline-block;
    vertical-align: middle;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    text-align: left;
    transform: scale(0.825);

    &.small-switch {
        width: 40px;
        .toggle-switch-inner {
            &:after,
            &:before {
                content: '';
                height: 20px;
                line-height: 20px;
            }
        }
        .toggle-switch-switch {
            width: 16px;
            right: 20px;
            margin: 2px;
        }
    }

    &-checkbox {
        display: none;
    }
    &-label {
        display: block;
        overflow: hidden;
        cursor: pointer;
        border: 0 solid var(--toggle-btn-color);
        border-radius: 20px;
        margin: 0;
    }
    &-inner {
        display: block;
        width: 200%;
        margin-left: -100%;
        transition: margin 0.3s ease-in 0s;
        &:before,
        &:after {
            display: block;
            float: left;
            width: 50%;
            height: 34px;
            padding: 0;
            line-height: 34px;
            font-size: 14px;
            color: var(--white);
            font-weight: bold;
            box-sizing: border-box;
        }
        &:before {
            content: 'Yes';
            text-transform: uppercase;
            padding-left: 10px;
            background-color: var(--red);
            color: var(--white);
        }
    }
    &-disabled {
        background-color: var(--toggle-btn-disable-color);
        cursor: not-allowed;
        &:before {
            background-color: var(--toggle-btn-disable-color);
            cursor: not-allowed;
        }
    }
    &-inner:after {
        content: 'No';
        text-transform: uppercase;
        padding-right: 10px;
        background-color: var(--toggle-btn-color);
        color: var(--white);
        text-align: right;
    }
    &-switch {
        display: block;
        width: 24px;
        margin: 5px;
        background: var(--white);
        position: absolute;
        top: 0;
        bottom: 0;
        right: 40px;
        border: 0 solid var(--toggle-btn-color);
        border-radius: 20px;
        transition: all 0.3s ease-in 0s;
    }
    &-checkbox:checked + &-label {
        .toggle-switch-inner {
            margin-left: 0;
        }
        .toggle-switch-switch {
            right: 0px;
        }
    }

    @media screen and (max-width: 767px) {
        transform: scale(0.825);
    }
    @media screen and (max-width: 575px) {
        transform: scale(0.75);
    }
}
