/*
 * Icon subset for icons written into post content.
 *
 * Font Awesome Free 5.0.8 by @fontawesome — https://fontawesome.com
 * Icons: CC BY 4.0 · Fonts: SIL OFL 1.1 · Code: MIT
 * https://fontawesome.com/license
 *
 * Why this file exists
 * --------------------
 * The theme used to load a FontAwesome kit from kit.fontawesome.com. That URL
 * started answering 403, so every icon written into an article stopped
 * rendering. The kit was dropped in favour of this local subset.
 *
 * Why a subset rather than the whole set: a survey of published posts found
 * 425 icon usages spanning only 14 distinct icons, and 4 of those are FA4
 * syntax that another plugin's stylesheet already covers. What is left is the
 * ten rules below. The full stylesheet is 35 kB against roughly 1 kB here.
 *
 * The brand rules also have to cover the five icons in reusable block 48098,
 * which the theme injects into every post that has a more tag — those are not
 * in the survey above, because no post stores that markup.
 *
 * The two woff2 files in ../fonts/ are copied verbatim from the FontAwesome
 * Free 5.0.8 distribution. Only brands and solid are copied — no icon in use
 * needs the regular face.
 *
 * This is enqueued on every singular view. See lai_enqueue_icon_subset() for
 * why it is not conditional on the post's content.
 */

@font-face {
    font-family: 'Font Awesome 5 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/fa-brands-400.woff2') format('woff2');
}

@font-face {
    font-family: 'Font Awesome 5 Free';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../fonts/fa-solid-900.woff2') format('woff2');
}

.fab,
.fas {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    line-height: 1;
    text-rendering: auto;
}

.fab {
    font-family: 'Font Awesome 5 Brands';
    font-weight: 400;
}

.fas {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}

/* Brands — 91% of all usages in content are these five. */
.fa-instagram:before        { content: "\f16d"; }
.fa-youtube:before          { content: "\f167"; }
.fa-telegram:before         { content: "\f2c6"; }
.fa-facebook-square:before  { content: "\f082"; }
.fa-facebook-f:before       { content: "\f39e"; }
.fa-facebook:before         { content: "\f09a"; }
.fa-vk:before               { content: "\f189"; }

/*
 * fa-instagram-square is the single most used icon in content (88 usages) and
 * does not exist in 5.0.8 — it arrived in a later release. Aliased to the
 * round mark, which differs only in the frame around it.
 */
.fa-instagram-square:before { content: "\f16d"; }

/* Solid */
.fa-quote-left:before             { content: "\f10d"; }
.fa-arrow-alt-circle-right:before { content: "\f35a"; }
.fa-play:before                   { content: "\f04b"; }
