/*
 * Your global styles here
 */

/* ------------------------------------------------------------------
 * Typography ported from the Aura site (Lineage Logistics Knowledge
 * Center -> theme "Webster"). The weight -> file mapping is copied
 * verbatim from that theme's customCSS, including 700 -> Semibold, so
 * bold text renders at the same weight on both sites.
 *
 * Two src URLs per face: the LWR site prefix first, then the bare
 * /sfsites/ path. Browsers fall through to the next src on a failed
 * fetch, so the font resolves whichever way the org serves static
 * resources for this site.
 * ------------------------------------------------------------------ */
@font-face {
    font-family: 'FreightSansLFPro';
    font-weight: 900;
    font-display: swap;
    src: url('/supportlwrvforcesite/sfsites/c/resource/FreightSansLFPro/FreightSansLFPro-Bold.otf') format('opentype'),
         url('/sfsites/c/resource/FreightSansLFPro/FreightSansLFPro-Bold.otf') format('opentype');
}

@font-face {
    font-family: 'FreightSansLFPro';
    font-weight: 800;
    font-display: swap;
    src: url('/supportlwrvforcesite/sfsites/c/resource/FreightSansLFPro/FreightSansLFPro-Bold.otf') format('opentype'),
         url('/sfsites/c/resource/FreightSansLFPro/FreightSansLFPro-Bold.otf') format('opentype');
}

@font-face {
    font-family: 'FreightSansLFPro';
    font-weight: 700;
    font-display: swap;
    src: url('/supportlwrvforcesite/sfsites/c/resource/FreightSansLFPro/FreightSansLFPro-Semibold.otf') format('opentype'),
         url('/sfsites/c/resource/FreightSansLFPro/FreightSansLFPro-Semibold.otf') format('opentype');
}

@font-face {
    font-family: 'FreightSansLFPro';
    font-weight: 600;
    font-display: swap;
    src: url('/supportlwrvforcesite/sfsites/c/resource/FreightSansLFPro/FreightSansLFPro-Medium.otf') format('opentype'),
         url('/sfsites/c/resource/FreightSansLFPro/FreightSansLFPro-Medium.otf') format('opentype');
}

@font-face {
    font-family: 'FreightSansLFPro';
    font-weight: 500;
    font-display: swap;
    src: url('/supportlwrvforcesite/sfsites/c/resource/FreightSansLFPro/FreightSansLFPro-Medium.otf') format('opentype'),
         url('/sfsites/c/resource/FreightSansLFPro/FreightSansLFPro-Medium.otf') format('opentype');
}

@font-face {
    font-family: 'FreightSansLFPro';
    font-weight: 400;
    font-display: swap;
    src: url('/supportlwrvforcesite/sfsites/c/resource/FreightSansLFPro/FreightSansLFPro-Regular.otf') format('opentype'),
         url('/sfsites/c/resource/FreightSansLFPro/FreightSansLFPro-Regular.otf') format('opentype');
}

@font-face {
    font-family: 'FreightSansLFPro';
    font-weight: 300;
    font-display: swap;
    src: url('/supportlwrvforcesite/sfsites/c/resource/FreightSansLFPro/FreightSansLFPro-Light.otf') format('opentype'),
         url('/sfsites/c/resource/FreightSansLFPro/FreightSansLFPro-Light.otf') format('opentype');
}

@font-face {
    font-family: 'FreightSansLFPro';
    font-weight: 200;
    font-display: swap;
    src: url('/supportlwrvforcesite/sfsites/c/resource/FreightSansLFPro/FreightSansLFPro-Light.otf') format('opentype'),
         url('/sfsites/c/resource/FreightSansLFPro/FreightSansLFPro-Light.otf') format('opentype');
}

/* Custom properties and font-family are inherited properties, so setting them
   on :root / html / body is what carries FreightSansLFPro across the shadow
   boundary into the c:lhc* components and the base Lightning components. A
   document stylesheet on its own does not reach inside those shadow roots.

   The branding set can only hold a bare family name -- its validator rejects
   commas, so "BaseFont" is just FreightSansLFPro and the fallback stack has to
   live here. Branding emits its own :root rule for these same properties, so
   this selector is html:root (0,1,1) rather than :root (0,1,0) to win the
   cascade regardless of which stylesheet loads last. */
html:root {
    --lhc-font-family: 'FreightSansLFPro', 'Salesforce Sans', Arial, Helvetica, sans-serif;
    --dxp-g-root-font-family: var(--lhc-font-family);
    --dxp-s-html-font-family: var(--lhc-font-family);
    --lwc-fontFamily: var(--lhc-font-family);
    --lwc-fontFamilyText: var(--lhc-font-family);
    --lwc-fontFamilyHeading: var(--lhc-font-family);
}

html,
body {
    height: 100%;
    font-family: var(--lhc-font-family);
}

html {
    background: white;
}

/* Matches `body { font-size: 16pt; }` from the Aura theme. rem stays anchored to
   the 16px html root on both sites, so this only moves text that inherits its
   size, exactly as it does on Aura. */
body {
    margin: 0;
    font-size: 16pt;
    color: rgb(74, 74, 74);
}

/* Form controls do not inherit font-family from an ancestor by default. */
input,
button,
select,
textarea {
    font-family: inherit;
}
