/*
 * WrkLst branding for the admin panel.
 *
 * The gradient and its 120-second cycle are lifted from the WrkLst 10 shell
 * (wrklst-app resources/css/tailwind.css, .wl-logo-anibg) so the two products drift together
 * rather than apart: navy → deep teal → green, shifted slowly across an over-wide background.
 *
 * Plain CSS served from public/ on purpose. The panel uses Filament's precompiled stylesheet,
 * and this app has no Vite pipeline to build a custom Tailwind theme with — so everything here
 * is written against Filament's own `fi-*` class names and needs no build step.
 */

@keyframes wlLogoGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/*
 * The wordmark ships as white outlined paths, so it is only legible on a dark backdrop. Rather
 * than invert it per colour scheme — which is what put a dark logo on dark ground in dark mode —
 * it always carries its own gradient behind it. One rule, correct in both themes, and it is the
 * treatment WrkLst 10 uses anyway.
 */
.fi-logo {
    background: linear-gradient(89deg, #14151A, #1A2338, #042326, #152F33, #003C41, #14585A);
    background-size: 500% 100%;
    animation: wlLogoGradient 120s ease infinite;
    box-sizing: content-box;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

/* Brand block: wordmark with "Tenant Admin" sitting underneath it. */
.wl-brand-sub {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgb(148 163 184);
    white-space: nowrap;
}

/*
 * Filament renders the LOGO_AFTER hooks as a *sibling* of the logo container, not inside it, so
 * the subtitle is a flex item of the header itself — the stacking has to happen there. With a
 * topbar present the sidebar header holds nothing else, so turning it into a column is safe.
 * The 4rem header height is kept so the brand bar stays flush with the topbar beside it.
 */
.fi-sidebar-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}

.fi-sidebar-header-logo-ctn {
    flex: none;
}

/* The topbar stays one row; there the subtitle only needs room beside the wordmark. */
.fi-topbar-start .wl-brand-sub {
    margin-inline-start: 0.75rem;
}

/* Sidebar brand bar — the gradient fills the bar, as in WrkLst 10. */
.fi-sidebar-header {
    background: linear-gradient(89deg, #14151A, #1A2338, #042326, #152F33, #003C41, #14585A);
    background-size: 500% 100%;
    animation: wlLogoGradient 120s ease infinite;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Inside the bar the backdrop is already there, so the mark needs no chip of its own. */
.fi-sidebar-header .fi-logo {
    background: none;
    animation: none;
    padding: 0;
}

.fi-sidebar-header .wl-brand-sub {
    color: rgba(255, 255, 255, 0.6);
}

/* Collapse / expand controls sit on the gradient too. */
.fi-sidebar-header .fi-icon-btn {
    color: rgba(255, 255, 255, 0.75);
}

.fi-sidebar-header .fi-icon-btn:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.12);
}

/*
 * Login. Filament's simple layout centres a card on a plain background; the gradient replaces
 * that background so the page is recognisably WrkLst rather than default Filament.
 */
.fi-simple-layout {
    background: linear-gradient(89deg, #14151A, #1A2338, #042326, #152F33, #003C41, #14585A);
    background-size: 500% 100%;
    animation: wlLogoGradient 120s ease infinite;
}

.fi-simple-layout .fi-logo {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.wl-brand-sub-centred {
    text-align: center;
    margin-top: 0.75rem;
    margin-bottom: 1.25rem;
}

/* Honour the same accessibility rule the WrkLst 10 shell does. */
@media (prefers-reduced-motion: reduce) {
    .fi-logo,
    .fi-sidebar-header,
    .fi-simple-layout {
        animation: none;
    }
}
