/*
 * Per-tenant brand tokens. The layout root applies .brand-{AppTenant.Identifier}
 * (resolved by Finbuckle); unknown tenants get the :root LoanWise defaults.
 * Palettes verified against Cashco-Journey global-variables.scss (2026-06-12).
 * Adding a tenant brand = one block here (until palettes move onto AppTenant).
 */

/* Manrope, the typeface of cashcofinancial.com. Self-hosted (the CSP allows fonts from 'self' only, and staff
   browsers make no request to Google), one variable file per character range covering weights 200-800,
   SIL Open Font License 1.1 (wwwroot/fonts/manrope/OFL.txt). Latin covers English and French. */
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/manrope/manrope-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    src: url("../fonts/manrope/manrope-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* LoanWise defaults (no/unknown tenant) */
    --lw-primary: #1b6ec2;
    --lw-primary-dark: #14538f;
    --lw-primary-light: #e8f1fa;
    --lw-accent: #74c4d4;
    /* The accent deepened to hold AA on white (TenantBrand.AccentStrong): text, focus ring. */
    --lw-accent-strong: #1b7a8e;
    --lw-text-muted: #6f6b6e;
    --lw-success: #2e7d32;
    --lw-warning: #9a5b00;
    --lw-danger: #c62828;

    /* Type: Manrope (cashcofinancial.com), self-hosted above; the system fonts only while it loads or if it
       cannot. Mirrors TenantThemeProvider's TextFont / DisplayFont. A company that chose another font for its screens
       (brand-fonts.css) gets both on the layout's brand element (TenantBrand.CssVariables). */
    --lw-font-text: Manrope, "Segoe UI Variable Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --lw-font-display: Manrope, "Segoe UI Variable Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /* Printed documents keep Manrope whatever font a company chose for its screens (the last rule below). */
    --lw-font-document: Manrope, "Segoe UI Variable Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --lw-font-document-display: Manrope, "Segoe UI Variable Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Motion & shape tokens (see docs/design/ui-guidelines.md "Motion & polish") */
    --lw-duration-fast: 120ms;
    --lw-duration-base: 180ms;
    --lw-ease: cubic-bezier(0.2, 0, 0, 1);
    --lw-radius: 4px;       /* controls: buttons, inputs, menus (= MudTheme DefaultBorderRadius) */
    --lw-radius-box: var(--lw-radius);   /* boxes: cards, tiles, tables - the menus' corner, a hairline border */
    --lw-border: 1px solid #dee2e6;
    /* Boxes rest on the page with a soft shadow: a tight edge and a faint wide spread, in the text's ink rather than
       black. Menus and tooltips have deeper shadows, so they still sit above the boxes. */
    --lw-shadow-resting: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 12px rgba(16, 24, 40, 0.07);
    --lw-shadow-raised: 0 6px 18px rgba(16, 24, 40, 0.14);
}

@media (prefers-reduced-motion: reduce) {
    :root {
        --lw-duration-fast: 0ms;
        --lw-duration-base: 0ms;
    }
}

/* Cashco Financial — deep blue, with the blue of its logo (#2262AC, 6.2:1 on white) as the accent: the active
   menu item, the keyboard focus ring, secondary buttons and the faint corner glow. */
.brand-cashco {
    --lw-primary: #004077;
    --lw-primary-dark: #002d54;
    --lw-primary-light: #e6f2f7;
    --lw-accent: #2262ac;
    --lw-accent-strong: #2262ac;
    --lw-nav-accent: #2262ac;
    --lw-nav-accent-strong: #2262ac;
}

/* Venue Financial — red / orange */
.brand-venue {
    --lw-primary: #bd080d;
    --lw-primary-dark: #8c0609;
    --lw-primary-light: #fbeaea;
    --lw-accent: #ff7932;
    --lw-accent-strong: #b8500c;
}

/* Printed documents (ReportShell's sheet, the collection letter, the payment receipt) keep Manrope whatever font a company
   chose for its screens (Fatih, 2026-10-28: the font is for the staff app's screens only). MudBlazor's text takes its font
   from its typography variables, so the sheet sets them back too. */
.lw-print-sheet,
.receipt-sheet {
    --lw-font-text: var(--lw-font-document);
    --lw-font-display: var(--lw-font-document-display);
    --mud-typography-default-family: var(--lw-font-document);
    --mud-typography-h1-family: var(--lw-font-document-display);
    --mud-typography-h2-family: var(--lw-font-document-display);
    --mud-typography-h3-family: var(--lw-font-document-display);
    --mud-typography-h4-family: var(--lw-font-document-display);
    --mud-typography-h5-family: var(--lw-font-document-display);
    --mud-typography-h6-family: var(--lw-font-document-display);
    --mud-typography-subtitle1-family: var(--lw-font-document);
    --mud-typography-subtitle2-family: var(--lw-font-document);
    --mud-typography-body1-family: var(--lw-font-document);
    --mud-typography-body2-family: var(--lw-font-document);
    --mud-typography-button-family: var(--lw-font-document);
    --mud-typography-caption-family: var(--lw-font-document);
    --mud-typography-overline-family: var(--lw-font-document);
    font-family: var(--lw-font-document);
}
