﻿#switch-thing-toggle {
    display: inline-flex;
    background: linear-gradient(var(--tool-link-background-hi), var(--tool-link-background-lo));
    padding: 0;
    width: 4.2rem;
    color: var(--tool-link-color);
    border-radius: 0.3rem;
    border: 1px solid var(--tool-link-border);
    box-shadow: 0 1px 3px var(--tool-link-shadow), inset 0.5px 0.5px 0.5px var(--tool-link-highlight), inset -0.5px -0.5px 0.5px var(--tool-link-lowlight);
    font-size: 0.75rem;
    line-height: 1.5rem;
    position: relative;
    top: -0.045rem;
}

#switch-thing-toggle > a {
    padding: 0.2rem;
    width: 1rem;
    padding-top: 0.05rem;
    padding-bottom: 0.05rem;

    text-decoration: none;
}

#switch-thing-toggle > a:hover{
    background: linear-gradient(var(--tool-link-background-lo), var(--tool-link-background-hi));
}

#switch-thing-toggle .sel {
    background: linear-gradient(var(--tool-link-background-lo), var(--tool-link-background-hi));
    box-shadow: 0 0 rgba(0, 0, 0, 0.3) inset;
}

    #switch-thing-toggle a.light {
        border-top-left-radius: 0.3rem;
        border-bottom-left-radius: 0.3rem;
    }

    #switch-thing-toggle a.auto {
        border-radius: 0;
        position: relative;
        width: 1rem;
    }

    #switch-thing-toggle .half-div {
        border-top: 0.04rem solid var(--tool-link-slash);
        display: block;
        width: 1.3rem;
        transform: rotate(-65deg);
        transform-origin: 50% 50%;
        margin-top: 0.75rem;
        margin-left: -0.16rem;
    }

    #switch-thing-toggle a.auto .dark-half {
        opacity: 0.55;
        filter: saturate(0.25);
    }

#switch-thing-toggle a.auto .light-half {
    opacity: 1;
    filter: saturate(1);
}

@media (prefers-color-scheme: dark) {
    #switch-thing-toggle a.auto .dark-half {
        opacity: 1;
        filter: saturate(1);
    }

    #switch-thing-toggle a.auto .light-half {
        opacity: 0.55;
        filter: saturate(0.25);
    }

}



#switch-thing-toggle a.auto .light-half {
    position: absolute;
    left: 0;
    right: 0;
    clip-path: polygon(0% 0%, 75% 0%, 25% 100%, 0% 100%, 0% 0%);
    /*width: 1.2rem;*/
    text-align: center;
}

#switch-thing-toggle a.auto .dark-half {
    position: absolute;
    left: 0;
    right: 0;
    clip-path: polygon(100% 100%, 25% 100%, 75% 0%, 100% 0%, 100% 100%);
    /*width: 1.2rem;*/
    text-align: center;
}

#switch-thing-toggle a.dark {
    border-top-right-radius: 0.3rem;
    border-bottom-right-radius: 0.3rem;
    padding-left: 0.12rem;
    padding-right: 0.28rem;
}







