/*  ===================== 
    Navigation
    ===================== */

/* styling for overlay while menu is open */
.mainmenu {
    height: 75px;
    padding: 0px;
    background-color: #D52B1E;
    border: 0px;
}

#overlay {
    position: fixed;
    cursor: pointer;
    display: none;
    left: 0;
    bottom: 0;
    right: 0;
    top: 300px;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
}

.navbar.mainmenu {
    position: relative;
}

.navbar {
    border: 0px;
    margin-bottom: 0px;
}

    .navbar > .container {
        padding-left: 0px;
        padding-right: 0px;
        display: flex;
    }

    .navbar a, .navbar li {
        font-weight: 400;
        font-family: 'Rijksoverheid SansWebText', Arial, Verdana, sans-serif;
    }

    /* menu background must have static ancestor */
    .navbar, .nav > li
    .navbar, ul.dropdown-menu,
    .navbar .mainMenuItem.dropdown {
        position: static;
    }

        .navbar .mainmenu {
            position: relative;
        }

/* override existing styling: navbar items need to have display none, and visibility: visible. */
nav ul.dropdown-menu.sub-menu,
nav ul.dropdown-menu {
    visibility: visible;
    display: none;
}

/* override standard styling */
.nav > li > a:hover,
.nav > li > a:focus {
    background-color: transparent !important;
}

.main-navigation {
    margin: 0px;
}

    .main-navigation .active {
        font-weight: inherit;
    }

    /*create padding by giving a width to the element */
    .main-navigation > li > button {
        min-width: 1.4rem;
    }

    .main-navigation > li.mainMenuItem .badge,
    #mlmenu > ul > li.menu__item .badge {
        margin-left: 5px;
        margin-bottom: 1px;
    }

    /*ICONS in NAVBAR*/
    .main-navigation > li:first-child > a::before {
        content: "home";
        font-family: "Rijksoverheid Iconen 2";
        font-size: inherit;
        font-feature-settings: "liga" 1;
        padding-right: 5px;
        position: absolute; /* fixed the position of icon */
        left: 4px; /* fixed the position of icon */
    }

    /* menu icon */
    .main-navigation > li:not(focused-menu):last-child > button::before {
        content: "\EA08";
        font-family: "Rijksoverheid Iconen";
        font-size: 0.75rem;
        font-feature-settings: "liga" 1;
        color: #FFFFFF;
        position: relative;
        z-index: 1010;
    }

    .account-container > li > a,
    .main-navigation > li.mainMenuItem > button,
    .main-navigation > li.mainMenuItem > a {
        min-height: 75px;
        max-height: 75px;
        display: flex;
        align-items: center;
        z-index: 1010;
        padding: 0 1rem 0 2rem;
        border-width: 0px;
        font-weight: inherit;
        text-decoration: none;
        color: inherit;
    }

    /* hover and focus within the main navbar on list items. */
    .main-navigation > li > a:hover,
    .main-navigation > li > a:focus,
    .account-container li > a:hover,
    .account-container li > a:focus,
    .toolbar-button:hover, .toolbar-button:focus,
    .toolbar a:hover, .toolbar a:focus,
    ul.main-navigation .mainMenuItem.dropdown .main-menu-expand-button:focus + a {
        border: none; /* override standard styling */
        border-style: none; /* override standard styling */
        border-width: 0px; /* override standard styling */
        text-decoration: underline; /* fixed the underline for hover */
        z-index: 1009;
    }

    .main-navigation > li:last-child > a:hover {
        border: none; /* override standard styling */
        border-style: none; /* override standard styling */
        border-width: 0px; /* override standard styling */
        z-index: 1009;
    }

    /* Keyboard navigation*/
    .main-navigation > li:last-child > button:focus {
        border: none; /* override standard styling */
        border-style: none; /* override standard styling */
        border-width: 0px; /* override standard styling */
        border-radius: 0%;
        outline: none;
        box-shadow: none;
    }

    /* close icon*/
    .main-navigation > li.focused-menu:last-child > button::before,
    #close-main-dropdown::before {
        content: "\EA05";
        font-family: "Rijksoverheid Iconen";
        font-size: 0.75rem;
        font-feature-settings: "liga" 1;
        position: relative;
        padding-right: 5px; /* for the close icon in the dropdown menu, has no effect for main navigation bar.*/
    }

    /*arrow in navigation*/
    .main-navigation .dropdown-menu a + button.main-menu-expand-button::before {
        content: "delta_rechts";
        float: right;
        width: auto;
        font-family: "Rijksoverheid Iconen 2";
        font-size: 1rem;
        font-feature-settings: "liga" 1;
        vertical-align: text-bottom;
        color: inherit;
        z-index: 1010;
    }

    .main-navigation .dropdown-menu li.mainMenuItem.dropdown > button:focus {
        color: #01689B;
        font-weight: bold;
        outline: 2px dotted #000;
        text-decoration: none;
        outline-offset: 0;
        border: none;
        border-radius: 0;
    }

    /* Main menu items in the navbar itself*/
    .main-navigation > li.mainMenuItem, .account-container > li {
        min-height: 75px;
        max-height: 75px;
        display: flex;
        flex-direction: row;
        font-size: 1.188rem;
        color: #FFFFFF;
    }

