/*
 * BCA Icons — minimal Font Awesome replacement
 * Replaces the full Font Awesome 6.6.0 webfont (~180 KB) with
 * a custom 13-glyph subset (~3.7 KB) built from IcoMoon.
 *
 * Maps Mercury theme's existing .fa-*, .fas, .far, .fab, .fa-solid,
 * .fa-regular, .fa-brands class names to the bca-icons font.
 */

/*
 * Primary @font-face declaration under our own name.
 */
@font-face {
	font-family: 'bca-icons';
	src:
		url('fonts/bca-icons.woff?v=2') format('woff'),
		url('fonts/bca-icons.ttf?v=2') format('truetype');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

/*
 * Alias declarations — same font file registered under the legacy
 * name that Mercury and ACES use in their CSS ('Font Awesome 5 Free').
 *
 * This lets existing theme rules like
 *     font-family: 'Font Awesome 5 Free' !important
 * continue to resolve. They will find our tiny font and render the
 * glyphs we have (fa-star \f005 in particular, used for ACES star
 * ratings). Codepoints not in our subset still fall back to tofu,
 * which is why we also override specific Mercury rules below.
 *
 * Two weight variants registered so rules using font-weight: 900
 * (solid style) and font-weight: 400/normal (regular style) both
 * resolve to the same file.
 */
@font-face {
	font-family: 'Font Awesome 5 Free';
	src:
		url('fonts/bca-icons.woff?v=2') format('woff'),
		url('fonts/bca-icons.ttf?v=2') format('truetype');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Font Awesome 5 Free';
	src:
		url('fonts/bca-icons.woff?v=2') format('woff'),
		url('fonts/bca-icons.ttf?v=2') format('truetype');
	font-weight: 900;
	font-style: normal;
	font-display: swap;
}

/*
 * Base rule — applies to any <i> or <span> element with one of the
 * Font Awesome family classes. Kept scoped (not a blanket `i` selector)
 * so article italics and other <i> tags are not affected.
 */
i.fa,
i.fas,
i.far,
i.fab,
i.fa-solid,
i.fa-regular,
i.fa-brands,
span.fa,
span.fas,
span.far,
span.fab,
span.fa-solid,
span.fa-regular,
span.fa-brands {
	font-family: 'bca-icons' !important;
	font-weight: normal;
	font-style: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	display: inline-block;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Icon glyph mappings — 13 icons covering all uses on the site. */
.fa-x-twitter::before               { content: "\e900"; }
.fa-search::before                  { content: "\f002"; }
.fa-star::before                    { content: "\f005"; }
.fa-clock::before                   { content: "\f017"; }
.fa-check-circle::before            { content: "\f058"; }
.fa-chevron-up::before              { content: "\f077"; }
.fa-chevron-down::before            { content: "\f078"; }
.fa-facebook::before                { content: "\f082"; }
.fa-linkedin-in::before             { content: "\f08c"; }
.fa-credit-card::before             { content: "\f09d"; }
.fa-arrow-alt-circle-right::before  { content: "\f0a9"; }
.fa-arrow-alt-circle-up::before     { content: "\f0aa"; }
.fa-instagram::before               { content: "\f16d"; }

/*
 * Override Mercury menu chevron rule.
 *
 * Mercury renders a filled-triangle-down glyph (\f0dd) which is not
 * in our subset. Replace with \f078 (chevron-down) which we have.
 * Visual becomes a chevron instead of a filled triangle — arguably
 * cleaner, but if you want the exact original look, replace the
 * content rule below with a CSS-drawn triangle (see README).
 */
.space-header-menu ul.main-menu li.menu-item-has-children > a::after {
	content: "\f078" !important;
	font-family: 'bca-icons' !important;
	font-weight: normal !important;
}
/*
 * Star rating colors — full stars gold, empty stars muted grey.
 *
 * Our subset font only contains one star glyph (filled), so we
 * cannot rely on font-weight to swap between filled and outlined
 * variants like the original Font Awesome did. Instead, distinguish
 * full vs empty by color.
 */
.space-organizations-8-archive-item-stars-rating .star-rating .star-empty,
.star-rating .star-empty,
.star-empty {
	color: #d4d4d4 !important;
}

.space-organizations-8-archive-item-stars-rating .star-rating .star-full,
.star-rating .star-full,
.star-full {
	color: #f7b500 !important;
}
