/* Secondary nav */

.secondary-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    box-shadow: var(--secondary-nav-box-shadow);
    background-color: var(--secondary-nav-bg);
    margin: 0;
    padding: 0 18px;
    column-gap: 18px;
    width: 100%;

    @media only screen and (max-width: 1024px) {
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
    }
}

.nav-tabsV2 {
    all: unset;
    overflow-x: auto;
    max-width: 100%;
}

.nav-tabsV2,
.nav-tab-menu {
    list-style-type: none;
    display: flex;
    flex-wrap: nowrap;
}

.nav-tab__link,
.nav-tab--active__link {
    padding: 5px 18px;
    white-space: nowrap;
    display: inline-block;
    color: var(--secondary-nav-tab-fg);
    background-color: var(--secondary-nav-tab-bg);
    font-size: 14px;
    border: none;
    text-align: left;
    cursor: pointer;

    &:hover {
        color: var(--secondary-nav-tab-hover-fg);
        background-color: var(--secondary-nav-tab-hover-bg);
        text-decoration: var(--secondary-nav-tab-hover-text-decoration);
        text-underline-offset: 3px;
        filter: brightness(120%);
    }

    @media only screen and (max-width: 1024px) {
        padding: 12px;
    }
}

.nav-tab--active__link {
    text-decoration: var(--secondary-nav-tab-active-text-decoration);
    text-underline-offset: 3px;
}

/* Secondary nav menus (used on profile page) */

.nav-tab-menu:hover > ul,
.nav-tab-menu:focus-within > ul {
    display: flex;
}

.nav-tab-menu__items {
    margin-left: 12px;
    display: none;
    position: absolute;
    top: calc(80px - 5px);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 8px 0;
    background-color: var(--secondary-nav-tab-menu-bg);
    border: var(--secondary-nav-tab-menu-border);
    border-radius: var(--secondary-nav-tab-menu-border-radius);
    box-shadow: var(--secondary-nav-tab-menu-box-shadow);
    list-style-type: none;
    z-index: 1000;

    @media only screen and (max-width: 1024px) {
        top: calc(80px + (12px - 5px) - 5px);
    }
}

.nav-tab-menu__items::before {
    content: '';
    display: block;
    height: 5px;
    left: 0;
    position: absolute;
    top: -5px;
    width: 100%;
}

.nav-tab-menu__items .nav-tab__link,
.nav-tab-menu__items .nav-tab--active__link {
    padding: 8px 24px 8px 16px;
    width: 100%;
}

/* Breadcrumbs */

.breadcrumbsV2 {
    all: unset;
    display: flex;
    list-style-type: none;
    font-size: 14px;
    align-items: center;
    overflow-x: hidden;
    max-width: 100%;
}

.breadcrumbV2,
.breadcrumb--active {
    margin: 5px 0;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;

    &:first-child {
        flex: auto 0 0;
    }

    &:not(:first-child) {
        max-width: max-content;
        flex: 100% 0 10;
    }
}

.breadcrumbV2:not(:first-child)::before,
.breadcrumb--active:not(:first-child)::before {
    content: '\f105';
    font-family: 'Font Awesome 5 Pro';
    opacity: 60%;
    padding-left: 0.5ch;
}

.breadcrumb--active {
    color: var(--breadcrumb-active-fg);
}

.breadcrumb__link {
    text-decoration: var(--breadcrumb-inactive-text-decoration);
    color: var(--breadcrumb-fg);
    cursor: pointer;

    &:hover {
        color: var(--breadcrumb-hover-fg);
    }
}
