/*
 * Topbar placement for the space switcher.
 *
 * Registered through FilamentAsset (see AppServiceProvider) alongside the editor
 * CSS. Plain CSS on purpose: it is served outside the Tailwind build.
 *
 * The switcher is mounted at the TOPBAR_START render hook. That is the only hook
 * in the topbar outside the `x-persist` container on `fi-topbar-end`, and so the
 * only one that re-renders when a record page moves the user to another space —
 * but it is also the *first* flex child of the topbar, which would put the
 * switcher to the left of the logo. Ordering it here rather than picking a
 * different hook keeps the correct hook and the correct layout.
 *
 * Result, left to right: logo, current space, then everything Filament pins to
 * the right of the topbar.
 */

.fi-space-switcher {
    order: 1;
}

.fi-topbar-end {
    order: 2;
}

/* A space can be called anything. The topbar cannot. */
.fi-space-switcher .fi-topbar-item-label {
    display: block;
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
