.top-nav {
    background-color: var(--color-gray-light);
    display: grid;
    grid-template-columns: auto auto;
    justify-content: end;
    font-weight: 500;
    font-size: 1.4rem;
    z-index: 6;
    width: 100%;
}

.top-nav :where(ul, li) {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: inline-block;
}

.top-nav :where(a) {
    color: var(--color-brand-navy);
}

.top-nav .shared {
    display: grid;
    grid-auto-flow: column;
    align-items: center;
}

.top-nav .shared li {
    padding-inline: 3rem;
    padding-block: 1rem;
}

.top-nav .top-nav-dropdowns {
    display: grid;
    grid-auto-flow: column;

}

.top-nav .top-nav-dropdowns > * {
    padding-inline: 1.5rem;
}

.top-nav .member.grid > a:first-child {
    padding: 1rem 2rem;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

.top-nav .member.grid > a:first-child:hover {
    text-decoration: none;
}

.top-nav > :where(.state, .rewards, .search) {
    padding-inline: 2rem;
    padding-block: 1rem;
}

.top-nav :where(.grid) {
    display: grid;
    align-items: center;
    gap: 1rem;
    color: var(--color-brand-navy);
}

.top-nav .member.grid {
    padding-inline: 0;
    gap: 0;
}

.top-nav :where(.grid a) {
    display: contents;
}

.top-nav > .state,
.top-nav > .member{
    position: relative;
    cursor: pointer;
}

.top-nav .state {
    background-color: var(--color-gray-light-web);
    display: flex;
    align-items: center;
}

.top-nav .state button {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    background-color: transparent;
}

.top-nav .member {
    background-color: var(--color-primary-white);
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: center;
}


.top-nav .member.grid svg,
.top-nav .state svg {
    height: 1.8rem;
    width: 1.8rem;
}

.top-nav .state-text {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: center;
}

.top-nav .state-dropdown-svg {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    justify-content: center;
}

.top-nav .state-dropdown-svg svg {
    width: 1rem;
    margin-left: 1rem;
    transform: translateY(0.2rem);
}

.top-nav .social a svg {
    width: 6rem;
    height: 6rem;
}

.top-nav .search {
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 6rem;
    background-color: var(--color-brand-navy);
    height: 100%;
}

.top-nav .search svg {
    display: inline-block;
    min-width: 2rem;
    max-width: 2.01rem;
    aspect-ratio: 1 / 1;
    color: var(--color-primary-white)
}

.top-nav .top-nav-item svg {
    margin-left: 0.5rem;
    width: 1rem;
}

.top-nav .top-nav-item svg path {
    fill: var(--color-brand-navy);
}

@supports selector(:has(+ *)) {
    .site-header:not(.visibility-hidden):has(.nav-searchbox.hidden-top) .top-nav .search .close svg {
        display: none;
    }

    .site-header:not(.visibility-hidden):has(.nav-searchbox:not(.hidden-top)) .top-nav .search .close svg {
        display: block;
    }
}

.site-header:not(.visibility-hidden) .top-nav .search .close svg {
    display: none;
}

@supports selector(:has(+ *)) {
    .site-header:not(.visibility-hidden):has(.nav-searchbox:not(.hidden-top)) .top-nav .search .search-icon svg {
        display: none;
    }
}

ul.shared > .menu-footer-nav-container {
    display: none;
}


.top-nav :where(.middle-menu) {

    background: var(--color-brand-pale-blue);

    .middle-menu-link {
        height: 100%;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;

        &:hover {
            text-decoration: none;
        }

    }
}

@media (max-width: 1245px) {

    .top-nav {
        background: var(--color-gray-light-web);
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-end;
    }

    .top-nav > .shared-links-container {
        background: var(--color-gray-light);
        width: 100%;
    }

    .top-nav .shared {
        display: flex;
        flex-flow: row;
        gap: 2rem;
        justify-content: flex-end;
    }


    .top-nav > :where(.state, .member, .search) {
        padding-inline: 2rem !important;
    }

    ul.shared > .menu-footer-nav-container {
        display: block;
    }
}

@media screen and (max-width: 1024px) {
    .top-nav .shared {
        display: none;
    }

}

@media (max-width: 812px) {
    .top-nav > * {
        margin-inline: 0;
    }

    .top-nav svg:nth-child(n+2) {
        display: none;
    }

}

@media (max-width: 600px) {
    .top-nav {
        display: flex;
    }

    .top-nav-dropdown .close-curtain > svg {
        margin-right: 0;
    }

    .top-nav .member.grid > a:first-child {
        padding-inline: 1rem;
    }

    .top-nav .shared a,
    .top-nav > :where(.state, .member, .search) {
        padding-inline: 2rem;
    }

    .top-nav .member,
    .top-nav .state > button{
        display: flex;
        flex-flow: row wrap;
        justify-content: center;
        align-items: center;
        row-gap: 0.4rem;
    }

}

@media (max-width: 450px) {
    .top-nav .shared a, .top-nav > :where(.state, .member, .search) {
        padding-inline: 1rem;
    }

    .top-nav .state-dropdown-svg {
        display: none;
    }


    .top-nav .state button.grid {
        display: flex;
        align-items: flex-end;
    }
}


