/*
 * The legacy app wears the Temple navy across the top of every page, so the
 * topbar carries the same colour here instead of Filament's white.
 *
 * Registered CSS assets are rendered by `@filamentStyles`, and the panel theme
 * is rendered after it, so Filament's own rules come later in the cascade than
 * this file. Every selector below is therefore one class heavier than the
 * vendor rule it replaces rather than relying on source order.
 */
.fi-body .fi-topbar {
    background-color: var(--temple-frame);
}

/*
 * The wordmark ships as a single colour navy SVG, which disappears against the
 * navy bar. Filament renders it as an `img`, so its fill cannot be reached from
 * CSS: flattening the image to black and inverting it paints the whole mark
 * white. Below 1024px Filament hides this copy and shows the sidebar's
 * instead, which admin-sidebar.css repaints the same way.
 */
.fi-body .fi-topbar .fi-logo {
    filter: brightness(0) invert(1);
}

/*
 * The sidebar toggle is a gray icon drawn for a white bar. It only appears
 * below 1024px, where it is the only control the navy sits behind.
 */
.fi-body .fi-topbar .fi-icon-btn {
    color: var(--color-white);
}

.fi-body .fi-topbar .fi-icon-btn:not(.fi-disabled):not([disabled]):hover {
    background-color: color-mix(in oklab, var(--color-white) 10%, transparent);
    color: var(--color-white);
}

/*
 * The link across to the coverholder portal.
 *
 * Drawn as a quiet control on the navy rather than a button, because it is a
 * way out of this half of the application rather than an action within it. It
 * sits beside the user menu, so it borrows that control's proportions.
 */
.fi-body .fi-topbar .fi-topbar-portal-link {
    align-items: center;
    border-radius: var(--radius-lg);
    color: var(--primary-100);
    display: flex;
    gap: calc(var(--spacing) * 2);
    font-size: 0.875rem;
    font-weight: 500;
    padding: calc(var(--spacing) * 2) calc(var(--spacing) * 3);
    transition: background-color 75ms ease-out, color 75ms ease-out;
}

.fi-body .fi-topbar .fi-topbar-portal-link:hover {
    background-color: color-mix(in oklab, var(--color-white) 10%, transparent);
    color: var(--color-white);
}

.fi-body .fi-topbar .fi-topbar-portal-link-icon {
    height: 1.25rem;
    width: 1.25rem;
}

/*
 * Below the width where the topbar starts giving room up to the search field,
 * the icon carries the meaning on its own.
 */
@media (max-width: 768px) {
    .fi-body .fi-topbar .fi-topbar-portal-link-label {
        display: none;
    }
}
