// Which glyph each icon is, and how icons size, stack and spin. This names no
// font and is the same whichever source supplies one, so it is always needed —
// without it an icon has nothing to draw.
@import (inline) "fontawesome.css";

// Brands bind their own family rather than the classic one, so they never
// compete with a remote source's fonts and stay in unconditionally.
@import (inline) "brands.css";

// The classic-family binding. For local icons this is the bundled Free font.
// For a Kit or CDN it is a blank font instead: the glyph definitions above
// resolve their font through a chain ending in a hardcoded
// 'Font Awesome 7 Free', and binding that name to the real Free files while a
// Kit or Pro CDN is on its way means every icon resolves twice — first against
// the bundled font (wrong glyphs, or placeholder boxes under a forced style),
// then again when the remote stylesheet lands. The blank font occupies the
// same name with glyphs that draw nothing, so icons hold their space and stay
// empty until the remote fonts arrive; the remote stylesheet's own faces are
// declared later and take precedence from there. See fa-blank.css.
//
// `@fa-bundled-fonts` comes from FontAwesome::needsBundledFonts().
.fa-classic-font-faces() when (@fa-bundled-fonts = true) {
  @import (inline) "regular.css";
  @import (inline) "solid.css";
}
.fa-classic-font-faces() when (@fa-bundled-fonts = false) {
  @import (inline) "fa-blank.css";
}
.fa-classic-font-faces();

// FontAwesome 7 (and its Kit JS) sets `display: var(--fa-display, inline-block)` on
// .fas/.far/.fab etc. When a Kit is loaded its dynamically-injected stylesheet lands
// *after* our compiled CSS, so a Kit `.fas { display:… }` declaration at specificity
// (0,1,0) beats any application rule that also targets (0,1,0) — purely by source order.
//
// Fix: pin `--fa-display` on every icon element so the Kit's :root-level variable
// cannot flip all icons to `display:block`. Application rules that need to hide an
// FA-classed element must use specificity > (0,1,0) — e.g. nest under a parent class —
// to beat the Kit's late-arriving `.fas { display:… }` declaration.
.fa-solid,
.fa-regular,
.fa-brands,
.fa-classic,
.fas,
.far,
.fab,
.fa {
  --fa-display: inline-block;
}
