.switch {
    display: block;
    position: relative;
    width: 38px;
    height: 21px;
    margin: 0 0 8px;
}

.read-only .switch,
.switch.read-only {
    pointer-events: none !important;
    opacity: 50%;
}

.read-only label {
    pointer-events: none !important;
    opacity: 80%;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e5e5;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:hover {
    background-color: #C2D672;
}

.slider:before {
    position: absolute;
    content: "";
    height: 15px;
    width: 15px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

/* On input */

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch:has(input:disabled),
.switch:has(input.disabled),
.switch:has(input:disabled) + .form-check-label,
.switch:has(input.disabled) + .form-check-label {
    pointer-events: none;
    opacity: 50%;
}

input:checked + .slider {
    background-color: #A0C800;
}

input:checked:hover + .slider,
input:checked + .slider:hover {
    background-color: #8CAF00;
}

input:focus + .slider {
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.15);
}

input:checked + .slider:before {
    -webkit-transform: translateX(17px);
    -ms-transform: translateX(17px);
    transform: translateX(17px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 21px;
}

.slider.round:before {
    border-radius: 50%;
}