.switch {
    display: flex;
}

.switch input[type='checkbox'] {
    height: 0;
    width: 0;
    visibility: hidden;
}

.switch label {
    cursor: pointer;
    width: 39px;
    height: 21px;
    background-color: rgb(0, 0, 0, 0.2);
    display: block;
    border-radius: 50em;
    position: relative;
    transition: 0.3s;
    padding:2px 4px;
    box-sizing: content-box;
}

.switch label>.slider.round {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: #fff;
    border-radius: 50em;
    transition: 0.3s;
    top: 3px;
    /* -webkit-transition:;
    -moz-transition:;
    -ms-transition:;
    -o-transition:; */
}

.switch input:checked+label {
    background-color: rgba(52, 181, 35, 1);
}

.switch input:checked+label>.slider.round {
    transform: translateX(calc(100% + 5px));
    color: black;
}

.slider.round {
    width: auto;
    height: auto;
    font-family: sans-serif;
    text-align: center;
    color: gray;
    margin: 0;
    padding: 0;
}