/* Shared site navigation. Loaded after page styles so the logo stays consistent. */
.nav-header {
    box-shadow: 0 12px 32px rgba(23, 60, 48, .08);
}

.nav-header nav {
    padding: 10px 0 !important;
}

.nav-header .nav-brand {
    display: inline-block;
    line-height: 0;
}

.nav-header .nav-brand img {
    display: block;
    width: 205px !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
}

@media (min-width: 992px) {
    .nav-header .links_menu {
        padding: 0 !important;
        border-top: 1px solid #e9f0eb;
    }

    .nav-header .links_menu ul {
        padding: 8px 0 !important;
        gap: 6px 18px !important;
    }
}

@media (max-width: 991.98px) {
    .nav-header {
        width: calc(100% - 20px) !important;
        margin: 10px auto !important;
        border-radius: 16px !important;
    }

    .nav-header nav .container-fluid {
        padding-inline: 12px !important;
    }

    .nav-header nav .d-flex.justify-content-between {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 44px;
        grid-template-areas:
            "brand toggle"
            "actions actions";
        align-items: center !important;
        justify-items: stretch;
        gap: 9px 8px !important;
    }

    .nav-header nav .nav-middle {
        grid-area: brand;
        width: auto !important;
        min-width: 0;
        order: 0 !important;
        text-align: start !important;
    }

    .nav-header .nav-brand img {
        width: clamp(145px, 42vw, 180px) !important;
    }

    .nav-header nav .d-flex.justify-content-between > .nav-item.d-lg-none {
        grid-area: toggle;
        width: 44px !important;
        height: 44px;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .nav-header .toggle-btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 10px;
        background: #edf7f1;
        color: #17613c;
        cursor: pointer;
    }

    .nav-header nav .d-flex.justify-content-between > .nav-item:last-child {
        grid-area: actions;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        flex-basis: auto !important;
        justify-content: center;
    }

    .nav-header .links {
        width: 100% !important;
        max-width: 100% !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 6px !important;
    }

    .nav-header .links li {
        padding-inline: 0 !important;
    }
}

@media (max-width: 360px) {
    .nav-header .links a.account-signin,
    .nav-header .links a.account-register,
    .nav-header .links a.account-dashboard {
        font-size: 10px !important;
        padding-inline: 6px !important;
    }
}

/* Account actions also need their brand styling on pages without homepage CSS. */
.nav-header .links a.account-signin,
.nav-header .links a.account-register,
.nav-header .links a.account-dashboard {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: auto !important;
    height: auto !important;
    min-height: 46px !important;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.6 !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.nav-header .links a.account-signin {
    border: 1px solid #9bbba7 !important;
    background: #fff !important;
    color: #17613c !important;
}

.nav-header .links a.account-register {
    border: 1px solid #078c4c !important;
    background: #078c4c !important;
    color: #fff !important;
}

.nav-header .links a.account-dashboard {
    gap: 9px !important;
    border: 1px solid #80ad91 !important;
    background: #eef6f0 !important;
    color: #17613c !important;
    box-shadow: 0 3px 9px rgba(25, 77, 48, .06);
}

.nav-header .links a.account-dashboard .dashboard-symbol {
    flex: 0 0 auto;
    margin-inline-end: 5px;
}

.nav-header .links a.account-signin:hover,
.nav-header .links a.account-dashboard:hover {
    background: #e8f3eb !important;
}

.nav-header .links a.account-register:hover {
    background: #17613c !important;
}

.nav-header .links a.account-signin:focus-visible,
.nav-header .links a.account-register:focus-visible,
.nav-header .links a.account-dashboard:focus-visible {
    outline: 2px solid #17613c;
    outline-offset: 2px;
}

@media (max-width: 991.98px) {
    .nav-header .links {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
    }

    .nav-header .links li {
        flex: 0 0 auto !important;
        margin: 0 !important;
        white-space: nowrap;
    }

    .nav-header .links a.account-signin,
    .nav-header .links a.account-register,
    .nav-header .links a.account-dashboard {
        min-height: 42px !important;
        padding: 9px 7px !important;
        font-size: 11px !important;
    }

    .nav-header .links a.account-dashboard {
        gap: 4px !important;
    }

    .nav-header .links a.account-dashboard .dashboard-symbol {
        width: 16px;
        height: 16px;
        margin-inline-end: 0;
    }
}

@media (max-width: 360px) {
    .nav-header .links {
        gap: 4px !important;
    }

    .nav-header .links a.account-signin,
    .nav-header .links a.account-register,
    .nav-header .links a.account-dashboard {
        padding-inline: 6px !important;
        font-size: 10px !important;
    }
}
