@import '../../../../vendor/filament/filament/resources/css/theme.css';

@source '../../../../app/Filament/**/*';
@source '../../../../resources/views/filament/**/*';

/*
 * Sidebar collapse/expand polish (desktop rail only — mobile's off-canvas
 * drawer already animates via the base theme's `transition-all` on
 * `.fi-sidebar`, see vendor/filament/filament/resources/css/components/
 * sidebar.css). That same file sets `lg:transition-none`: the desktop rail
 * resize is a plain, un-animated `width: auto` recalculation, which only
 * shrinks to an icon-only rail because every row's label hides itself via
 * x-show (see sidebar/item.blade.php and sidebar/group.blade.php) leaving
 * icons as the widest remaining content. `interpolate-size` lets a modern
 * browser animate toward/from that resulting `auto` width instead of
 * snapping; browsers without it simply keep today's instant snap, so this
 * is a pure progressive enhancement — nothing to fall back to by hand.
 *
 * Written unlayered (not inside a Tailwind `@layer`) so it beats the
 * imported theme's `layer(components)` rules regardless of selector
 * specificity — see vendor/filament/filament/resources/css/index.css,
 * where every component file is imported into that layer.
 */
@media (min-width: 1024px) {
    .fi-body-has-sidebar-collapsible-on-desktop .fi-sidebar,
    .fi-body-has-sidebar-fully-collapsible-on-desktop .fi-sidebar {
        interpolate-size: allow-keywords;
        transition-property: width;
        transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
        transition-duration: 200ms;
    }
}

/*
 * The topbar's own collapse/expand buttons (.fi-topbar-open-collapse-sidebar-btn
 * / -close-collapse-sidebar-btn, in their shared .fi-topbar-collapse-sidebar-btn-ctn
 * wrapper — see vendor/filament/filament/resources/views/livewire/topbar.blade.php)
 * are replaced by the single rotating button in
 * filament.partials.sidebar-collapse-toggle, rendered at the same
 * TOPBAR_LOGO_BEFORE hook by both panel providers.
 */
.fi-topbar-collapse-sidebar-btn-ctn {
    display: none;
}
