/* One font for the whole dashboard, matching the tables (e.g. Net Sales on the Sales tab).
   Dash serves every file in this folder automatically, so this applies to all pages.

   Without this the tabs, headings, filters and labels fall back to the browser default,
   which is a serif face, while the tables asked for Segoe UI. That mismatch is what this
   file removes. Plotly charts draw their text as SVG and cannot be reached from here; they
   take FONT_FAMILY from components/formatting.py instead. */

:root {
    --app-font-family: "Segoe UI", sans-serif;
    /* Base size for text that sets none of its own. Matches the table cells, so the page
       reads at one size instead of the browser default of 16px. */
    --app-font-size: 14px;
    /* The date range inputs carry a date each and read better a little larger. This is the
       size the picker shipped with, which suits it better than the base size. */
    --app-date-input-size: 19px;
}

body,
#react-entry-point {
    font-family: var(--app-font-family);
    font-size: var(--app-font-size);
}

/* Inherit everywhere, including elements the browser styles on its own. */
* {
    font-family: inherit;
}

/* Form controls inherit neither the page font nor its size by default, so both are set
   explicitly. This covers the filter dropdowns, the date pickers and the buttons. */
input,
select,
textarea,
button,
optgroup {
    font-family: var(--app-font-family);
    font-size: var(--app-font-size);
}

/* The date range pickers come with their own stylesheet, which sets both a size and a
   weight of its own on the input. Two class names are needed to outweigh it.
   Its weight of 200 renders the dates faint next to the rest of the page, which reads as
   too small however large they are, so they are put back to normal weight. */
.DateInput .DateInput_input,
.DateRangePickerInput .DateInput_input {
    font-family: var(--app-font-family);
    font-size: var(--app-date-input-size);
    font-weight: 400;
}

/* Keep code-like content monospaced rather than forcing the page font onto it. */
code,
kbd,
pre,
samp {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
