/* 
 * ULTIMATE ICONS FIX - HIGHEST PRIORITY
 * This file MUST be loaded LAST to override all other CSS
 * Version: 2.0 - Final Fix
 */

/* ========================================
 * FONT AWESOME 6 - ULTIMATE PROTECTION
 * ======================================== */

/* All Font Awesome icons - Maximum specificity */
.fa, .fas, .far, .fab, .fal, .fad,
.fa-solid, .fa-regular, .fa-brands, .fa-light, .fa-thin,
i.fa, i.fas, i.far, i.fab, i.fal, i.fad,
span.fa, span.fas, span.far, span.fab,
i[class^="fa-"], i[class*=" fa-"],
span[class^="fa-"], span[class*=" fa-"],
.btn i.fa, .btn i.fas, .btn i.far, .btn i.fab,
button i.fa, button i.fas, button i.far, button i.fab,
a i.fa, a i.fas, a i.far, a i.fab,
.dropdown-menu i.fa, .dropdown-menu i.fas,
.table i.fa, .table i.fas,
li i.fa, li i.fas,
td i.fa, td i.fas,
th i.fa, th i.fas {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 
                 'Font Awesome 5 Free', 'Font Awesome 5 Brands',
                 'FontAwesome', sans-serif !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    font-weight: 900 !important;
    display: inline-block !important;
    font-size: inherit !important;
    text-decoration: none !important;
}

/* Solid icons weight */
.fas, i.fas, span.fas {
    font-weight: 900 !important;
}

/* Regular icons weight */
.far, i.far, span.far {
    font-weight: 400 !important;
}

/* Brands icons weight */
.fab, i.fab, span.fab {
    font-weight: 400 !important;
}

/* ========================================
 * GLYPHICONS PROTECTION (For legacy icons)
 * ======================================== */

.glyphicon, i.glyphicon, span.glyphicon,
[class^="glyphicon-"], [class*=" glyphicon-"],
.btn .glyphicon, button .glyphicon {
    font-family: 'Glyphicons Halflings', sans-serif !important;
    font-style: normal !important;
    font-weight: normal !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* ========================================
 * ALL ICON ELEMENTS - CATCH ALL
 * ======================================== */

/* Any <i> or <span> inside buttons, links, tables */
.btn i, button i, a i, td i, th i, li i,
.dropdown-menu i, .table i, .btn-group i {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', 
                 'FontAwesome', 'Glyphicons Halflings', sans-serif !important;
    font-style: normal !important;
    font-weight: 900 !important;
    -webkit-font-smoothing: antialiased !important;
}

/* ========================================
 * DROPDOWN MENU ICONS FIX
 * ======================================== */

.dropdown-menu > li > a > i,
ul.dropdown-menu li a i,
.dropdown-item i {
    font-family: 'Font Awesome 6 Free', 'FontAwesome' !important;
    font-style: normal !important;
    font-weight: 900 !important;
    margin-right: 8px !important;
    display: inline-block !important;
    width: 1.25em !important;
    text-align: center !important;
}

/* ========================================
 * DATATABLE ACTION BUTTONS ICONS
 * ======================================== */

.table .btn i, .table button i, .table a i,
.dataTable .btn i, .dataTable button i, .dataTable a i,
.dataTables_wrapper .btn i, .dataTables_wrapper button i {
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    font-style: normal !important;
}

/* ========================================
 * SIDEBAR MENU ICONS
 * ======================================== */

.sidebar-menu i, .treeview-menu i,
.sidebar-menu .fa, .treeview-menu .fa,
.main-sidebar i {
    font-family: 'Font Awesome 6 Free', 'FontAwesome' !important;
    font-weight: 900 !important;
    font-style: normal !important;
}

/* ========================================
 * BUTTON ICONS SPACING
 * ======================================== */

.btn i + span, button i + span {
    margin-left: 5px;
}

.btn span + i, button span + i {
    margin-left: 5px;
}

/* ========================================
 * FORCE ICON DISPLAY
 * ======================================== */

i[class*="fa-"]:before,
.fa:before, .fas:before, .far:before, .fab:before {
    display: inline-block !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
}

/* ========================================
 * FIX FOR SPECIFIC ICONS USED IN PROJECT
 * ======================================== */

/* Edit icon */
.fa-edit:before { content: "\f044" !important; }

/* Trash/Delete icon */
.fa-trash:before, .fa-trash-alt:before { content: "\f2ed" !important; }

/* Eye icon */
.fa-eye:before { content: "\f06e" !important; }

/* Money icon */
.fa-money-bill-alt:before { content: "\f3d1" !important; }

/* Power off icon */
.fa-power-off:before { content: "\f011" !important; }

/* Scroll icon */
.fa-scroll:before { content: "\f70e" !important; }

/* Arrow down icon */
.fa-arrow-circle-down:before { content: "\f0ab" !important; }

/* Hourglass icon */
.fa-hourglass-half:before { content: "\f252" !important; }

/* Paperclip icon */
.fa-paperclip:before { content: "\f0c6" !important; }

/* Plus icon */
.fa-plus:before { content: "\f067" !important; }

/* Minus icon */
.fa-minus:before { content: "\f068" !important; }

/* Times/Remove icon */
.fa-times:before { content: "\f00d" !important; }

/* Save icon */
.fa-save:before { content: "\f0c7" !important; }

/* ========================================
 * PREVENT CAIRO FONT FROM AFFECTING ICONS
 * ======================================== */

/* Override any Cairo font application on icons */
i, .fa, .fas, .far, .fab, span.fa, span.fas, i[class*="fa-"] {
    font-family: 'Font Awesome 6 Free', 'FontAwesome' !important;
    speak: none !important;
}

/* Ensure icons are not affected by text properties */
.fa, .fas, .far, .fab {
    text-transform: none !important;
    letter-spacing: normal !important;
    word-wrap: normal !important;
    white-space: nowrap !important;
}
