/*
 * fa6-shim.css
 * ---------------------------------------------------------------------------
 * Bridges FontAwesome 6 syntax → FontAwesome 5 font files already on server.
 *
 * Problem: the new dashboard uses FA6 class syntax (.fa-solid, .fa-regular,
 * .fa-brands) and FA6-only icon names. The server has FA5 installed locally.
 *
 * Solution: (1) teach FA5 fonts to respond to FA6 prefix classes,
 *           (2) map every FA6-only icon name to its FA5 unicode equivalent.
 *
 * Load this file AFTER fontawesome.min.css in headerAssets.blade.php.
 * ---------------------------------------------------------------------------
 */

/* ── 1. FA6 prefix class → FA5 font rendering ─────────────────────────── */

.fa-solid {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1;
}

.fa-regular {
    font-family: "Font Awesome 5 Free";
    font-weight: 400;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1;
}

.fa-brands {
    font-family: "Font Awesome 5 Brands";
    font-weight: 400;
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1;
}

/* ── 2. FA6-only icon names → FA5 unicode equivalents ─────────────────── */

/* fa-circle-dot  →  fa-dot-circle */
.fa-circle-dot:before            { content: "\f192"; }

/* fa-wand-magic-sparkles  →  fa-magic */
.fa-wand-magic-sparkles:before   { content: "\f0d0"; }

/* fa-rotate  →  fa-sync-alt */
.fa-rotate:before                { content: "\f2f1"; }

/* fa-screwdriver-wrench  →  fa-tools */
.fa-screwdriver-wrench:before    { content: "\f7d9"; }

/* fa-user-group  →  fa-user-friends */
.fa-user-group:before            { content: "\f500"; }

/* fa-file-lines  →  fa-file-alt */
.fa-file-lines:before            { content: "\f15c"; }

/* fa-magnifying-glass-chart  →  fa-chart-bar (closest FA5 equivalent) */
.fa-magnifying-glass-chart:before { content: "\f080"; }

/* fa-circle-info  →  fa-info-circle */
.fa-circle-info:before           { content: "\f05a"; }

/* fa-arrow-trend-up  →  fa-arrow-up */
.fa-arrow-trend-up:before        { content: "\f062"; }

/* fa-arrow-trend-down  →  fa-arrow-down */
.fa-arrow-trend-down:before      { content: "\f063"; }

/* fa-earth-americas  →  fa-globe-americas */
.fa-earth-americas:before        { content: "\f57d"; }

/* fa-share-nodes  →  fa-share-alt */
.fa-share-nodes:before           { content: "\f1e0"; }

/* fa-triangle-exclamation  →  fa-exclamation-triangle */
.fa-triangle-exclamation:before  { content: "\f071"; }

/* fa-circle-check  →  fa-check-circle */
.fa-circle-check:before          { content: "\f058"; }

/* fa-grip  →  fa-grip-horizontal */
.fa-grip:before                  { content: "\f58d"; }

/* fa-magnifying-glass  →  fa-search */
.fa-magnifying-glass:before      { content: "\f002"; }

/* ── 3. Additional FA6-only names used by the History analytics dashboard ─ */

/* fa-xmark  →  fa-times */
.fa-xmark:before                 { content: "\f00d"; }

/* fa-table-list  →  fa-table */
.fa-table-list:before            { content: "\f0ce"; }

/* fa-shield  →  fa-shield-alt */
.fa-shield:before                { content: "\f3ed"; }

/* fa-shield-halved  →  fa-shield-alt */
.fa-shield-halved:before         { content: "\f3ed"; }

/* fa-gauge-high  →  fa-tachometer-alt */
.fa-gauge-high:before            { content: "\f3fd"; }

/* fa-diagram-project  →  fa-project-diagram */
.fa-diagram-project:before       { content: "\f542"; }

/* fa-display  →  fa-desktop */
.fa-display:before               { content: "\f108"; }

/* fa-mobile-screen  →  fa-mobile-alt */
.fa-mobile-screen:before         { content: "\f3cd"; }

/* fa-tablet-screen-button  →  fa-tablet-alt */
.fa-tablet-screen-button:before  { content: "\f3fa"; }

/* fa-circle-question  →  fa-question-circle */
.fa-circle-question:before       { content: "\f059"; }

/* fa-arrow-right-long  →  fa-long-arrow-alt-right */
.fa-arrow-right-long:before      { content: "\f30b"; }

