/* =================================================================
   ui.css — the look of Zdravje Profi.

   Loaded after Bootstrap and style.css. Everything that makes the
   application look like THIS company is here, and nowhere else:
   change a value, reload.

   THE PRIMARY COLOUR is one value, --app-primary: the red of the
   company's mark. It is a SETTING, not a line in this file:

       .config   [App] Color = "#fe2e1a"      (the project's default)
       /admin/settings → Appearance           (an admin can change it)

   The page loads /brand/theme.css right after this file, and that
   sets --app-primary (and the text colour readable on it). The value
   below is only the fallback.

   Two things follow from the colour being a bright red:

     1. White text on #fe2e1a is 3.7:1 — not enough for small text.
        So the mark, the active menu entry and tints use the pure
        colour, while anything FILLED that carries white text
        (buttons, badges, avatars) uses --app-primary-strong, a
        slightly deeper red (4.8:1). Links and coloured text use an
        even deeper one.

     2. Bootstrap's "danger" is almost the same red. A Delete button
        that looks like the brand's main button is a trap, so danger
        is moved to a dark crimson (--app-danger).

   These are custom properties on :root, deliberately OUTSIDE a
   cascade layer: Bootstrap declares its tokens the same way, and
   the later declaration wins.
   ================================================================= */

/* -----------------------------------------------------------------
   Fonts — self-hosted, with Macedonian Cyrillic. Inter for text and
   figures (its numerals line up in columns); Manrope, rounder, for
   headings and the name next to the mark. Both are variable fonts
   under the SIL Open Font License (Public/assets/fonts/README.txt).
   ----------------------------------------------------------------- */

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter/inter-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: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter/inter-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, 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: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter/inter-cyrillic.woff2") format("woff2");
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@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;
}

@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+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-cyrillic.woff2") format("woff2");
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
	--app-primary: #fe2e1a;
	--app-primary-contrast: #ffffff;

	/* The red that carries white text: 90 % of the brand colour, 4.8:1 against white. */
	--app-primary-strong: color-mix(in oklch, var(--app-primary) 90%, #000);

	/* Destructive actions: a dark crimson, clearly not the brand's red. */
	--app-danger: oklch(48% 0.17 12);

	/* Layout. */
	--app-sidebar-width: 16.5rem;
	--app-content-max-width: 100rem;      /* keeps very wide screens from stretching tables (as right padding: style.css, .app-content) */

	/* Typography. */
	--app-heading-font: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	--bs-body-font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
	--bs-body-font-size: 0.9375rem;

	/* Bootstrap's primary tokens, derived from --app-primary. */
	--bs-primary-base: var(--app-primary);
	--bs-primary-bg: var(--app-primary-strong);
	--bs-primary-contrast: var(--app-primary-contrast);
	--bs-primary-fg: light-dark(color-mix(in oklch, var(--app-primary) 86%, #000), color-mix(in oklch, var(--app-primary) 62%, #fff));
	--bs-primary-fg-emphasis: light-dark(color-mix(in oklch, var(--app-primary) 62%, #000), color-mix(in oklch, var(--app-primary) 35%, #fff));
	--bs-primary-bg-subtle: light-dark(color-mix(in oklch, var(--app-primary) 9%, #fff), color-mix(in oklch, var(--app-primary) 30%, #000));
	--bs-primary-bg-muted: light-dark(color-mix(in oklch, var(--app-primary) 18%, #fff), color-mix(in oklch, var(--app-primary) 45%, #000));
	--bs-primary-border: light-dark(color-mix(in oklch, var(--app-primary) 40%, #fff), color-mix(in oklch, var(--app-primary) 75%, #000));
	/* Mixed in oklab, not oklch: towards the bluish dark background oklch would turn the hue through magenta. */
	--bs-primary-focus-ring: light-dark(color-mix(in oklab, var(--app-primary) 45%, var(--bs-bg-body)), color-mix(in oklab, var(--app-primary) 70%, var(--bs-bg-body)));

	/* Links are text: the deeper red, also in light mode (Bootstrap would use the pure colour). */
	--bs-link-color: var(--bs-primary-fg);

	/* Danger, moved away from the brand. */
	--bs-danger-base: var(--app-danger);
	--bs-danger-bg: var(--app-danger);
	--bs-danger-contrast: #ffffff;
	--bs-danger-fg: light-dark(var(--app-danger), color-mix(in oklch, var(--app-danger) 55%, #fff));
	--bs-danger-fg-emphasis: light-dark(color-mix(in oklch, var(--app-danger) 75%, #000), color-mix(in oklch, var(--app-danger) 35%, #fff));
	--bs-danger-bg-subtle: light-dark(color-mix(in oklch, var(--app-danger) 10%, #fff), color-mix(in oklch, var(--app-danger) 40%, #000));
	--bs-danger-bg-muted: light-dark(color-mix(in oklch, var(--app-danger) 20%, #fff), color-mix(in oklch, var(--app-danger) 60%, #000));
	--bs-danger-border: light-dark(color-mix(in oklch, var(--app-danger) 40%, #fff), color-mix(in oklch, var(--app-danger) 80%, #000));
	--bs-danger-focus-ring: light-dark(color-mix(in oklab, var(--app-danger) 45%, var(--bs-bg-body)), color-mix(in oklab, var(--app-danger) 70%, var(--bs-bg-body)));
}

/* -----------------------------------------------------------------
   More ways to change it — uncomment and adapt.
   ----------------------------------------------------------------- */

/* Rounder or squarer corners everywhere (Bootstrap's radius scale):
:root {
	--bs-radius-5: 0.375rem;
	--bs-radius-7: 0.5rem;
}
*/

/* A second accent colour (class="btn-solid theme-accent", "badge theme-accent"):
:root {
	--bs-accent-base: #0f766e;
	--bs-accent-bg: #0f766e;
}
*/
