/*
    MyChild facility bar -- the row between the header and the nav. [MST6-1250]

    Left:  the facility (UserIdentity.Ui, Components/FacilitySwitcher/Bar.cshtml)
    Right: the user menu (Views/Shared/_UserMenu.cshtml)

    The dropdown panels, the facility name and the Switch pill are styled in the shared
    View_HeaderDropdown_Style.css; this file is the bar itself and the user's name and initials.
*/

.facility-context-bar {
    flex-shrink: 0; /* body is a flex column (site.css); the bar must not be squeezed by the page */
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 60px;
    padding: 8px 20px;
    background: #ffffff;
    border-bottom: 1px solid #dfe3e7;
}

.facility-context-bar__facility {
    min-width: 0; /* lets a long facility name truncate instead of overflowing */
    flex: 1 1 auto;
}

.facility-context-bar__user {
    flex-shrink: 0;
}

/* #region [ User menu ] */

.user-menu__toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 4px 4px;
    border-radius: 999px;
    color: #1b2430;
    transition: background-color 0.15s ease;
}

    .user-menu__toggle:hover,
    .user-menu[open] > .user-menu__toggle {
        background: #f1f4f5;
    }

.user-menu__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--aa-primary-border, #1b776e);
    color: var(--aa-primary-text, #ffffff);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.user-menu__name {
    max-width: 260px;
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu__panel {
    min-width: 220px;
}

@media (max-width: 576px) {
    .facility-context-bar {
        padding: 6px 12px;
        gap: 10px;
    }

    /* The facility name needs the width more; the initials still identify the user. */
    .user-menu__name {
        display: none;
    }
}

@media print {
    .facility-context-bar__user {
        display: none;
    }
}

/* #endregion */
