#header {
    display: flex;
    align-items: stretch;
    height: var(--headerHeight);
    position: sticky;
    inset-block-start: 0;
    z-index: 10;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
    #header {
        position: relative;
        box-shadow: none;
    }
}

#header > .inner {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: var(--innerWideWidth);
    padding-block: calc(10px + env(safe-area-inset-top, 0px))
        calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--color-bg);
    z-index: 5;
}

@media (min-width: 1200px) {
    #header > .inner {
        gap: 32px;
    }
}

#header .logo {
    display: block;
    width: 90px;
    flex-shrink: 0;
}

@media (min-width: 1200px) {
    #header .logo {
        width: 142px;
    }
}

#header .logo .img {
    display: block;
    max-width: 100%;
}

@media (max-width: 1199px) {
    #header .headerLoggedButton,
    #header .headerAuthButton {
        margin-inline-start: auto;
        height: 32px;
        padding-block: 6px;
        padding-inline: 12px;
        min-width: 0;
    }

    #header .supportButton {
        display: none;
    }
}

#header .headerNav {
    display: contents;
    align-self: stretch;
    align-items: stretch;
    gap: 32px;
}

@media (min-width: 1200px) {
    #header .headerNav {
        display: flex;
    }
}

#header .headerActionsNav {
    display: contents;
    align-items: center;
    gap: 12px;
    margin-inline-start: auto;
}

@media (min-width: 1200px) {
    #header .headerActionsNav {
        display: flex;
    }
}

#header .headerNavItem {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--color-gray-11);
    font-size: 14px;
    font-weight: 500;
    line-height: 114%;
}

#header .headerNavItem.dropdown-button {
    cursor: pointer;
}

#header .headerNavItem.active,
#header .headerNavItem.dropdown-button:has(.dropdown),
#header
    .headerNavItem:not(.dropdown-button):is(:hover, :active, :focus-visible) {
    color: var(--color-font);
}

#header .headerNavItem.dropdown-button:not(:has(.dropdown)) {
    cursor: not-allowed;
}

#header .headerNavItem.dropdown-button:not(:has(.dropdown)) > .chevron {
    display: none;
}

#header .headerNavItem.dropdown-button > .chevron {
    transition: rotate 0.25s ease;
}

#header
    .headerNavItem.dropdown-button:is(:hover, :active, :focus-visible)
    > .chevron {
    rotate: 0.5turn;
}

#header .headerLoggedButton:has(.text:empty) {
    display: none;
}

#header .headerLoggedButton:not(:has(.text:empty)) ~ .headerAuthButton {
    display: none;
}

#header .headerLoggedButton,
#header .headerAuthButton {
    min-width: 170px;
    gap: 8px;
}

#header .headerLoggedButton .text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 170px;
}

#header .headerLoggedButton .icon {
    flex-shrink: 0;
    width: 12px;
}

#header .headerLoggedButton {
    border: 1px solid transparent;
}

#header .headerLoggedButton:not(:is(:hover, :active, :focus-visible, .active)) {
    border: 1px solid var(--color-light-3);
    background: 1px solid var(--color-light-1);
    color: var(--color-orange);
}

@media (min-width: 768px) {
    #header > .inner {
        padding-inline: var(--innerWidePx);
    }
}
