/* Keep the category selector and search centered as one unit on wide headers. */
.header-center-controls {
    display: contents;
}

.header-profile-menu {
    position: relative;
}

.header-profile-menu > .header-icon-link {
    padding: 0;
    cursor: pointer;
}

.header-profile-menu > .header-icon-link[aria-expanded="true"] {
    border-color: #075fff;
    background: #10224a;
    color: #8cb8ff;
}

.header-profile-popover {
    position: absolute;
    z-index: 3500;
    top: calc(100% + 10px);
    right: 0;
    width: 180px;
    overflow: hidden;
    border: 1px solid #343b49;
    border-radius: 10px;
    background: #10141c;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .5);
}

.header-profile-popover[hidden] {
    display: none;
}

.header-profile-popover > a,
.header-profile-popover button {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border: 0;
    background: transparent;
    color: #f6f8fc;
    font: inherit;
    font-size: .88rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.header-profile-popover > a:hover,
.header-profile-popover > a:focus-visible,
.header-profile-popover button:hover,
.header-profile-popover button:focus-visible {
    background: #142541;
    color: #fff;
}

.header-profile-popover .header-profile-logout-form {
    display: block;
    border-top: 1px solid #2a303d;
}

.site-header .header-actions .anonymous-actions .header-auth-button {
    min-width: 112px;
    min-height: 42px;
    padding: 8px 18px;
    border: 1px solid #087bff;
    border-radius: 8px;
    background: #030304;
    color: #fff;
    box-shadow: none;
    font-size: .88rem;
    font-weight: 750;
    white-space: nowrap;
}

.site-header .header-actions .anonymous-actions .header-auth-button:hover,
.site-header .header-actions .anonymous-actions .header-auth-button:focus-visible {
    border-color: #3698ff;
    background: #0a1425;
    color: #fff;
}

@media (max-width: 767px) {
    .site-header .header-actions .anonymous-actions .header-auth-button {
        min-width: 0;
        min-height: 44px;
        padding: 8px 7px;
        border-radius: 8px;
        font-size: .72rem;
    }
}

@media (max-width: 359px) {
    .site-header .header-inner .brand-logo {
        width: 74px;
    }

    .site-header .header-actions .anonymous-actions .header-auth-button {
        padding-inline: 4px;
        font-size: .68rem;
    }
}

@media (min-width: 1201px) {
    .site-header .header-inner.header-inner--with-search {
        grid-template-columns: minmax(260px, 1fr) auto minmax(260px, 1fr);
    }

    .header-inner--with-search .brand-platform {
        grid-column: 1;
        margin-right: 0;
    }

    .header-inner--with-search .header-center-controls {
        grid-column: 2;
        display: flex;
        align-items: center;
        gap: 8px;
        width: min(900px, calc(100vw - 620px));
        min-width: 0;
    }

    .header-inner--with-search .main-nav {
        flex: 0 0 auto;
    }

    .header-inner--with-search .header-category-search {
        flex: 1 1 auto;
        width: auto;
    }

    .header-inner--with-search .header-actions {
        grid-column: 3;
        justify-self: end;
    }
}

@media (min-width: 961px) and (max-width: 1200px) {
    .site-header .header-inner.header-inner--with-search {
        min-height: 0;
        grid-template-columns: auto minmax(0, 1fr) auto;
        column-gap: 12px;
        row-gap: 9px;
        padding: 9px 0 10px;
    }

    .header-inner--with-search .brand-platform {
        grid-column: 1;
        grid-row: 1;
        margin-right: 0;
    }

    .header-inner--with-search .main-nav {
        grid-column: 2;
        grid-row: 1;
    }

    .header-inner--with-search .header-actions {
        grid-column: 3;
        grid-row: 1;
        margin-left: 0;
    }

    .header-inner--with-search .header-category-search {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}
