/*
 * Otofaktur Brand Overrides for Filament panels (admin + customers).
 * Plain CSS, loaded additively via PanelsRenderHook::HEAD_END.
 * No Vite/Tailwind build required.
 */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;500;700;900&display=swap');

:root {
    --otofaktur-primary:   #2A1D38;
    --otofaktur-secondary: #BEB4CA;
    --otofaktur-accent:    #E2DF68;
}

/* Direct override for the primary action button (Save, Create, etc.).
   Filament's auto-generated palette from #2A1D38 lands the brand color
   on primary-950, so primary-600 (button bg) becomes a light lavender.
   We force the filled button's background to the brand color, but leave
   `.fi-link` (table row actions) alone — those should stay link-style. */
.fi-btn.fi-color-primary:not(.fi-disabled):not(.fi-link) {
    background-color: var(--otofaktur-primary) !important;
    color: #fff !important;
}

.fi-btn.fi-color-primary:not(.fi-disabled):not(.fi-link):hover {
    background-color: #1d1426 !important;
}

/* Link-style action buttons in tables: keep transparent, just brand-colored text */
.fi-link.fi-color-primary,
.fi-btn.fi-link.fi-color-primary {
    color: var(--otofaktur-primary) !important;
    background-color: transparent !important;
}

/* Icon-only buttons (record navigation arrows, compact actions):
   ghost-style — transparent bg, brand-colored icon, subtle hover */
.fi-icon-btn.fi-color-primary {
    background-color: transparent !important;
    color: var(--otofaktur-primary) !important;
    box-shadow: inset 0 0 0 1px rgba(42, 29, 56, 0.18) !important;
}

.fi-icon-btn.fi-color-primary:hover {
    background-color: rgba(42, 29, 56, 0.06) !important;
}

/* Ensure SVG icons inside filled primary buttons inherit the white text color */
.fi-btn.fi-color-primary:not(.fi-disabled):not(.fi-link) svg {
    color: #fff !important;
}

html,
body,
.fi-body,
.fi-app {
    font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
    font-weight: 300;
}

.fi-header-heading,
.fi-section-header-heading,
.fi-topbar .fi-logo,
.fi-modal-heading,
.fi-form-heading,
h1 {
    font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif !important;
    font-weight: 900 !important;
}

.fi-page-heading h2,
.fi-section-heading-wrapper > h2,
h2 {
    font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif !important;
    font-weight: 700 !important;
}

.fi-section-heading,
.fi-fieldset-label,
h3 {
    font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif !important;
    font-weight: 500 !important;
}

.fi-topbar {
    background-color: #fff;
    border-bottom: 1px solid rgba(190, 180, 202, 0.4);
}

.fi-topbar .fi-logo img {
    max-height: 2rem;
    width: auto;
}

.fi-sidebar-item-active .fi-sidebar-item-button {
    background-color: rgba(42, 29, 56, 0.08);
}

.fi-ta-text-item,
.fi-ta-header-cell-label {
    color: #000 !important;
}

.fi-ta-header-cell-label {
    font-weight: 700;
}

.fi-badge.fi-color-warning {
    background-color: var(--otofaktur-accent);
    color: var(--otofaktur-primary);
}
