/* Hide the default checkbox */
.custom-checkbox {
    display: none;
}

/* Style the toggle container */
.checkbox-label {
    display: inline-block;
    width: 4rem;
    height: 2rem;
    background: black;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
    border: 1px solid white;
    overflow: hidden;
    z-index: -1;
}

/* White box inside the toggle */
.checkbox-label::before {
    content: "";
    position: absolute;
    width: 1.8rem;
    height: 1.8rem;
    background: white;
    top: 0.1rem;
    left: 0.1rem; /* Default position when unchecked */
    transition: left 0.3s ease-in-out;
}

/* When checkbox is checked */
.custom-checkbox:checked + .checkbox-label {
    background: white;
}

.custom-checkbox:checked + .checkbox-label::before {
    background: black;
    left: 2rem; /* Move to the right when checked */
}

/* Hide the default checkbox */
.square-checkbox {
    display: none;
}

/* Style the checkbox container */
.square-label {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: black;
    border: 2px solid white;
    cursor: pointer;
    position: relative;
    transition: background 0.3s ease-in-out;
}

/* When checkbox is checked */
.square-checkbox:checked + .square-label {
    background: white;
}
