div.sidebar-wrapper{
    pointer-events: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    right: MIN(1%, 20px);
    z-index: 1;
}
aside.sidebar.fixed {
    pointer-events: auto;
    position: sticky;
    top: 50%;
    transform: translateY(-50%);
    z-index: 400;
    background: none;
    border: none;
    @media ((max-width: 640px) and (max-height: 700px)) {
        bottom: 10%;
        transform: none;
    }
    .stickyElement{
        bottom: 0;
        position: absolute;
        right: 100%;
        transform: translateY(50%);
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 5px 5px 15px 5px;
        background-color: white;
        border-color: #fffc;
        border-width: 1px;
        border-style: solid;
        border-radius: 50px;
        transition-property: all;
        transition-timing-function: cubic-bezier(.4,0,.2,1);
        transition-duration: .3s;
        --ssn-shadow: -4px 4px 12px rgba(0, 0, 0, .1);
        --ssn-shadow-colored: -4px 4px 12px var(--ssn-shadow-color);
        box-shadow: var(--ssn-ring-offset-shadow, 0 0 #0000), var(--ssn-ring-shadow, 0 0 #0000), var(--ssn-shadow);
        @media ((max-width: 640px) and (max-height: 700px)) {
            padding: 0;
        }
        .head{
            display: flex;
            gap: 10px;
            align-items: center;
            .image{
                border-radius: 50%;
                overflow: hidden;
                width: 44px;
                height: 44px;
                flex: 0 0 auto;
                img{
                    width: 100%;
                    height: 100%;
                    object-fit: cover;
                }
            }
            .title{
                font-weight: 700;
                color: #000;
                white-space: nowrap;
                /* Collapsed by default; slides open horizontally on hover
                   instead of toggling display:none. */
                &.hidden{
                    max-width: 0;
                    opacity: 0;
                    overflow: hidden;
                    transition: max-width .3s cubic-bezier(.4,0,.2,1),
                                opacity .3s cubic-bezier(.4,0,.2,1);
                }
            }
        }
        .options{
            display: flex;
            flex-direction: column;
            gap: 8px;
            /* On very small screens the options collapse smoothly instead of
               being removed with display:none. */
            &:not(.no-hs){
                @media ((max-width: 640px) and (max-height: 700px)) {
                    max-height: 0;
                    opacity: 0;
                    overflow: hidden;
                    /* transition: max-height .3s cubic-bezier(.4,0,.2,1),
                                opacity .3s cubic-bezier(.4,0,.2,1); */
                    transition: max-height .3s ease, opacity .3s ease;
                }
            }
            .option{
                align-items: center;
                display: flex;
                gap: 12px;
                &.wysiwyg{
                    min-width: 300px;
                    display: block;
                    padding: 15px;
                }
                &:last-child{
                    margin-bottom: 5px;
                }
                > a{
                    transition: color .3s ease-in-out;
                    font-size: .875rem;
                    line-height: 1.25rem;
                    text-decoration: none;
                    white-space: nowrap;
                    display: flex;
                    gap: 5px;
                    &:hover{
                        color: black;
                        .icon img{
                            filter: drop-shadow(0px 0px 3px var(--mainColor, #000));
                        }
                    }
                }
                .icon{
                    padding: 0 7px;
                    display: flex;
                    flex: 0 0 auto;
                    img{
                        width: 28px;
                        max-height: 28px;
                        object-fit: contain;
                    }
                }
                .link{
                    white-space: nowrap;
                    /* Collapsed label next to the icon; slides open on hover. */
                    &.hidden{
                        max-width: 0;
                        opacity: 0;
                        overflow: hidden;
                        transition: max-width .3s cubic-bezier(.4,0,.2,1),
                                    opacity .3s cubic-bezier(.4,0,.2,1);
                    }
                }
                &.divider{
                    hr{
                        margin: 5px 0;
                        background: rgb(206, 206, 206);
                        width: 100%;
                    }
                }
                /* Whole option that only appears in the opened state. */
                &.hidden{
                    max-height: 0;
                    opacity: 0;
                    overflow: hidden;
                    margin: 0;
                    padding: 0;
                    transition: max-height .3s cubic-bezier(.4,0,.2,1),
                                opacity .3s cubic-bezier(.4,0,.2,1),
                                margin .3s cubic-bezier(.4,0,.2,1),
                                padding .3s cubic-bezier(.4,0,.2,1);
                }
            }
        }
    }
    &:not(:hover):not(:focus):not(:focus-within){
        .options .option.hidden.wysiwyg{
            display: none
        }
    }
    &:hover,
    &:focus,
    &:focus-within{
        .stickyElement{
            border-radius: 20px;
            padding: 16px;
            @media ((max-width: 640px) and (max-height: 700px)) {
                position: absolute;
                bottom: 0;
                right: 0;
            }
            /* Reveal everything that is collapsed in the resting state. */
            .head .title.hidden{
                max-width: 500px;
                opacity: 1;
            }
            .options .option .link.hidden{
                max-width: 500px;
                opacity: 1;
            }
            .options .option.hidden{
                max-height: 500px;
                opacity: 1;
                margin: 0;
                padding: 0;
                &.wysiwyg{
                    padding: 15px;
                }
                &:last-child{
                    margin-bottom: 5px;
                }
            }
            .options:not(.no-hs){
                @media ((max-width: 640px) and (max-height: 700px)) {
                    max-height: 1000px;
                    opacity: 1;
                }
            }
        }
    }
    &.scroll-hide:not(:hover):not(:focus):not(:focus-within){
        .stickyElement{
            transform: translateY(50%) translateX(calc(98% + 10px));
        }
    }
}
