﻿@font-face {
    font-family: 'banfile';
    src: url('../fonts/banfile.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* 
   Apply banfile font intelligently 
   We include system emoji fonts in the fallback stack so emojis render correctly.
*/
body, p, a, h1, h2, h3, h4, h5, h6, input, button, select, textarea, li, div, td, th {
    font-family: 'banfile', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
}

/* 
   WP Admin Core overrides 
   Instead of wildcard *, we target specific structural text elements 
*/
body.wp-admin,
body.wp-admin #wpadminbar,
body.wp-admin #adminmenu,
body.wp-admin .wrap,
body.wp-admin .postbox,
body.wp-admin .wp-list-table {
    font-family: 'banfile', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
}

/* Force override for WordPress admin structural elements, but explicitly ignore icon classes! */
body.wp-admin *:not(.dashicons):not(.fa):not(.fas):not(.fab):not(.far):not(.fal):not(.icomoon):not(.tabler-icon):not([class^="icon-"]):not([class*=" icon-"]):not([class^="ri-"]):not([class*=" ri-"]):not(i):not(span.icon) {
    font-family: 'banfile', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
}

/* Protect Dashboard Icons Specifically */
.dashicons, 
.dashicons-before::before,
#adminmenu div.wp-menu-image::before,
.wp-core-ui .button-link.dashicons {
    font-family: dashicons !important;
}

/* Protect FontAwesome & Theme Icons Specifically */
.fa, .fas, .fab, .far, .fal {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
}
.fab {
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
}
