.authentication-menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-on-inverse);

    .authentication-menu__profile-toggle { anchor-name: --profile-menu }
    #admin-button { display: none; anchor-name: --admin-menu }
    .site-header__account { min-inline-size: 0 }
    .site-header__label {
        min-inline-size: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    @container site (width < 54rem) {
        &:has(> .authentication-menu__profile-toggle) > .site-header__account { display: none }
    }

    @container site (width >= 54rem) {
        .authentication-menu__profile-toggle { display: none }
        #admin-button { display: inline-grid }
    }

    .header__popover {
        background-color: var(--surface-popover);
        color: var(--text-on-popover);
        border: none;
        position: fixed;
        inset: auto;
        top: anchor(bottom);
        right: anchor(right);

        nav {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            padding: 0.5rem;
        }

        :focus-visible { outline-color: var(--text-on-popover) }
    }

    #profile-popover { position-anchor: --profile-menu }
    #admin-popover { position-anchor: --admin-menu }
}