/* fa-calendar-week (exists in FA5 as fa-calendar-week \f784 — keep for safety) */
.fa-calendar-week:before         { content: "\f784"; }

/* fa-calendar-days  →  fa-calendar-alt */
.fa-calendar-days:before         { content: "\f073"; }

/* fa-arrow-trend-up / -down already mapped above; alias the generic just in case */

/* fa-up-right-from-square  →  fa-external-link-alt */
.fa-up-right-from-square:before  { content: "\f35d"; }

/* fa-user-pen → fa-user-edit (used by Humanized Content pill in writers shell) */
.fa-user-pen:before { content: "\f4ff"; }

/* ── 3b. FA6-only names used by the In-App Notifications module ──────────
   Every one of these rendered as an empty glyph box before this block: the
   name has no FA5 rule to match, so the ::before had no content and the
   button looked like it had lost its label. Checked against the admin
   notification screens (dashboard / index / form / categories / analytics)
   and the sidebar entry. */
.fa-bell-concierge:before             { content: "\f562"; } /* concierge-bell */
.fa-folder-tree:before                { content: "\f0e8"; } /* sitemap */
.fa-gauge:before                      { content: "\f3fd"; } /* tachometer-alt */
.fa-arrow-pointer:before              { content: "\f245"; } /* mouse-pointer */
.fa-box-archive:before                { content: "\f187"; } /* archive */
.fa-rotate-left:before                { content: "\f0e2"; } /* undo */
.fa-repeat:before                     { content: "\f01e"; } /* redo */
.fa-pen-to-square:before              { content: "\f044"; } /* edit */
.fa-sliders:before                    { content: "\f1de"; } /* sliders-h */
.fa-arrow-up-right-from-square:before { content: "\f35d"; } /* external-link-alt */
.fa-chart-simple:before               { content: "\f080"; } /* chart-bar */
/* fa-sparkles is Pro-only even in FA6 — fall back to the same wand glyph the
   Free set gives fa-wand-magic-sparkles. */
.fa-sparkles:before                   { content: "\f0d0"; } /* magic */

/* ── 4. FA6-only names used by the Users Management module ─ */
.fa-circle-exclamation:before { content: "\f06a"; } /* exclamation-circle */
.fa-circle-xmark:before        { content: "\f057"; } /* times-circle */
.fa-clock-rotate-left:before   { content: "\f1da"; } /* history */
.fa-floppy-disk:before         { content: "\f0c7"; } /* save */
.fa-right-to-bracket:before    { content: "\f2f6"; } /* sign-in-alt */
.fa-table-cells:before         { content: "\f00a"; } /* th */
.fa-user-pen:before            { content: "\f4ff"; } /* user-edit */
.fa-users-gear:before          { content: "\f509"; } /* users-cog */
.fa-user-gear:before           { content: "\f4fe"; } /* user-cog */
.fa-users-cog:before           { content: "\f509"; } /* (alias, native too) */

/* ── 5. FA6-only names used by the Payments module ─────────────────────────
   Added 2026-07-26 alongside the payment gateway system. Every one of these
   rendered as an empty box before this block existed: the blades are written
   against FA6 names and the server ships the FA5 font files, so a name with no
   FA5 rule produces an ::before with no content and the control looks like it
   lost its icon. Each mapping names the FA5 glyph it borrows. */
.fa-arrows-rotate:before        { content: "\f2f1"; } /* sync-alt */
.fa-rotate:before               { content: "\f2f1"; } /* sync-alt */
.fa-rotate-right:before         { content: "\f01e"; } /* redo */
.fa-arrow-up-1-9:before         { content: "\f162"; } /* sort-numeric-down */
.fa-building-columns:before     { content: "\f19c"; } /* university */
.fa-cart-shopping:before        { content: "\f07a"; } /* shopping-cart */
.fa-circle-minus:before         { content: "\f056"; } /* minus-circle */
.fa-file-shield:before          { content: "\f56c"; } /* file-contract */
.fa-hand-holding-dollar:before  { content: "\f4c0"; } /* hand-holding-usd */
.fa-heart-pulse:before          { content: "\f21e"; } /* heartbeat */
.fa-indian-rupee-sign:before    { content: "\f156"; } /* rupee-sign */
.fa-link-slash:before           { content: "\f127"; } /* unlink */
.fa-money-bill-transfer:before  { content: "\f362"; } /* exchange-alt */
.fa-note-sticky:before          { content: "\f249"; } /* sticky-note */
.fa-paintbrush:before           { content: "\f1fc"; } /* paint-brush */
.fa-sack-dollar:before          { content: "\f53a"; } /* money-bill-wave */
.fa-scale-balanced:before       { content: "\f24e"; } /* balance-scale */
/* fa-badge-check is Pro-only in FA6; the Free check-circle reads the same. */
.fa-badge-check:before          { content: "\f058"; } /* check-circle */
.fa-wand-magic:before           { content: "\f0d0"; } /* magic */

