
$bull: 12px;
$offset: 2px;
$track: 14px;
div{
    border: 1px solid var(--second);
    display: inline-flex;
    border-radius: $bull + 3px;
    div{
       width: $bull;
       height: $bull;
       background-color: var(--second); 
       border-radius: 50%;
       margin: $offset $track $offset $offset;
       border: none;
    }
}
div.on{
    border: 1px solid var(--prime);
    background-color: var(--prime);
    div{
        margin: $offset $offset $offset $track;
        background-color: var(--white);
        border: none;
        animation: switch-on 0.1s;
    }
}
div.off{
    div{
        animation: switch-off 0.1s;
    }
}
:host-context(.switch-host:hover){
    div.on{        
        background-color: var(--active);
        div{
           background-color: var(--white);
           border: none;
        }
    }
    div{
        border-color: var(--active);
        div{
           background-color: var(--active);
           border: none;
        }
    }
}

@keyframes switch-on {
    0% {margin:  $offset $track $offset $offset;}
    100% {margin: $offset $offset $offset $track;}
}

@keyframes switch-off {
    100% {margin:  $offset $track $offset $offset;}
    0% {margin: $offset $offset $offset $track;}
}