#layout {
    display: grid;
    width: 100vw;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    background-color: var(--white-light);

    transition: grid-template-columns 0.5s ease-in-out;
}


@media screen and (min-device-width: 500px) {
    #layout {
        grid-template:
            "head head" 4.5em
            "menu content" .1em
            "menu content" calc(100% - 4.6em)
            / 17em auto;
    }
}

@media screen and (max-device-width: 499px) {
    #layout {
        grid-template:
            "head head" 4.5em
            "menu content" .1em
            "menu content" calc(100% - 4.6em)
            / 0 auto;
    }
}

#layout>#head {
    color: var(--header-color-text);
    grid-area: head;
    padding: .25em;
    background-color: var(--header-color);

    box-shadow: 0 -.75rem 1rem 1rem var(--shadow-color);
    z-index: 12;
}

#layout>#menu_container {
    display: grid;
    grid-template:
            "menu" auto
            / 100%;

    grid-area: menu;
    background-color: var(--menu-color);

    box-shadow: -.75rem 0 1rem 1rem var(--shadow-color);
    z-index: 7;
}

#layout>#user_container {
    position: fixed;
    top: 4.5em;
    right: 0;
    border: 1px solid var(--shadow-color);

    box-shadow: .75rem -0.75em 1rem 1rem var(--shadow-color);
    z-index: 9;

    background-color: var(--white-dark);

    display: none;
}

@media screen and (min-device-width: 500px) {
    #layout > #user_container {
        width: 17rem;
        min-height: 17rem;
    }
}

@media screen and (max-device-width: 499px) {
    #layout > #user_container {
        width: 100%;
        height: 100%;
    }
}

#layout>#content {
    overflow: hidden;
    z-index: 0;
}

@media screen and (min-device-width: 500px) {
    #layout > #content {
        grid-area: content;
    }
}

@media screen and (max-device-width: 499px) {
    #layout > #content {
        grid-row-start: 2;
        grid-row-end: 4;
        grid-column-start: 1;
        grid-column-end: 3;
    }
}

#layout>#notifications {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 25em;
    max-height: calc(100vh - 5em);
    padding: .5em;
    overflow-y: auto;

    z-index: 9;
}

#layout>#popup {
    display: none;
}

#layout>#popup>#popup-shadow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    padding: 0;
    background-color: black;
    opacity: .1;

    z-index: 7;
}

#layout>#popup>#popup-area {

    position: fixed;
    top: 20%;
    left: 35%;
    width: 30%;
    max-height: calc(100vh - 30%);
    padding: .5em;
    overflow-y: auto;
    opacity: 1;

    z-index: 8;
}