/* ── 6. FA6-only names found rendering as empty boxes on the payments screens
   (they come from the always-present admin chrome — command palette and
   sidebar — so they were blank on every admin page, not just payments).
   Audited 2026-07-26 by walking the rendered DOM of all 22 payment screens and
   asserting a `.fa-NAME:before` exists for every class actually emitted. ───── */
.fa-ranking-star:before         { content: "\f091"; } /* trophy */
.fa-code-compare:before         { content: "\f126"; } /* code-branch */
.fa-bars-staggered:before       { content: "\f550"; } /* stream */
.fa-building-user:before        { content: "\f1ad"; } /* building */

/* ── 7. FA6-only names found rendering as empty boxes on the Tool Submissions
   screens. Audited 2026-07-28 by extracting every `fa-*` class emitted by the
   module's blades and asserting a `.fa-NAME:before` exists for each. ───────── */
.fa-list-check:before           { content: "\f0ae"; } /* tasks */

/* ── 8. Sitewide FA6 sweep — 2026-08-03 ────────────────────────────────────
   Triggered by fa-clapperboard rendering as a blank box on /guides. The name
   was already mapped in guides-public.css, but scoped under `.gdp`, so it only
   worked inside that one wrapper and blanked everywhere else (and on /guides
   itself wherever the icon sat outside `.gdp`). Scoped shims are the bug, not
   the fix: a glyph mapping has no business being route-gated. These are global.

   Audited by extracting every `fa-NAME` token emitted across the blades, PHP
   icon maps, seeders and CSS, then asserting a `.fa-NAME:before` rule exists in
   fontawesome.min.css or in this file. Each mapping names the FA5 glyph it
   borrows, and every borrowed codepoint was checked for real membership in
   assets/fonts/fa-solid-900.svg — a CSS rule alone does not prove the glyph
   exists in the font the prefix class selects. */
