
/** toggle button **/
/* source: https://alvarotrigo.com/blog/toggle-switch-css/ */

/* Example:

<label for="switch" class="test">Toggle</label> <!-- optional -->
<span class="toggleSwitch ">
	<input type="checkbox" id="switch"/>
	<label for="switch"></label> <!-- should be empty, represents the visual button -->
</span>

*/

.toggleSwitch > input[type=checkbox] {
    height: 0;
    width: 0;
    display: none;
}

.toggleSwitch > label {
    font-size: 1.5em;
    cursor: pointer;
    width: 2em;
    height: 1em;
    background: grey;
    display: block;
    border-radius: 1em;
    position: relative;
}
    .toggleSwitch > label:after {
        content: '';
        position: absolute;
        top: 0.05em;
        left: 0.05em;
        width: 0.9em;
        height: 0.9em;
        background: #fff;
        border-radius: 0.9em;
        transition: 0.3s;
    }

.toggleSwitch > input:checked + label {
    background: #bada55;
}
    .toggleSwitch > input:checked + label:after {
        left: calc(100% - 0.05em);
        transform: translateX(-100%);
    }

.toggleSwitch > label:active:after {
    width: 1.3em;
}
