/* Одинаковая компоновка главной, каталога, форм и предстартовой страницы. */
.public-header {
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--chrome-border);
    box-shadow: none;
    height: auto;
}

.public-header .public-header__inner {
    align-items: center;
    display: flex;
    gap: 0;
    height: auto;
    justify-content: flex-start;
    margin-left: auto;
    margin-right: auto;
    max-width: var(--chrome-content-width);
    min-height: calc(var(--chrome-header-height) - 1px);
    padding: 8px 0;
    width: calc(100% - 64px);
}

.public-header .public-header__brand {
    flex: 0 0 auto;
    margin-right: 24px;
}

.public-header .public-header__brand img {
    height: 52px;
    max-width: none;
    width: 224px;
}

.public-header .public-header__nav {
    align-items: center;
    align-self: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 0;
}

.public-header .public-header__nav > a {
    align-items: center;
    border-radius: var(--chrome-control-radius);
    color: var(--chrome-ink);
    display: inline-flex;
    font-size: var(--chrome-nav-font-size);
    font-weight: var(--chrome-nav-font-weight);
    line-height: 1.5;
    min-height: var(--chrome-control-height);
    padding: 12px 10px;
    text-decoration: none;
    white-space: nowrap;
}

.public-header .public-header__nav > a + a {
    margin-left: 2px;
}

.public-header .public-header__nav > a::after {
    display: none;
}

.public-header .public-header__nav > a:hover,
.public-header .notification-bell:hover,
.public-header__actions .catalog-login-link:hover,
.public-header__actions .login-link:hover,
.public-header__menu-toggle:hover {
    background: var(--chrome-hover);
    color: var(--chrome-ink);
    text-decoration: none;
}

.public-header .public-header__nav > a.is-active,
.public-header .public-header__nav > a[aria-current="location"],
.public-header .public-header__nav > a[aria-current="page"] {
    background: var(--chrome-selected);
}

.public-header__selectors {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    margin-left: auto;
    padding-left: var(--chrome-action-gap);
}

.public-header__actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    margin-left: var(--chrome-action-gap);
}

.public-header .public-header__actions > * + * {
    margin-left: var(--chrome-action-gap);
}

.public-header .public-header__selectors > * + * {
    margin-left: var(--chrome-action-gap);
}

@media (min-width: 1441px) {
    .public-header .public-header__menu-toggle + * {
        margin-left: 0;
    }
}

.public-header .country-switcher__menu,
.public-header .language-switcher .ts-dropdown {
    box-sizing: border-box;
    margin: 6px 0 0;
    max-height: calc(100vh - 84px);
    max-width: calc(100vw - 16px);
    width: 360px;
}

.public-header .language-switcher .ts-dropdown-content {
    height: auto;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.public-header .notification-bell {
    align-items: center;
    border-radius: var(--chrome-control-radius);
    color: var(--chrome-ink);
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    line-height: 1;
    min-height: 44px;
    min-width: var(--chrome-control-height);
    padding: 0;
    text-decoration: none;
}

.public-header .notification-bell svg {
    display: block;
    flex: 0 0 19px;
}

.public-header .notification-bell .badge {
    background: #ffdc73;
    border-radius: 99px;
    color: #654f13;
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
    margin-left: 4px;
    min-width: 17px;
    padding: 1px 4px;
    text-align: center;
}

.public-header__actions .catalog-login-link,
.public-header__actions .login-link {
    background: transparent;
    border: 0;
    border-radius: var(--chrome-control-radius);
    color: var(--chrome-ink);
    font-size: var(--chrome-nav-font-size);
    font-weight: var(--chrome-nav-font-weight);
    line-height: 1.5;
    min-height: 44px;
    padding: 0 10px;
    text-decoration: none;
    white-space: nowrap;
}

.public-header__menu-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: var(--chrome-control-radius);
    color: var(--chrome-ink);
    cursor: pointer;
    display: none;
    flex: 0 0 44px;
    height: 44px;
    justify-content: center;
    padding: 0;
    width: 44px;
}

