/* Project-wide typography: the viewer's native OS UI font.
 *
 * Replaces the webfonts the app used to pull from Google Fonts (Inter on the
 * dashboard + login, Poppins on the hiring pages). Nothing is downloaded, so
 * there is no render-blocking font request and no flash of fallback text.
 *
 * Load this AFTER Metronic's style.bundle.css / plugins.bundle.css: those set
 * `--bs-font-sans-serif: Inter, ...` on :root and hard-code `font-family:
 * Inter` on a handful of selectors. The :root block below wins on source
 * order; the selector overrides further down match theirs one-for-one.
 *
 * The public marketing page (website/index.html) is deliberately NOT covered —
 * it uses the licensed Two Maids brand faces (Gotham / Test Tiempos Fine).
 */

:root {
    /* `system-ui` resolves to the OS UI face (SF Pro, Segoe UI Variable,
       Roboto…). The rest are fallbacks for browsers that don't support it,
       ending with the emoji families so emoji still render in colour. */
    --tm-font-sans:
        system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif,
        "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
        "Noto Color Emoji";
    --tm-font-mono:
        ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
        "Liberation Mono", "Courier New", monospace;

    /* Bootstrap 5 / Metronic read these; setting them re-points every
       component that inherits rather than declares its own family. */
    --bs-font-sans-serif: var(--tm-font-sans);
    --bs-font-monospace: var(--tm-font-mono);
    --bs-body-font-family: var(--tm-font-sans);
}

/* Mirrors `body, html { font-family: Inter … }` in style.bundle.css. */
body,
html {
    font-family: var(--tm-font-sans);
}

/* Form controls don't inherit the page font by default in any browser. */
button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
}

code,
kbd,
pre,
samp {
    font-family: var(--tm-font-mono);
}

/* The four selectors in plugins.bundle.css that hard-code Inter. The
   apexcharts one carries !important there, so it needs it back here. */
.daterangepicker,
.ql-toolbar,
.leaflet-container .leaflet-popup-content-wrapper .leaflet-popup-content {
    font-family: var(--tm-font-sans);
}

.apexcharts-legend-text,
.apexcharts-text,
.apexcharts-title-text {
    font-family: var(--tm-font-sans) !important;
}
