/*desktop*/
.nav_container {
    --drop-shadow-height: 8px;

    position: fixed;
    z-index: var(--navbar-z-index);
    top: var(--navbar-top);
    left: 50%;
    right: 0;
    width: calc(100% - var(--navbar-side-margin) * 2);
    height: var(--navbar-height);
    transform: translateX(-50%);
    padding: 0 3em;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(26, 26, 26, 0.803);
    filter: drop-shadow(0 var(--drop-shadow-height) 0px rgba(0, 0, 0, 0.49));
    border-radius: var(--border-radius-large);
    font-size: 1rem;
    transition-property: top, width, border-radius, filter, background-color, box-shadow, font-size;
    transition-duration: 200ms;
    transition-timing-function: linear;
}

.nav_container.pinned {
    top: 0;
    width: 100vw;
    border-radius: 0;
    filter: none;
    background-color: rgba(26, 26, 26, 1);
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.7);
    font-size: 0.9rem;
}

.no_transition {
    transition: none !important;
}

@media screen and (max-width: 1730px) {
    .nav_container {
        font-size: 0.86rem;
    }
}

.nav_section {
    flex: 2 2;
    display: grid;
    grid-auto-flow: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0 1em;
    margin-top: calc(var(--drop-shadow-height) / 2); /*half of drop-shadow*/
}

.nav_section__entry {
    position: relative;
    height: calc(100% - var(--drop-shadow-height) / 2);
    display: grid;
    place-items: center;
    padding: 0 2em;
}

.nav_section__entry > :first-child:not(.obfuscated__container) {
    font-size: 1.2em;
    font-weight: 500;
    cursor: pointer;
}

.obfuscated__container {
    width: 16ch;
    display: grid;
    place-items: center;
}

.obfuscated {
    font-size: 1.2em;
    font-weight: 500;
    cursor: pointer;
}

.nav_section__entry:not([data-dropdown]) > :first-child:not(.obfuscated__container) {
    color: inherit;
}

.nav_section__entry:hover > .nav__entry_dropdown,
.nav_section__entry:focus > .nav__entry_dropdown,
.nav_section__entry:active > .nav__entry_dropdown,
.nav__entry_dropdown:hover {
    opacity: 1;
    z-index: 0;
    pointer-events: initial !important;
}

.nav__entry_dropdown {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    position: absolute;
    top: 100%;
    left: 50%;
    translate: -50% 0;
    width: max-content;
    background-color: rgba(var(--rgb-gray-700), 0.7);
    border-radius: 0 0 var(--border-radius-small) var(--border-radius-small);
    opacity: 0;
    z-index: -1;
    pointer-events: none;
    padding: 0.625em 2.4em 1.2em;
    transition-property: background-color, opacity;
    transition-duration: 200ms;
    transition-timing-function: linear;
}

.nav_container.pinned .nav__entry_dropdown {
    background-color: rgba(var(--rgb-gray-700), 1);
}

.nav__entry_dropdown > a {
    font-size: 18px;
    font-weight: 300;
    text-transform: capitalize;
    hyphens: auto;
    user-select: none;
    cursor: pointer;
    width: fit-content;
    color: inherit;
    line-height: unset !important;
}

.nav_logo {
    display: grid;
    place-items: center;
}

.nav_logo > img {
    width: auto;
    height: 40px;
}

.nav_buttons {
    display: grid;
    grid-auto-flow: column;
    gap: 0.6rem;
    align-items: center;
    margin: 0 1em 0 2em;
}

.nav_buttons a {
    font-size: 1.2em;
    font-weight: 600;
    border-radius: var(--border-radius-small);
    padding: 0.3em 2.1em;
    cursor: pointer;
    transition: background-color 200ms;
}

.nav_buttons a:hover {
    text-decoration: none;
}

.nav_buttons a[data-type="shop"] {
    background-color: var(--yellow-200);
}

.nav_buttons a[data-type="shop"]:hover {
    background-color: var(--yellow-400);
}

.nav_buttons a[data-type="login"] {
    background-color: var(--green-200);
}

.nav_buttons a[data-type="login"]:hover {
    background-color: var(--green-400);
}

/* media queries */
@media screen and (max-width: 1840px) {
    .nav_container {
        padding: 0 1em;
    }

    .nav_section {
        padding: 0;
    }

    .nav_section__entry {
        padding: 0 1.5em;
    }
}

/*mobile*/
.mobile_nav_container {
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;

    position: fixed;
    z-index: var(--navbar-z-index);
    top: 0;
    width: 100%;
    height: var(--navbar-height);
    padding: 0 1em;
    background-color: rgba(26, 26, 26, 1);
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.7);
    font-size: 0.9rem;
    box-sizing: border-box;
}

.burger_logo {
    user-select: none;
    cursor: pointer;
}

.burger_logo:hover {
    filter: brightness(0.9);
}

.mobile_nav_overlay {
    opacity: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: -1000;
    transition-property: opacity;
    transition-duration: 400ms;
    transition-timing-function: ease-in-out;
}

.mobile_nav_overlay.active {
    z-index: calc(var(--navbar-z-index) + 1);
    opacity: 1;
}

.nav_logo__mobile {
    display: none;
}

.nav_logo__mobile > img {
    width: auto;
    height: 40px;
}
