/*
 * Small dashboard refinements layered on top of Filament's own stylesheet.
 * Registered from AdminPanelProvider, so it loads on every admin screen.
 */

/*
 * The wordmark's typeface. Vite self-hosts Space Grotesk for the public site
 * under a content-hashed name that changes on every build, so a stable copy
 * lives here for the dashboard to reference.
 */
@font-face {
    font-family: 'Space Grotesk Brand';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/fonts/brand/space-grotesk-700.woff2') format('woff2'),
         url('/fonts/brand/space-grotesk-700.woff') format('woff');
}

/* Brand lockup in the sidebar header: icon plus the NEXESIO wordmark. */
.nexesio-panel-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.nexesio-panel-brand img {
    height: 1.85rem;
    width: auto;
    display: block;
}

.nexesio-panel-brand > span {
    font-family: 'Space Grotesk Brand', ui-sans-serif, system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.045em;
    line-height: 1;
    color: var(--gray-950, #09090b);
}

.dark .nexesio-panel-brand > span {
    color: #fff;
}

/*
 * Emails, slugs and URLs are single unbreakable tokens. Left alone they set
 * the min-content width of their column and push the table wider than a
 * phone screen, which reads as the right-hand side being cut off.
 */
.fi-ta-text-item,
.fi-ta-text-description,
.fi-ta-cell {
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    /* Reclaim horizontal room so the row action stays on screen. */
    .fi-ta-cell {
        padding-inline: 0.625rem;
    }

    .fi-ta-header-cell {
        padding-inline: 0.625rem;
    }

    /* Filters, search and the column toggle stack instead of overflowing. */
    .fi-ta-header-toolbar {
        flex-wrap: wrap;
        row-gap: 0.75rem;
    }

    /* A long resource title should wrap rather than shove the header button. */
    .fi-header-heading {
        font-size: 1.5rem;
        line-height: 1.2;
    }

    /* Tabs inside long edit forms scroll instead of squashing. */
    .fi-tabs {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .fi-tabs::-webkit-scrollbar {
        display: none;
    }
}