.public-header__menu-lines,
.public-header__menu-lines::after,
.public-header__menu-lines::before {
    background: currentColor;
    border-radius: 2px;
    height: 2px;
    width: 18px;
}

.public-header__menu-lines {
    position: relative;
}

.public-header__menu-lines::after,
.public-header__menu-lines::before {
    content: "";
    left: 0;
    position: absolute;
}

.public-header__menu-lines::after {
    top: 6px;
}

.public-header__menu-lines::before {
    top: -6px;
}

@media (max-width: 1440px) {
    .public-header .public-header__inner {
        flex-wrap: wrap;
    }

    .public-header .public-header__brand {
        margin-right: 8px;
    }

    /* Без JavaScript ссылки остаются обычной видимой строкой. */
    .public-header .public-header__nav {
        order: 3;
        position: static;
        width: 100%;
    }

    .public-header--enhanced .public-header__nav {
        background: #fff;
        border: 1px solid var(--catalog-line, var(--line, #d9e6f1));
        border-radius: 16px;
        box-shadow: 0 .8rem 2rem rgba(0, 40, 91, .16);
        display: none;
        height: auto;
        max-height: calc(100vh - var(--header-height, 76px) - 16px);
        max-width: calc(100vw - 28px);
        overflow-y: auto;
        padding: 8px;
        position: absolute;
        right: 14px;
        top: calc(100% + 8px);
        width: 300px;
        -webkit-overflow-scrolling: touch;
    }

    .public-header--enhanced .public-header__nav.is-open {
        display: block;
    }

    .public-header .public-header__nav > a {
        align-items: center;
        border-radius: 11px;
        display: flex;
        margin: 0;
        min-height: 44px;
        padding: 0 13px;
    }

    .public-header .public-header__nav > a + a {
        margin-left: 0;
    }

    .public-header .public-header__nav > a::after {
        display: none;
    }

    .public-header .public-header__nav > a.is-active {
        background: var(--chrome-selected);
    }

    .public-header--enhanced .public-header__menu-toggle {
        display: flex;
    }
}

@media (max-width: 980px) {
    .public-header .public-header__inner {
        width: calc(100% - 36px);
    }
}

@media (max-width: 820px) {
    .public-header .public-header__brand img {
        height: 44px;
        width: 182px;
    }

    .public-header__selectors {
        padding-left: 0;
    }

    .public-header .country-switcher > summary {
        justify-content: center;
        min-width: 44px;
        padding: 0;
    }

    .public-header .country-switcher > summary > span {
        clip: rect(0, 0, 0, 0);
        height: 1px;
        overflow: hidden;
        position: absolute;
        width: 1px;
    }

    .public-header .country-switcher > summary .country-switcher__flag {
        margin-right: 0;
    }

    .public-header .country-switcher > summary::after {
        margin-left: 4px;
    }

    .public-header .language-switcher .ts-wrapper,
    .public-header .language-switcher select.language-switcher__select {
        max-width: 84px;
        width: 84px;
    }
}

@media (max-width: 760px) {
    .public-header .public-header__inner {
        width: calc(100% - 28px);
    }

    .public-header .public-header__brand {
        flex: 0 1 172px;
        max-width: calc(100% - 148px);
        min-width: 0;
    }

    .public-header .public-header__brand img {
        max-width: 100%;
        width: 100%;
    }

    .public-header--enhanced .public-header__nav {
        left: 14px;
        max-width: none;
        right: 14px;
        width: auto;
    }

    .public-header__actions {
        justify-content: flex-end;
        margin: 8px 0 0;
        order: 4;
        width: 100%;
    }

    .public-header__selectors {
        position: relative;
    }

    .public-header .country-switcher {
        position: static;
    }

    .public-header__actions .public-header__menu-toggle {
        margin-right: auto;
    }

    .public-header .login-link {
        display: inline-flex;
    }
}

@media (max-width: 600px) {
    /* Никнейм занимает вторую строку, не сдвигая надпись «Выйти» относительно соседей. */
    .public-header__actions {
        align-items: flex-start;
    }
}

@media (max-width: 420px) {
    .public-header .public-header__inner {
        width: calc(100% - 20px);
    }
}
