/*
 * Forces old Font Awesome font-family references (baked into theme CSS,
 * inline styles, or raw pasted glyphs in section.font_awesome) to resolve
 * against the Font Awesome 7 Pro webfonts this app actually ships, instead
 * of a font family that no longer has any font file behind it.
 *
 * This file must be loaded AFTER the theme stylesheet and any per-site
 * custom CSS, so its @font-face declarations win the cascade for any
 * family name a theme/custom CSS redeclares.
 */

@font-face {
  font-family: "Font Awesome 5 Free";
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-solid-900.woff2");
}
@font-face {
  font-family: "Font Awesome 5 Free";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-regular-400.woff2");
}
@font-face {
  font-family: "Font Awesome 5 Pro";
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-solid-900.woff2");
}
@font-face {
  font-family: "Font Awesome 5 Pro";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-regular-400.woff2");
}
@font-face {
  font-family: "Font Awesome 5 Pro";
  font-style: normal;
  font-weight: 300;
  font-display: block;
  src: url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-light-300.woff2");
}
@font-face {
  font-family: "Font Awesome 5 Brands";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-brands-400.woff2");
}
@font-face {
  font-family: "Font Awesome 5 Duotone";
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-duotone-900.woff2");
}

@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-solid-900.woff2");
}
@font-face {
  font-family: "Font Awesome 6 Free";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-regular-400.woff2");
}
@font-face {
  font-family: "Font Awesome 6 Pro";
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-solid-900.woff2");
}
@font-face {
  font-family: "Font Awesome 6 Pro";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-regular-400.woff2");
}
@font-face {
  font-family: "Font Awesome 6 Pro";
  font-style: normal;
  font-weight: 300;
  font-display: block;
  src: url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-light-300.woff2");
}
@font-face {
  font-family: "Font Awesome 6 Brands";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-brands-400.woff2");
}
@font-face {
  font-family: "Font Awesome 6 Duotone";
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-duotone-900.woff2");
}
@font-face {
  font-family: "Font Awesome 6 Sharp";
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-sharp-solid-900.woff2");
}

/* v4: a single "FontAwesome" family carried every icon at normal weight */
@font-face {
  font-family: "FontAwesome";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-v4compatibility.woff2") format("woff2"),
       url("/core/system/resources/assets/fontawesome-pro/webfonts/fa-solid-900.woff2") format("woff2");
}

/*
 * Free-text section.font_awesome values (Sections admin) are sometimes a
 * raw glyph pasted from the Font Awesome site rather than the intended
 * `<i class="fal fa-icon"></i>` markup, so the wrapping element carries no
 * FA class at all. Give those spans a sane default so the glyph still
 * renders solid via the current FA7 font instead of showing as tofu.
 */
[aria-hidden="true"]:not([class*="fa"]) {
  font-family: "Font Awesome 7 Pro", "Font Awesome 5 Pro", "Font Awesome 5 Free", "FontAwesome", sans-serif;
  font-weight: 900;
}
