/* =============================================================================
   APPLICATION TYPOGRAPHY
   -----------------------------------------------------------------------------
   One place that decides what the admin is set in. Loaded LAST in
   include/head.blade.php, after vendor.css and bs3-compat.css, because several
   vendor components hardcode their own family and would otherwise keep it:

     assets/css/all.css   .tooltip / .popover  -> -apple-system, "Segoe UI", ...
     css/vendor.css       .tooltip / .popover  -> 'Helvetica Neue', Helvetica, ...

   Those are declared at the same specificity as the rules below, so loading
   after them is what settles it - there is no !important anywhere in this file.

   Why Inter
   ---------
   The admin was set in Poppins. Poppins is a geometric display face: circular
   bowls, a single-storey `a`, very open apertures. It reads well as a headline
   and poorly as a 12px table cell, which is most of what an ERP is - and its
   digits are proportional, so a column of amounts never lines up.

   Inter is drawn for screen UI at small sizes: taller x-height, tighter
   apertures, unambiguous 1/l/I and 0/O, and a real tabular-figure set. It is a
   variable font here, so 300-700 costs one file per subset.

   This file changes the FAMILY only. Sizes, weights and the heading hierarchy
   are left exactly where the rest of the stylesheets put them.
   ============================================================================= */

:root {
    /* Poppins sits second on purpose, not as a leftover: Inter has no
       Devanagari and the app ships a Hindi language pack (lang/hi). Per-character
       fallback means a Devanagari glyph drops to Poppins while everything else
       stays Inter. The system stack behind them covers Arabic (lang/ar) and
       Pashto (lang/ps), which neither webfont has ever carried. */
    --app-font: "Inter", "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

body {
    font-family: var(--app-font);
}

/* Everything in the admin inherits from body except these. Form controls are in
   the list because Bootstrap's reboot resets them to the browser default rather
   than inheriting - `font: inherit` is not universal across the BS3/BS4 mix this
   build runs. */
button,
input,
optgroup,
select,
textarea,
.form-control,
.btn,
.tooltip,
.popover,
.modal,
.dropdown-menu,
.swal-modal,
.daterangepicker,
.select2-container,
.ui-autocomplete,
.ui-datepicker,
.dataTables_wrapper,
.table,
.note-editor,
.bootstrap-datetimepicker-widget {
    font-family: var(--app-font);
}

/* Monospace stays monospace - code samples, the barcode/SKU columns and the
   print templates that line up on a fixed pitch all depend on it. */
code,
kbd,
pre,
samp,
.text-monospace {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
        "Courier New", monospace;
}

/* Inter ships proportional figures by default. Tabular figures are the whole
   point of a numeric column - without them a list of amounts is ragged because
   a `1` is narrower than a `7`. Scoped to table cells so running text keeps the
   better-spaced proportional set. */
.table td,
.table th,
table.dataTable td,
table.dataTable th {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}