/* Fix hover background on menu icon button */
ul.main-navigation .mainMenuItem.dropdown .main-menu-expand-button + a {
    position: relative;
    left: -30px;
    padding-left: 40px;
}

ul.main-navigation .mainMenuItem.dropdown button {
    z-index: 1011;
}

/* CUSTOM DOM elements added for navbar menu structure.*/
/* background of dropdown menu */
.dropdown-menu-main {
    background-color: #FFFFFF;
    width: 100%;
    height: auto;
    position: absolute;
    left: 0px;
    top: 75px; /* calculation of banner and navbar height: will always be the same*/
    z-index: 1000;
    display: none;
    line-height: normal;
    width: 100vw;
}

    .dropdown-menu-main .dropdown-menu-wrapper {
        margin-left: 0px;
        margin-right: 0px;
        display: flex;
    }

    /* lines in between the dropdown menu items*/
    .dropdown-menu-main ul:not(.sub-menu) > li {
        border-top: 1px;
        border-top-color: rgb(180, 180, 180);
        border-top-style: solid;
    }

        .dropdown-menu-main ul:not(.sub-menu) > li:last-child {
            border-bottom: 1px;
            border-bottom-color: rgb(180, 180, 180);
            border-bottom-style: solid;
            margin: 0rem 0rem 2rem 0rem;
        }


.menu-close-wrapper {
    min-height: 48px;
    margin: 0px;
}

.dropdown-list-wrapper {
    flex-direction: column;
}

/* DROPDOWN MENU styles */
.dropdown-menu {
    display: block;
    position: relative;
    /*float: left;*/
    min-width: 100%;
    padding: 0px 0px;
    text-align: left;
    list-style: none;
    border: none; /*overrule standard styles*/
    border-radius: 0px;
    -webkit-box-shadow: none;
    box-shadow: none;
    background-color: transparent;
    z-index: 1000;
}

    .dropdown-menu > li {
        padding: 0.56rem 0px 0.56rem 0.5rem;
        font-size: 1rem;
    }

    .dropdown-menu > li, #close-main-dropdown {
        color: #535353;
    }

    /* fix layout */
    .dropdown-menu > .active > a,
    .dropdown-menu > .active > a:hover,
    .dropdown-menu > .active > a:focus {
        color: inherit;
        background-color: transparent;
    }

    .dropdown-menu > li > a, .dropdown-menu > li > button {
        border-width: 0px;
        font-weight: inherit;
        color: inherit;
        width: auto;
        display: flex;
        align-items: center;
        font-size: inherit;
    }

        /*undo existing styles*/
        .dropdown-menu > li > a:hover {
            color: inherit;
            background-color: inherit;
            text-decoration: none;
        }

        .dropdown-menu > li > a:focus,
        .dropdown-menu > li:hover,
        #close-main-dropdown:hover {
            color: #01689B;
            font-weight: bold;
            background-color: transparent;
            text-decoration: none;
        }

.sub-menu-overview {
    padding-bottom: 1rem;
    min-height: 17px;
    flex-direction: column;
    color: #535353;
}

.sub-menu-title {
    padding-left: 0.56rem;
}

#close-main-dropdown {
    float: right;
    margin-top: 1rem;
}

/* END OF NAV ELEMENT IN MENU*/

.account-container {
    display: flex;
    justify-content: flex-end;
    margin-left: auto;
}

    /* user icon and Mijn voorkeuren icon style. use both selectors because classes of <li> items in loggedin/out en Mijn voorkeuren template differ.  */
    .account-container > li.account-button-container > a::before,
    .account-container > li > a.login-button::before {
        font-size: 1.1rem;
        font-feature-settings: "liga" 1;
        line-height: 1;
        position: absolute;
        top: 1.80rem;
        left: 0.25rem;
        bottom: 0px;
        margin-right: 0.5rem;
        padding-right: 0.5rem;
    }

/* loggedin/out icon */
.account-button-container > a.login-button::before {
    content: 'user';
    font-family: 'Rijksoverheid Iconen 2';
}

/* login/out button: add underline on focus, remove border bottom on focus  */
.account-container li a.login-button:focus {
    border-width: 0;
    text-decoration: underline;
}

/* Mijn voorkeuren icon */
.account-button-container > a::before {
    content: 'settings';
    font-family: 'Material Icons';
}

/* Don't do margin-left if there's a toolbar element before the account-container which does margin-left */
.toolbar + .account-container {
    margin-left: 0;
}

#closed-menu-text {
    display: none;
}