.fa-arrow-down-short-wide:before    { content: "\f884"; } /* sort-amount-down-alt */
.fa-arrow-down-wide-short:before    { content: "\f160"; } /* sort-amount-down */
.fa-arrow-right-arrow-left:before   { content: "\f362"; } /* exchange-alt */
.fa-arrow-right-from-bracket:before { content: "\f2f5"; } /* sign-out-alt */
.fa-arrow-rotate-left:before        { content: "\f0e2"; } /* undo */
.fa-arrow-up-from-bracket:before    { content: "\f093"; } /* upload */
.fa-arrow-up-right-dots:before      { content: "\f201"; } /* chart-line */
.fa-arrow-up-wide-short:before      { content: "\f161"; } /* sort-amount-up */
.fa-arrows-left-right:before        { content: "\f337"; } /* arrows-alt-h */
.fa-arrows-to-dot:before            { content: "\f78c"; } /* compress-arrows-alt */
.fa-arrows-up-down:before           { content: "\f338"; } /* arrows-alt-v */
.fa-bolt-lightning:before           { content: "\f0e7"; } /* bolt */
.fa-book-open-reader:before         { content: "\f5da"; } /* book-reader */
.fa-brackets-curly:before           { content: "\f121"; } /* code */
.fa-building-shield:before          { content: "\f1ad"; } /* building */
.fa-chart-column:before             { content: "\f080"; } /* chart-bar */
.fa-circle-half-stroke:before       { content: "\f042"; } /* adjust */
.fa-circle-pause:before             { content: "\f28b"; } /* pause-circle */
.fa-circle-play:before              { content: "\f144"; } /* play-circle */
.fa-circle-plus:before              { content: "\f055"; } /* plus-circle */
.fa-clapperboard:before             { content: "\f008"; } /* film */
.fa-cloud-arrow-up:before           { content: "\f382"; } /* cloud-upload-alt */
.fa-code-merge:before               { content: "\f126"; } /* code-branch */
.fa-code-pull-request:before        { content: "\f126"; } /* code-branch */
.fa-diagram-next:before             { content: "\f542"; } /* project-diagram */
.fa-ellipsis:before                 { content: "\f141"; } /* ellipsis-h */
.fa-envelope-circle-check:before    { content: "\f658"; } /* envelope-open-text */
.fa-face-frown:before               { content: "\f119"; } /* frown */
.fa-face-surprise:before            { content: "\f5c2"; } /* surprise */
.fa-feather-pointed:before          { content: "\f56b"; } /* feather-alt */
.fa-file-arrow-down:before          { content: "\f56d"; } /* file-download */
.fa-file-arrow-up:before            { content: "\f574"; } /* file-upload */
.fa-file-circle-plus:before         { content: "\f477"; } /* file-medical */
.fa-file-circle-question:before     { content: "\f15c"; } /* file-alt */
.fa-file-circle-xmark:before        { content: "\f15c"; } /* file-alt */
.fa-file-pen:before                 { content: "\f573"; } /* file-signature */
.fa-file-zipper:before              { content: "\f1c6"; } /* file-archive */
.fa-filter-circle-xmark:before      { content: "\f0b0"; } /* filter */
.fa-gear:before                     { content: "\f013"; } /* cog */
.fa-gears:before                    { content: "\f085"; } /* cogs */
.fa-house:before                    { content: "\f015"; } /* home */
.fa-house-chimney:before            { content: "\f015"; } /* home */
.fa-input-text:before               { content: "\f246"; } /* i-cursor */
.fa-location-dot:before             { content: "\f3c5"; } /* map-marker-alt */
.fa-magnifying-glass-dollar:before  { content: "\f688"; } /* search-dollar */
.fa-magnifying-glass-minus:before   { content: "\f010"; } /* search-minus */
.fa-magnifying-glass-plus:before    { content: "\f00e"; } /* search-plus */
.fa-masks-theater:before            { content: "\f630"; } /* theater-masks */
.fa-message:before                  { content: "\f075"; } /* comment */
.fa-microphone-lines:before         { content: "\f3c9"; } /* microphone-alt */
.fa-mobile-screen-button:before     { content: "\f3cd"; } /* mobile-alt */
.fa-money-bill-trend-up:before      { content: "\f53a"; } /* money-bill-wave */
.fa-money-check-dollar:before       { content: "\f53d"; } /* money-check-alt */
.fa-panorama:before                 { content: "\f03e"; } /* image */
.fa-pen-ruler:before                { content: "\f5ae"; } /* pencil-ruler */
.fa-rectangle-ad:before             { content: "\f641"; } /* ad */
.fa-rectangle-list:before           { content: "\f022"; } /* list-alt */
.fa-right-left:before               { content: "\f362"; } /* exchange-alt */
.fa-scissors:before                 { content: "\f0c4"; } /* cut */
.fa-shield-check:before             { content: "\f3ed"; } /* shield-alt */
.fa-shuffle:before                  { content: "\f074"; } /* random */
.fa-square-poll-horizontal:before   { content: "\f682"; } /* poll-h */
.fa-square-poll-vertical:before     { content: "\f681"; } /* poll */
.fa-star-half-stroke:before         { content: "\f5c0"; } /* star-half-alt */
.fa-table-cells-large:before        { content: "\f009"; } /* th-large */
.fa-table-columns:before            { content: "\f0db"; } /* columns */
.fa-ticket:before                   { content: "\f3ff"; } /* ticket-alt */
.fa-timeline:before                 { content: "\f550"; } /* stream */
.fa-tower-broadcast:before          { content: "\f519"; } /* broadcast-tower */
.fa-trash-can:before                { content: "\f2ed"; } /* trash-alt */
.fa-truck-fast:before               { content: "\f48b"; } /* shipping-fast */
.fa-up-down-left-right:before       { content: "\f0b2"; } /* arrows-alt */
.fa-user-xmark:before               { content: "\f235"; } /* user-times */
.fa-volume-high:before              { content: "\f028"; } /* volume-up */
.fa-wand-sparkles:before            { content: "\f0d0"; } /* magic */

/* fa-x-twitter is FA6-brands-only. \f099 IS present in fa-brands-400, so this
   works — but ONLY under a `fab` / `fa-brands` prefix, and it draws the old
   bird: the X logo does not exist anywhere in FA 5.15.3. */
.fa-x-twitter:before                { content: "\f099"; } /* twitter (brands) */