@media (max-width: 600px) {
    nav {
        /*margin-bottom: 3rem;*/
    }

    html aside#user-bit {
        position: static;
        text-align: left;

    }

    html header h1 {
        position: static;
        margin-bottom: 1.2rem;
    }
    /*
    #switch-thing-toggle {
        position: absolute;
        right: 0;
        top: 2.1rem;
    }*/

}

    #mode-toggler.fancypants::before {
        clear: both;
    }

    #switch-thing {
        display: block;
        position: relative;
        transition: opacity 0.2s;
        padding-bottom: 2.4rem;
        opacity: 0.45;
    }

    #switch-wrap {
        text-align: center;
    }

    #switch-thing {
        margin-left: auto;
        margin-right: auto;
        width: 2rem;
        border-radius: 0.8rem;
        transition: width 0.3s, background-color 0.3s;
    }

        .can-hover #switch-thing:hover, #switch-thing.expanded {
            width: 6rem;
            background-color: rgba(0, 0, 0, 0.55);
            min-height: 2.55rem;
            opacity: 1;
        }

        #switch-thing .track {
            position: absolute;
            top: 1rem;
            bottom: 0.45rem;
            left: 0.6rem;
            right: 0.6rem;
            height: 0.75rem;
            border-radius: 0.6rem;
            background-color: rgba(150, 150, 150, 0.65);
            box-shadow: inset 0 0.5px 2px rgba(0, 0, 0, 0.25);
            transition: background-color 0.3s, opacity 0.3s, top 0.3s;
            opacity: 0;
            z-index: 0;
        }

        .can-hover #switch-thing:hover .track, #switch-thing.expanded .track {
            opacity: 1;
            top: 1.9rem;
        }

        #switch-thing .lever {
            position: absolute;
            left: 0;
            right: 0;
            margin-left: auto;
            margin-right: auto;
            top: 1rem;
            bottom: 0.45rem;
            width: 0.75rem;
            height: 0.75rem;
            border-radius: 50%;
            display: block;
            background-color: rgba(240, 240, 240, 0.85);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.20);
            z-index: 20;
            transition: transform 0.3s, opacity 0.3s, top 0.3s;
            opacity: 0;
        }

        #switch-thing.expanded .lever,
        .can-hover #switch-thing:hover .lever {
            opacity: 0.7;
            top: 1.9rem;
        }

            #switch-thing.expanded .lever.dark, .can-hover #switch-thing:hover .lever.dark {
                transform: translateX(2rem);
                opacity: 0.7;
            }

            #switch-thing.expanded .lever.light, .can-hover #switch-thing:hover .lever.light {
                transform: translateX(-2rem);
                opacity: 0.7;
            }

        /*
body.dark-scheme #switch-thing .track {
    background-color: rgba(0, 0, 0, 0.15);
}*/

        #switch-thing .les-butones {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            margin-bottom: 2rem;
            height: 1.8rem;
            z-index: 55;
        }

    .can-hover #switch-thing:hover {
        opacity: 1;
    }

    #switch-thing a {
        display: block;
        width: 2rem;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        margin-left: auto;
        margin-right: auto;
        padding-top: 0.4rem;
        height: 3rem;
        text-decoration: none;
    }

    :root {
        --ding-shade-selected: rgba(80, 100, 255, 1);
        --ding-shade-not-selected: rgba(0, 0, 0, 0.45);
    }

    body.dark-scheme {
        --ding-shade-selected: rgba(110, 150, 255, 1);
        --ding-shade-not-selected: rgba(230, 230, 230, 0.65);
    }

    #switch-thing a .ding {
        width: 0.85rem;
        height: 0.85rem;
        margin-left: auto;
        margin-right: auto;
        text-decoration: none;
        border-radius: 50%;
        display: block;
        transition: transform 0.4s;
        transform: scale(0.85);
        box-shadow: 0 0.5px 2px var(--ding-shade-not-selected);
    }

    .can-hover #switch-thing:hover a.light, #switch-thing.expanded a.light {
        transform: translateX(-2rem);
    }

    #switch-thing a.light {
        transform: translateX(-0.3rem);
        transition: transform 0.3s;
    }

    #switch-thing a.active .ding {
        transform: scale(1);
    }


    #switch-thing a.light .ding {
        z-index: 2;
        opacity: 0.45;
        background-color: #ebebeb;
        border: 1px solid rgba(0, 0, 0, 0.45);
        box-shadow: 0 0 2px var(--ding-shade-not-selected);
    }

    #switch-thing a.light.active .ding {
        opacity: 1;
        box-shadow: 0 0 2px var(--ding-shade-selected);
    }

    #switch-thing a.active {
        z-index: 123;
    }

    #switch-thing a.dark {
        transform: translateX(0.3rem);
        transition: transform 0.3s;
        /*background-color: rgba(30, 30, 30, 0.75);*/
    }

    .can-hover #switch-thing:hover a.dark, #switch-thing.expanded a.dark {
        transform: translateX(2rem);
    }

    #switch-thing a.dark .ding {
        z-index: 2;
        opacity: 0.45;
        background-color: #323232;
        border: 1px solid rgba(230, 230, 230, 0.15);
        box-shadow: 0 0 2px var(--ding-shade-not-selected);
    }

    #switch-thing a.dark.active .ding {
        opacity: 1;
        box-shadow: 0 0 2px var(--ding-shade-selected);
        z-index: 123;
    }

    body.dark-scheme #switch-thing a.light,
    body.dark-scheme #switch-thing a.dark,
    body.dark-scheme #switch-thing a.auto {
        border-color: rgba(255, 255, 255, 0.15);
    }


    #switch-thing a.auto .ding {
        z-index: 2;
        /*opacity: 0.45;*/
        background-color: #525252;
        border: 1px solid rgba(0, 0, 0, 0.25);
        box-shadow: 0 0 2px var(--ding-shade-not-selected);
    }

    body.dark-scheme #switch-thing a.auto .ding {
        border-color: rgba(230, 230, 230, 0.15);
    }

    #switch-thing a.auto.active .ding {
        opacity: 1;
        box-shadow: 0 0 2px var(--ding-shade-selected);
    }


    #switch-thing a.auto .white-side {
        background-color: #ebebeb;
        margin-left: auto;
        margin-right: auto;
        position: absolute;
        display: block;
        width: 0.425rem;
        height: 0.85rem;
        border-top-left-radius: 0.425rem;
        border-bottom-left-radius: 0.425rem;
        background-color: #e4e4e4;
        z-index: 4;
    }

    #switch-thing a.auto .ding .ding-inside {
        width: 0.85rem;
        height: 0.85rem;
        position: relative;
        /*background-color: yellow;*/
        display: block;
        top: 0;
        bottom: 0;
    }

    #switch-thing a.auto .white-bulb-top {
        position: absolute;
        top: 0;
        left: 0.2125rem;
        margin-left: auto;
        margin-right: auto;
        width: 0.425rem;
        background-color: #e4e4e4;
        display: block;
        height: 0.425rem;
        border-radius: 0.2125rem;
        z-index: 5;
    }

    #switch-thing a.auto .white-bulb-black-nib {
        position: absolute;
        top: 0.1416rem;
        left: calc(0.425rem - (0.1416rem/2));
        background-color: #525252;
        display: block;
        height: 0.1416rem;
        width: 0.1416rem;
        border-radius: 50%;
        z-index: 6;
    }

    #switch-thing a.auto .black-bulb-top {
        position: absolute;
        bottom: 0;
        left: 0.2125rem;
        margin-left: auto;
        margin-right: auto;
        margin-top: 0.4rem;
        background-color: #525252;
        display: block;
        width: 0.425rem;
        height: 0.425rem;
        border-radius: 0.2125rem;
        z-index: 5;
    }

    #switch-thing a.auto .black-bulb-white-nib {
        position: absolute;
        bottom: 0.1416rem;
        left: calc(0.425rem - (0.1416rem/2));
        width: 0.1416rem;
        background-color: #e4e4e4;
        display: block;
        height: 0.1416rem;
        border-radius: 50%;
        z-index: 6;
    }


    body.dark-scheme #switch-thing a.auto .white-side,
    body.dark-scheme #switch-thing a.auto .white-bulb-top {
        background-color: #a7a7a7;
    }


    body.dark-scheme #switch-thing a.auto .ding,
    body.dark-scheme #switch-thing a.auto .black-bulb-top {
        background-color: #323232;
    }





    #switch-thing .readout {
        position: absolute;
        left: 0;
        right: 0;
        top: 1rem;
        height: 2.4rem;
        margin-bottom: -3rem;
        font-size: 0.55rem;
        opacity: 0;
        transition: opacity 0.3s, top 0.3s, font-size 0.3s;
    }

    #switch-thing.expanded .readout,
    .can-hover #switch-thing:hover .readout {
        top: 3rem;
        opacity: 1;
        color: #f0f0f0;
        font-size: 0.85rem;
    }
