/*
 * Collapsed-sidebar brand mark.
 *
 * When the desktop sidebar is collapsed (icon rail), Filament's `.fi-sidebar`
 * loses the `fi-sidebar-open` class (see vendor sidebar/index.blade.php). In that
 * state we hide the full "nexpert" wordmark and reveal the small "n" mark.
 *
 * The logo wrapper in `.fi-sidebar-header` is normally hidden by Filament via
 * Alpine `x-show="$store.sidebar.isOpen"` (inline display:none). An external
 * `!important` rule overrides that inline (non-important) style only while
 * collapsed. The `.fi-sidebar:not(.fi-sidebar-open)` scope guarantees these
 * rules never touch the topbar/mobile logo (which lives outside `.fi-sidebar`).
 */

/* The "n" mark is hidden everywhere by default. */
.fi-logo-collapsed-mark {
    display: none;
    height: 1.75rem;
    width: auto;
    object-fit: contain;
}

/* Collapsed: keep the logo wrapper visible (defeats Alpine x-show display:none). */
.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header div:has(.fi-logo) {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Collapsed: tighten the header padding so the mark + expand chevron both fit
   inside the narrow rail (--collapsed-sidebar-width). */
.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header {
    padding-inline: 0.5rem;
}

/* Collapsed: hide the full wordmark. */
.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header .fi-logo {
    display: none !important;
}

/* Collapsed: reveal the "n" mark for the active theme (light by default). */
.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header .fi-logo-collapsed-mark--light {
    display: flex !important;
}
.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header .fi-logo-collapsed-mark--dark {
    display: none !important;
}
.dark .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header .fi-logo-collapsed-mark--light {
    display: none !important;
}
.dark .fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-header .fi-logo-collapsed-mark--dark {
    display: flex !important;
}
