.nav-container {
    display: flex;
    flex-grow: 1;
    justify-content: end;

    padding: 0 1rem 0 0;

    color: var(--clr-nav-text);

    & > nav {
        position: absolute;
        top: 100%;
        right: 0;

        flex-direction: column;
        /* gap: 0.5rem; */
        align-items: center;
        justify-content: end;

        padding: 0 0 0.5rem;
        border-bottom-left-radius: var(--bdr-rounded);

        background-color: var(--clr-nav-bg);

        @media (width >= 80rem), print {
            position: unset;

            display: flex;
            flex-direction: row;

            width: 100%;
            padding: unset;
            border-radius: unset;
        }
    }

    @media (width >= 80rem), print {
        padding: unset;
    }
}

.nav-separator {
    display: block;
    width: 100%;
    height: 1px;
    background-color: var(--clr-nav-text);

    @media (width >= 80rem), print {
        width: 1px;
        height: 1rem;

        &.nav-separator-first {
            display: none;
        }

        &.nav-separator-long {
            height: 1.5rem;
        }
    }
}

.nav-toggle-button {
    cursor: pointer;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    /* box-sizing: border-box; */
    width: 24px;
    height: 24px;
    padding: 2px 0;

    background: transparent;

    & > span {
        width: 100%;
        height: 2px;
        border-radius: 2px;

        background-color: var(--clr-nav-text);

        transition: var(--transition-easeinout-fast);
    }

    /* Opened state */
    &.opened > span {
        &:nth-child(1) {
            transform: translateY(9px) rotate(45deg);
        }
        &:nth-child(2) {
            opacity: 0;
        }
        &:nth-child(3) {
            transform: translateY(-9px) rotate(-45deg);
        }
    }

    @media (width >= 80rem), print {
        display: none;
    }
}

.nav-dropdown {
    position: relative;
    display: inline-block;
    width: 100%;

    &:hover {
        color: var(--clr-nav-text-hover);
        text-decoration: underline;
    }

    & button:focus {
        color: var(--clr-nav-text-hover);
        text-decoration: underline;
        outline: 2px solid var(--clr-nav-text);
        outline-offset: -1px;
    }

    @media (width >= 80rem), print {
        width: revert;
    }
}

.nav-dropdown-toggle {
    cursor: pointer;

    padding: 0;
    border: none;

    font: inherit;
    color: var(--clr-nav-text);
    text-decoration: none;

    background: transparent;

    &:hover {
        text-decoration: underline;
    }
}

.nav-dropdown-menu {
    position: absolute;
    z-index: 10;
    top: 0;
    right: 102%;

    min-width: 10rem;
    border-radius: var(--bdr-rounded);

    background-color: var(--clr-nav-bg);
    box-shadow: 0 0.25rem 0.5rem rgb(0 0 0 / 10%);

    &.hidden {
        display: none;
    }

    @media (width >= 80rem), print {
        top: 100%;
        right: 0;
        left: auto;

        border-top-left-radius: revert;
        border-top-right-radius: revert;
    }
}

.nav-dropdown-item {
    display: block;

    padding: 0.5rem 2rem;
    border-top: 1px solid var(--clr-nav-text);
    border-bottom: 1px solid var(--clr-nav-text);

    color: var(--clr-nav-text);
    text-decoration: none;
    white-space: nowrap;

    &:hover {
        color: var(--clr-nav-text-hover);
        text-decoration: underline;
    }

    &:focus {
        color: var(--clr-nav-text-hover);
        text-decoration: underline;
        outline: 2px solid var(--clr-nav-text);
        outline-offset: -1px;
    }

    &:last-child {
        border-bottom: none;
        border-bottom-right-radius: var(--bdr-rounded);
        border-bottom-left-radius: var(--bdr-rounded);
    }
}
