/* naev.org's header. Sizes are in px since mdbook's root font is 10px. */

.light, html:not(.js) {
    --bg: #f8f9fa;
    --fg: #212529;
    --links: #007bff;
}

html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
        "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
        "Noto Color Emoji";
}

/* Spans the page past mdbook's padding and top offset, above its menu bar's hover strip. */
.naev-site {
    container-type: inline-size;
    position: relative;
    z-index: 102;
    margin: var(--menu-bar-height) calc(-1 * var(--page-padding)) calc(-1 * var(--menu-bar-height));
    line-height: 1.5;
}

.naev-site-nebula {
    background: #202080 url("https://naev.org/imgs/nebula-tile.png") repeat-x;
}

/* Bootstrap's widest .container. */
.naev-site-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

/* nebula.js draws behind the logo. */
.naev-site-banner {
    position: relative;
    overflow: hidden;
    height: 80px;
}

.naev-site-banner canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.naev-site-banner .naev-site-container {
    position: relative;
}

.naev-site-banner img {
    height: 80px;
}

.naev-site-nav {
    padding: 8px 16px;
    background: #343a40;
}

.naev-site-nav-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.naev-site-brand {
    display: flex;
    margin-right: 16px;
}

.naev-site-brand img {
    height: 32px;
    filter: contrast(0%) brightness(200%);
}

.naev-site-nav-links {
    display: flex;
    flex: 1;
    justify-content: space-between;
}

.naev-site-nav ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.naev-site-nav ul a {
    display: block;
    padding: 8px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.naev-site-nav ul a:hover,
.naev-site-nav ul a:focus {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
}

.naev-site-nav ul a[aria-current="page"] {
    color: #fff;
}

/* A checkbox, so the menu opens without JS. */
.naev-site-nav-toggle,
.naev-site-nav-button {
    display: none;
}

@container (max-width: 860px) {
    .naev-site-nav-button {
        display: block;
        padding: 4px 12px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 4px;
        color: rgba(255, 255, 255, 0.5);
        font-size: 20px;
        cursor: pointer;
    }

    .naev-site-nav-links {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
    }

    .naev-site-nav-toggle:checked ~ .naev-site-nav-links {
        display: flex;
    }

    .naev-site-nav ul {
        flex-direction: column;
    }
}
