/*
 * Engelhardt design tokens (CVI 2026) for DevExpress Fluent 25.2.
 * Registered on the theme with ThemeProperties.AddFilePaths (web/Theming/EngelhardtThemes.cs),
 * so it loads after the Fluent files. Only variables and @font-face here, no rules.
 * The only file in the app that may contain colour literals.
 * Public API only: --dxds-* (DevExpress Design System) and our own --eng-*. Never DevExpress internal variables.
 */

/* Ubuntu, self-hosted (Ubuntu Font Licence 1.0, see /fonts/ubuntu/UFL.txt). Arial is the fallback per the CVI. */
@font-face {
    font-family: "Ubuntu";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../../fonts/ubuntu/ubuntu-400-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;
}
@font-face {
    font-family: "Ubuntu";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../../fonts/ubuntu/ubuntu-400-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Ubuntu";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("../../fonts/ubuntu/ubuntu-400italic-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;
}
@font-face {
    font-family: "Ubuntu";
    font-style: italic;
    font-weight: 400;
    font-display: swap;
    src: url("../../fonts/ubuntu/ubuntu-400italic-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: "Ubuntu";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../../fonts/ubuntu/ubuntu-700-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;
}
@font-face {
    font-family: "Ubuntu";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../../fonts/ubuntu/ubuntu-700-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    /* --- CVI colours (Engelhardt Visual Identity 2026, p. 7 and 13) --- */
    --eng-color-brand: #0074A2;          /* primary: buttons, links, selection */
    --eng-color-brand-rgb: 0, 116, 162;
    --eng-color-brand-hover-rgb: 0, 93, 131;   /* = --dxds-primary-110 */
    --eng-color-dark: #0B1F26;           /* dark bluish-green: text, headings, focus ring */
    --eng-color-dark-rgb: 11, 31, 38;
    --eng-color-accent-orange: #FF5E00;  /* decoration only (rules, underlines). Never a background or with white text (3.06:1). */
    --eng-color-page: #F3F3F2;           /* light grey page background from the CVI layout */
    /* Not used in the UI (decided): B&B blue #009ACE, gold #B08A41, sage green #3F744C. */

    /* Fluent's light-mode danger (--dxds-danger-90) as an RGB triplet for Bootstrap's --bs-danger-rgb. */
    --eng-color-danger-rgb: 197, 15, 31;
    --eng-color-success-rgb: 16, 124, 16;

    /* --- Typography --- */
    --eng-font-family: "Ubuntu", Arial, "Helvetica Neue", Helvetica, sans-serif;
    --eng-font-size-body: var(--dxds-font-size-base-lg);  /* 16 px body text and forms (DevExpress components keep SizeMode.Medium) */
    --eng-line-height-body: 1.5;
    --eng-measure: 65ch;                 /* max line length for running text */

    /* --- Shape and layout --- */
    --eng-radius-card: var(--dxds-border-radius-160);
    --eng-rule-width: 3rem;              /* short orange rule under the H1 (red thread 2) */
    --eng-rule-height: 3px;
    --eng-icon-tile-size: 3rem;          /* icon tile in the crown's rounded square (red thread 3) */
    --eng-icon-tile-font-size: var(--dxds-font-size-400);
    --eng-logo-height: 2.5rem;           /* 40 px: minimum height of the full logo on screen */
    --eng-logo-clearspace: calc(var(--eng-logo-height) / 4);  /* clear space = 25 % of logo height */
    --eng-header-height: calc(var(--eng-logo-height) + 2 * var(--eng-logo-clearspace) + 2 * var(--dxds-spacing-100));  /* 80 px: the logo with its clear space and the 10 px the DxMenu title (SizeMode Large) and the Identity bar keep above and below it */
    --eng-auth-card-width: 28rem;
    --eng-card-max-width: 40rem;         /* welcome card and empty state */
    --eng-content-max-width: 80rem;      /* main column */
    --eng-logo-large-width: 32rem;       /* full logo on the start page */
    --eng-z-toast: 2500;                 /* the toast strip; DevExpress' own toast z-index, so toasts stay above popups */

    /* --- Semantic aliases (point to --dxds-* where Fluent has a role) --- */
    --eng-color-text: var(--eng-color-dark);
    --eng-page-bg: var(--eng-color-page);
    --eng-color-surface: var(--dxds-color-surface-neutral-default-rest);
    --eng-color-border-input: var(--dxds-color-border-neutral-accessible-rest);   /* Fluent #767676: 4.5:1 on white */
    --eng-header-bg: var(--dxds-color-surface-neutral-default-rest);
    --eng-footer-bg: var(--eng-color-dark);
    --eng-footer-text: var(--eng-color-page);
    --eng-focus-ring-color: var(--eng-color-dark);
    --eng-focus-ring-width: 2px;
    --eng-focus-ring-offset: 2px;

    /* --- Motion (red thread 8): enhancement only. Use these inside @media (prefers-reduced-motion: no-preference). --- */
    --eng-motion-fast: 100ms;            /* hover and focus feedback */
    --eng-motion-medium: 200ms;          /* state changes */
    --eng-motion-slow: 300ms;            /* the longest animation anywhere */
    --eng-ease-out: cubic-bezier(0, 0, 0.2, 1);

    /* --- DevExpress Fluent overrides (public Design System variables) --- */
    /* Primary scale; step 90 is the brand colour. Fluent maps surface/content-primary to step 90
       (hover 110, active 130) in light mode. White text on step 90 = 5.22:1. */
    --dxds-primary-10: #E7F0F5;
    --dxds-primary-20: #CEE1ED;
    --dxds-primary-30: #B4D3E6;
    --dxds-primary-40: #99C5E0;
    --dxds-primary-50: #7AB7DA;
    --dxds-primary-60: #5CA8D2;
    --dxds-primary-70: #399ACB;
    --dxds-primary-80: #028BC1;
    --dxds-primary-90: #0074A2;
    --dxds-primary-100: #006C97;
    --dxds-primary-110: #005D83;
    --dxds-primary-120: #014F6F;
    --dxds-primary-130: #00405C;
    --dxds-primary-140: #003249;
    --dxds-primary-150: #002538;
    --dxds-primary-160: #001926;
    --dxds-primary-170: #010E16;

    /* Focus ring colour of DevExpress components (public variable). Width and offset stay at the DevExpress
       defaults: changing them needs DevExpress internal variables (decision 25). */
    --dxds-color-border-focus-default: var(--eng-color-dark);

    /* Typeface. Fluent's global.min.css applies this to body, input and textarea. */
    --dxds-font-family-sans-serif: var(--eng-font-family);

    /* Ubuntu has no 600; use 700 instead of letting the browser synthesise bold. */
    --dxds-font-weight-title-default: var(--dxds-font-weight-700);
    --dxds-font-weight-headline-default: var(--dxds-font-weight-700);
    --dxds-font-weight-base-strong: var(--dxds-font-weight-700);
    --dxds-font-weight-caption-strong: var(--dxds-font-weight-700);
}
