.custom-switch {
    display: inline-flex;
    align-items: center;
}

    .custom-switch label {
        margin-inline-start: 0.2rem;
    }
.custom-switch-content {
    position: relative;
    display: inline-block;
    width: 80px;
    height: 30px;
}
    .custom-switch-content input {
        opacity: 0;
        width: 0;
        height: 0;
    }
.custom-switch-slider {
    position: absolute;
    inset: 0;
    background-color: #007bff;
    border-radius: 30px;
    transition: 0.4s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: white;
    font-size: 12px;
    box-sizing: border-box;
    text-align: center;
    direction: inherit;
    padding-inline-start: 2rem;
}
    .custom-switch-slider::before {
        content: "";
        position: absolute;
        height: 26px;
        width: 26px;
        background-color: var(--circle-color, white);
        border-radius: 50%;
        transition: 0.4s;
        top: 2px;
        inset-inline-start: 2px;
        z-index: 1;
    }
.custom-switch-content input:checked + .custom-switch-slider::before {
    top: 2px;
    inset-inline-start: 13px;
}
.custom-switch-content input:checked + .custom-switch-slider {
    background-color: #4CAF50;
    justify-content: flex-end;
    padding-inline-start: 0;
    padding-inline-end: 3.2rem;
}
    .custom-switch-content input:checked + .custom-switch-slider::before {
        transform: translateX(40px);
    }
html[dir="rtl"] .custom-switch-slider {
    padding-inline-start: 3.2rem;
}
html[dir="rtl"] .custom-switch-content input:checked + .custom-switch-slider {
    justify-content: flex-end;
    inset-inline-end: 0px;
}

    html[dir="rtl"] .custom-switch-content input:checked + .custom-switch-slider::before {
        transform: translateX(-40px);
    }