/* The checkbox-wrapper */
.checkbox-wrapper {
    display: block;
    position: relative;
    padding-left: 25px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    font-weight: normal;
}

/* Hide the browser's default checkbox */
.checkbox-wrapper input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Create a custom checkbox */
.checkbox-wrapper .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #f1f1f1;
    border-radius: 0.1rem;
    border: 1px solid #ced4da;
}

/* On mouse-over, add a grey background color */
.checkbox-wrapper:hover input:hover ~ .checkmark {
    background-color: #007bff;
    border: none;
}
.checkbox-wrapper:hover input:hover ~ .checkmark:after {
    display: block;
}
.checkbox-wrapper:hover input ~ .checkmark:after {
    left: 7px;
    top: 3px;
    width: 7px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}
/* When the checkbox is checked, add a blue background */
.checkbox-wrapper input:checked:not([type=hidden]) ~ .checkmark {
    background-color: #007bff;
    border: 0px;
}
.checkbox-wrapper input:not(:checked):not([type=hidden]) ~ .checkmark {
    background-color: #f1f1f1;
    border: 1px solid #ced4da;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkbox-wrapper .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Show the checkmark when checked */
.checkbox-wrapper input:checked ~ .checkmark:after {
    display: block;
}

/* Style the checkmark/indicator */
.checkbox-wrapper .checkmark:after {
    left: 7px;
    top: 3px;
    width: 7px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    -ms-transform: rotate(45deg);
    transform: rotate(45deg);
}

.checkbox-wrapper input:disabled:not([type=hidden]) ~ .checkmark {
    opacity: 0.5;
}