#sidebar {
    float: right;
    width: 18%;
    max-width: 0;
    position: relative;
    z-index: 9;
    margin: 8px 16px 40px 0;
    padding-right: 0;
    padding-left: 0;
    border: none;
    border-radius: calc(var(--border-radius) * 6);
    transform: translateZ(0);
    transition: max-width 0.5s;
    will-change: max-width;
    background-color: var(--color-white);
}

#sidebar > * {
    margin-left: 20px !important;
}

#sidebar h3 {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text);
}

#sidebar .queries li {
    margin: 0 2px 8px 0;
    font-size: 12px;
    font-weight: 600;
}

#sidebarx-switch-button::before {
    text-rendering: auto;
    color: #666;
    display: inline-block;
    font-size: 12px;
    font-style: normal;
    font-variant: normal;
    margin-right: 3px;
}

#main.visible-sidebar #sidebar {
    max-width: 100%;
}

#main.visible-sidebar #sidebarx-switch-button::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: "\f061"; /** angle-double-right **/
}

#main:not(.visible-sidebar) #sidebarx-switch-button::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: "\f060"; /** angle-double-left **/
}

#sidebarx-switch-panel {
    float: right;
    height: 25px;
    left: 8px;
    margin-left: 5px;
    padding: 2px;
    position: relative;
    top: 2px;
    width: 15px;
}

#sidebarx-switch-button {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    border-left: 1px solid var(--color-border);
    border-radius: 10px 0 0 10px;
    border-top: 1px solid var(--color-border);
    display: block;
    font-size: 0;
    padding: 9px 20px 9px 5px;
    text-decoration: none;
}

@media screen and (width <= 899px) {
    #main.visible-sidebar #sidebar {
        display: none;
    }

    #main.visible-sidebar #sidebarx-switch-panel {
        display: none;
    }
}

/* Sidebar fix for large screens */
@media screen and (width >= 0) and (width <= 1089px) {
    #sidebar {
        width: 18%;
    }
}

@media screen and (width >= 1090px) and (width <= 1279px) {
    #sidebar {
        width: 290px;
    }
}

@media screen and (width >= 1280px) and (width <= 1599px) {
    #sidebar {
        width: 330px;
    }
}

@media print {
    #main.visible-sidebar #sidebar {
        display: none;
    }

    #main.visible-sidebar #sidebarx-switch-panel {
        display: none;
    }
}