/* Sidebar/top bar on mobile */

/* I wanted to imitate the EGA colours here. */
/* EGA has 4 shades for each colour component: 0, 5, A, F */
/* For a total of 64 colours. */
body > nav {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 5rem;
    background-color: #AAA;
    border-right: 2px solid #555;
    z-index: 100;
}
body > nav > ul {
    display: flex;
    flex-flow: column nowrap;
    justify-content: flex-start;
    padding-left: 0;
    margin: 0;
}
body > nav li {
    flex: 1 1 50px;
    list-style-type: none;
}
body > nav li:first-child > a {
    font-family: Silkscreen, sans-serif;
}
body > nav li > a {
    background-color: #AAA;
    text-align: center;
    color: black;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}
body > nav li + li > a {
    border-top: 2px solid #FFF;
    border-bottom: 2px solid #555;
}


.retrofit-bg-small {
    background-color: #ffde00;
}

/* Make nav bar appear at the top on mobile devices in both portrait and landscape mode. */

@media only screen and (max-width: 750px) {
    body > nav {
        width: 100%;
        height: 4rem;
        border-bottom: 2px solid #555;
        border-right: none;
    }
    body > nav > ul {
        flex-flow: row nowrap;
        height: 100%;
    }
    body > nav li + li > a {
        border-left: 2px solid #FFF;
        border-right: 2px solid #555;
        border-top: none;
        border-bottom: none;
    }
}

/* Attempt to make navbar items smaller on narrow screens */

@media only screen and (max-width: 360px) {
    body > nav {
        height: 2rem;
    }
    body > nav li > a {
        font-size: 0.75rem;
    }
    body > nav li {
        flex-basis: 16px;
        flex-grow: 1;
    }
}
