/*
 * Global typography
 *  - Manrope:          body text, buttons, forms and navigation
 *  - Instrument Serif: headlines and display text (regular weight only)
 *
 * Load this file LAST in <head> (after theme CSS and inline <style> blocks)
 * together with:
 * https://fonts.googleapis.com/css2?family=Instrument+Serif&family=Manrope:wght@300;400;500;600;700;800&display=swap
 *
 * Icon fonts (FontAwesome, feather, iconkit, Material Icons, weather icons,
 * bootstrap-icons) are excluded so icons keep rendering.
 */

:root {
    --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    /* Bootstrap 5 variables */
    --bs-body-font-family: var(--font-body);
    --bs-font-sans-serif: var(--font-body);
}

html,
body {
    font-family: var(--font-body) !important;
}

/* Body text, buttons, forms, navigation – every element except icon glyphs */
body *:not(:where(
    i, svg, svg *, code, pre, kbd, samp,
    .fa, .fas, .far, .fab, .fal, .fad, [class*=" fa-"], [class^="fa-"],
    .feather, [class^="icon-"], [class*=" icon-"],
    .ik, .wi, .bi, [class^="bi-"], [class*=" bi-"],
    [class*="material-icons"], [class*="material-symbols"], .mdi, [class*=" mdi-"],
    .flag-icon
)) {
    font-family: var(--font-body) !important;
}

/* Headlines and display text */
body :is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
         .display-1, .display-2, .display-3, .display-4, .display-5, .display-6,
         .page-title, .font-display):not(:where(
    i, .fa, .fas, .far, .fab, .feather, .ik, .bi, [class*="material-icons"]
)) {
    font-family: var(--font-display) !important;
    font-weight: 400 !important; /* Instrument Serif ships regular only – avoid faux bold */
    letter-spacing: normal;
}

/* Opt out: keep a heading in Manrope (e.g. small card/table labels) */
body .font-body,
body :is(h1, h2, h3, h4, h5, h6).font-body {
    font-family: var(--font-body) !important;
}

/* ApexCharts tooltips were forced to Roboto */
div.apexcharts-canvas .apexcharts-tooltip *,
.apexcharts-text, .apexcharts-legend-text {
    font-family: var(--font-body) !important;
}
