.hero-preference-containing-block {
    position: relative;
}

.hero-preference {
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: 0.5rem;
    z-index: 5;
    display: flex;
    color: inherit;
}

/* The legacy menu's upper strip is a sibling stacking layer. */
#top-header-container > .hero-preference {
    z-index: 50001;
}

.hero-preference .btn-xs {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    box-sizing: border-box;
    block-size: 20px;
    padding: 0 0.375rem;
    background: color-mix(in srgb, currentColor 7%, transparent);
    border: 1px solid color-mix(in srgb, currentColor 48%, transparent);
    border-block-start: 0;
    border-radius: 0 0 3px 3px;
    box-shadow: none;
    color: inherit;
    font-size: 0.75rem;
    line-height: 1;
    white-space: nowrap;
}

.hero-preference .btn-xs:is(:hover, :focus-visible) {
    background: color-mix(in srgb, currentColor 16%, transparent);
}

.hero-preference .btn-xs:focus-visible [data-hero-preference-label] {
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.main-body[data-floating-hero-header-clearance]::before {
    content: "";
    display: block;
    block-size: var(--floating-hero-header-clearance, 0px);
}

@media (max-width: 980px) {
    .hero-preference .btn-xs {
        block-size: 14px;
        padding-inline: 0.25rem;
        font-size: 0.6875rem;
    }
}

.hero-preference-details > summary {
    cursor: pointer;
    padding: 0.5rem 1rem;
}

.group-custom-page-title {
    font-size: 1.5rem;
    margin: 0.5rem 1rem 1rem;
}

@media (max-width: 980px) {
    body .page-menu-section.hero-hidden-page-menu,
    body .group-today-navigation-bar.hero-hidden-page-menu-outer {
        display: block !important;
    }

    .hero-hidden-page-menu .page-menu {
        flex-wrap: wrap;
        row-gap: 0.25rem;
    }

    .hero-hidden-page-menu .page-name {
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    body .page-menu-section.hero-hidden-page-menu .page-menu > .page-menu-wrapper {
        display: block !important;
        flex: 1 1 100%;
        margin-inline-start: 0;
    }

    body .page-menu-section.hero-hidden-page-menu .page-menu .page-menu-options {
        display: flex !important;
        flex: 1 1 100%;
        flex-wrap: wrap;
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
        margin-inline-start: 0;
    }

    .hero-hidden-page-menu .page-menu-options > div,
    .hero-hidden-page-menu .page-menu-options a {
        min-width: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

/* The legacy header's base stylesheet hides this launcher on desktop. */
body:is(.TODAY, :has([data-hero-preference])) #MainHeader .CollabMenu .SearchIcon[aria-controls="wol-header-search-overlay"] {
    display: block;
}

body.TODAY #MainHeader .today-header-menu {
    display: none;
}

@media (max-width: 980px) {
    body.TODAY #top-header-container #MainHeader .full-menu {
        flex-wrap: nowrap;
        justify-content: space-between;
    }

    body.TODAY #top-header-container #MainHeader .right-menu {
        justify-content: flex-end;
        margin-inline-start: auto;
    }

    body.TODAY #top-header-container #MainHeader .BasicFunctions {
        column-gap: 0.5rem;
    }

    body.TODAY #MainHeader .today-header-menu {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        color: inherit;
        font-size: 1.25rem;
    }
}
