/**
 * Font Awesome 6 is loaded in index.php; most markup still uses FA4-style "fa fa-*" classes.
 * v4-shims.min.css (loaded after all.min.css) maps those names to FA6 glyphs.
 * Rules here cover brand-only / FA5+ icons that shims do not define, and collapse toggles in portlets.
 */

/* Legacy .fa prefix: ensure icons render when only "fa" + icon name are present (no fa-solid) */
.fa::before,
.fa::after {
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
}

/* Portlet / section collapse chevrons (Documents, etc.) */
.portlet-title > .caption > i.fa:first-child,
.proposal-fin__chevron {
    display: inline-block;
    min-width: 1em;
    text-align: center;
}

/*
 * Metronic (components.css) sets font-weight:300 on .portlet-title > .caption > i.
 * Font Awesome 6 solid icons need font-weight:900 — otherwise portlet headers show empty boxes.
 * Load this stylesheet after components.min.css / app-theme.css (see index.php).
 */
.portlet > .portlet-title > .caption > i.fa,
.portlet.light > .portlet-title > .caption > i.fa,
.portlet.solid > .portlet-title > .caption > i.fa,
.portlet.box > .portlet-title > .caption > i.fa,
.modern-portlet .portlet-title .caption > i.fa,
.page-title > i.fa,
h1.page-title > i.fa,
h3.page-title > i.fa,
h4 > i.fa,
.portlet-body > h4 > i.fa,
.portlet-body > h5 > i.fa,
.form-section-title > i.fa,
.caption > i.fa {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.portlet > .portlet-title > .caption > i.fab,
.portlet > .portlet-title > .caption > i.fa-brands,
.portlet.light > .portlet-title > .caption > i.fab,
.portlet > .portlet-title > .caption > i.fa.fa-hubspot,
.portlet > .portlet-title > .caption > i.fa.fa-facebook,
.portlet > .portlet-title > .caption > i.fa.fa-twitter {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

/* Legacy Metronic Simple Line Icons in portlet titles (jobs, customers, etc.) */
.portlet > .portlet-title > .caption > i[class^="icon-"],
.portlet > .portlet-title > .caption > i[class*=" icon-"],
.portlet.light > .portlet-title > .caption > i[class^="icon-"],
.portlet.light > .portlet-title > .caption > i[class*=" icon-"] {
    font-family: Simple-Line-Icons !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-variant: normal !important;
    speak: never;
}

/* HubSpot — brand icon (never existed in FA4) */
.fa.fa-hubspot::before {
    font-family: "Font Awesome 6 Brands";
    font-weight: 400;
    content: "\f3b2";
}

/* FA5+ icons used in jobs/inventory that may not resolve via shims on all builds */
.fa.fa-shovel::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f85e"; /* person-digging — closest free substitute for excavations */
}

.fa.fa-list-check::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f0ae"; /* list-check */
}

/* Social / brand icons referenced with .fa (not .fab) */
.fa.fa-facebook::before,
.fa.fa-twitter::before {
    font-family: "Font Awesome 6 Brands";
    font-weight: 400;
}

.fa.fa-facebook::before {
    content: "\f09a";
}

.fa.fa-twitter::before {
    content: "\f099";
}
