﻿:root {
    --verticalMenuCollapsedWidth: 60px;
    --verticalMenuExpandedWidth: 320px;
    --mobileNavbarHeight: 52px;
}


#comms_navbar_toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: hsl(0, 0%, 27%);
}

    #comms_navbar_toggle:hover {
        cursor: pointer;
        filter: brightness(90%);
    }

#comms_nav_logo {
    /* max-height: 4vh;
    max-width: 30vw;*/
    max-width: 30vw;
    height: 42px;
}

#comms_navbar {
    height: 100vh;
    z-index: 100;
    user-select: none;
}

#comms_navbar_outer.navbar_closed #comms_navbar_container_mobile,
#comms_navbar_outer.navbar_open #comms_navbar_container_mobile {
    display: none;
    background-color: rgb(60, 64, 67);
}

#comms_content_container {
    overflow-y: auto;
    height: 100vh;
    width: calc(100vw - var(--verticalMenuCollapsedWidth));
    position: absolute;
    margin-left: var(--verticalMenuCollapsedWidth);
    z-index: 50;
}

#comms_navbar_outer {
    z-index: 100;
}

    #comms_navbar_outer.navbar_open #comms_navbar_container {
        width: var(--verticalMenuExpandedWidth); /* 15% leaves buttons illegible when screen isn't full sized */
        transition-duration: 0.05s;
    }

    #comms_navbar_outer.navbar_closed #comms_navbar_container {
        width: var(--verticalMenuCollapsedWidth); /* Using % means resizing screen makes menu icons overflow onto page */
        transition-duration: 0.05s;
    }

#comms_navbar_logo {
    /*Not convinced this was needed */
    /*height: 6vh;*/
}

#comms_navbar_container #comms_navbar_logo {
    margin-bottom:8px;
}

#comms_navbar {
    overflow-y: auto;
    overflow-x: hidden;
}

#comms_navbar_container {
    position: sticky;
    z-index: 999;
    background-color: hsl(0, 0%, 12%);
}

.comms_navbar_inneritems {
    /*    backdrop-filter: brightness(1.2);*/
    max-height: 30vh;
    overflow-y: auto;
    overflow-x: hidden;
    margin-top: 0.5em;
    margin-left: 0.3em;
    width: 100%;
}

    .comms_navbar_inneritems .comms_navbar_item {
        padding: 0.5em;
    }

    .comms_navbar_inneritems .navbar_item_key {
        padding-top: 1rem;
        padding-bottom: 1rem;
        margin-bottom: 0px;
        color: white;
        font-weight: bold;
        text-transform: uppercase;
    }

    .comms_navbar_inneritems a {
        text-decoration: none;
        color: white;
        width: 100%;
        display: block;
        clear: both;
        font-weight: 400;
        text-align: inherit;
        white-space: nowrap;
        background-color: transparent;

    }

    .comms_navbar_item {
        padding: 0.7rem;
        margin-bottom: 0.3rem;
        border-radius: 0.375rem;
        width: 100%;
        text-overflow: ellipsis;
        transition: 500ms;
        color: white;
    }

.comms_navbar_item_info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white !important;
    text-decoration: none;
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.comms_navbar_item.sub_closed:hover {
    filter: brightness(90%);
    background-color: rgba(255, 255, 255, .15);
    backdrop-filter: blur(5px);
    cursor: pointer;
    transition: 500ms;
}

div.comms_navbar_item.sub_open {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

hr.separator {
    border-top: 2px solid #bbb;
    border-radius: 5px;
    margin-left: 0.2em;
    margin-right: 0.2em;
}

@media print {
    #comms_navbar_container {
        display: none !important;
    }

    #comms_content_container {
        overflow-y: unset;
    }
}

@media screen and (max-width: 900px) {

    #comms_navbar_outer {
        display: block;
    }

        #comms_navbar_outer.navbar_open {
            width: 80vw;
        }

            #comms_navbar_outer.navbar_open #comms_navbar_container_mobile {
                display: none;
            }

        #comms_navbar_outer.navbar_closed #comms_navbar_container_mobile {
            width: 100vw;
            height: var(--mobileNavbarHeight);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding-left: 1.5em;
            padding-right: 1.5em;
        }

        #comms_navbar_outer.navbar_closed #comms_navbar_container {
            display: none;
        }

        #comms_navbar_outer.navbar_open #comms_navbar_container {
            display: block;
            width: 80vw;
            position: fixed;
            height: 100vh;
        }

        #comms_navbar_outer.navbar_open #comms_content_container {
            position: relative;
        }

        #comms_navbar_outer.navbar_closed #comms_navbar_container {
            width: 100vw;
            height: var(--mobileNavbarHeight);
        }

        #comms_navbar_outer.navbar_closed #comms_navbar {
            height: var(--mobileNavbarHeight);
        }

    #comms_content_container {
        width: 100vw !important;
        height: 93vh !important;
        margin-left: 0 !important;
        margin-top: var(--mobileNavbarHeight);
    }

    .main {
        flex-direction: column !important;
    }
}
