:root {
    --clr-graylight: #cfd8dc;
    --clr-graymed: #90a4ae;
  
    --radius: 10em;
    --width: 16em;
    --size: 2em;
  
    --animation-curve: cubic-bezier(0.34, 1.36, 0.2, 1);
}



.mode-group{
    width: var(--width);
    height: 3em;
    border-radius: var(--radius);

    box-shadow: 5px 5px 15px 5px lightgray;
    position: relative;
    margin: 1em 0;

    background: lightyellow;
    border: 0.2em solid black;
    font-size: clamp(1rem, 4vw, 1.5rem);
}

#mode-switch{
    width: 6em;
    height: var(--size);
    border-radius: var(--radius);;
    background: plum;
    box-shadow: 2px 2px 10px 2px indigo;
    
    position: absolute;
    top: .35em;
    left: 0.5em;

    cursor: pointer;
    z-index: 99;    /* necessary? */

}

#mode-switch::before{
    /* font-family: ; */
    content: "Learn";
    font-weight: bolder;
    font-size: 1.75em;

    position: absolute;
    text-align: center;
    left: 0.4em; 
    /* top: -0.5em; */

    /* display: flex;
    justify-content: center;
    align-items: center; */

    /* opacity: 0; */

}

#mode-switch::after{
    content: "Test";
    font-size: 1.75em;
    font-weight: bolder;
    
    position: absolute;
    left: 0.85em;
    /* top: 1.65em; */
    
    opacity: 0;
} 

#mode-checkbox:checked ~ #mode-switch::before{
    opacity: 0;
}

#mode-checkbox:checked ~ #mode-switch::after{
    opacity: 1;
}

#mode-checkbox:checked ~ #mode-switch{
    /* transform: rotateZ(360deg); */
    /* transform: translate(12em) rotateZ(360deg); */
    transform: translate(8.75em);
}

#mode-checkbox:checked ~ #mode-switch, 
#mode-checkbox:not(:checked) ~ #mode-switch{
    transition: 1s var(--animation-curve);
}

#mode-checkbox{
    visibility: hidden;
}