/* Custom Fonts for Biznr POS - Fixed Version */

/* Open Sans Font Faces */
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400; /* Regular */
    src: url('../fonts/OpenSans-Regular.woff2') format('woff2'),
         url('../fonts/OpenSans-Regular.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 500; /* Medium */
    src: url('../fonts/OpenSans-Medium.woff2') format('woff2'),
         url('../fonts/OpenSans-Medium.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 700; /* Bold */
    src:url('../fonts/OpenSans-Bold.woff2') format('woff2'), 
        url('../fonts/OpenSans-Bold.ttf') format('truetype');
    font-display: swap;
}

/* Roboto Font Faces */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 300; /* Light */
    src:url('../fonts/Roboto-Light.woff2') format('woff2'), 
        url('../fonts/Roboto-Light.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400; /* Regular */
    src: url('../fonts/Roboto-Regular.woff2') format('woff2'),
         url('../fonts/Roboto-Regular.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 500; /* Medium */
    src: url('../fonts/Roboto-Medium.woff2') format('woff2'),
         url('../fonts/Roboto-Medium.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 700; /* Bold */
    src: url('../fonts/Roboto-Bold.woff2') format('woff2'),
         url('../fonts/Roboto-Bold.ttf') format('truetype');
    font-display: swap;
}

/* Font Variables */
:root {
    --font-primary: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-secondary: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==========================================================================
   BASE TYPOGRAPHY STYLES - Apply Open Sans to text elements only
   ========================================================================== */

/* Apply Open Sans to text elements, but EXCLUDE Font Awesome icons */
body,
p,
span,
div:not([class*="fa-"]):not(.fas):not(.far):not(.fab):not(.fa),
article,
section,
main,
aside,
nav,
header,
footer,
label,
input,
textarea,
select,
button:not([class*="fa-"]):not(.fas):not(.far):not(.fab):not(.fa),
a,
ul,
ol,
li,
table,
th,
td {
    font-family: var(--font-primary) !important;
    font-weight: 400; /* Regular weight for body text */
}

/* Headings with Bold weight */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-primary) !important;
    font-weight: 700 !important; /* Bold weight for headings */
}

/* Medium weight for specific elements */
button:not([class*="fa-"]):not(.fas):not(.far):not(.fab):not(.fa),
.btn:not([class*="fa-"]):not(.fas):not(.far):not(.fab):not(.fa),
.nav-link,
.form-label,
.card-title,
.badge {
    font-family: var(--font-primary) !important;
    font-weight: 500 !important; /* Medium weight for interactive elements */
}

/* ==========================================================================
   SPECIFIC FONT AWESOME PROTECTION
   ========================================================================== */

/* Protect Font Awesome icons from being overridden */
.fas, .far, .fab, .fa,
[class*="fa-"],
.biznr-nav-icon .fas,
.biznr-nav-icon .far,
.biznr-nav-icon .fab,
.biznr-nav-icon [class*="fa-"] {
    font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands', 'Font Awesome 5 Pro' !important;
    font-weight: 900 !important;
}

/* Ensure Font Awesome icons in your menu work */
.biznr-nav-icon .fas,
.biznr-nav-icon .far,
.biznr-nav-icon .fab {
    font-family: 'Font Awesome 5 Free', 'Font Awesome 5 Brands' !important;
    font-weight: 900 !important;
    font-size: 2.5rem !important;
}


/* ==========================================================================
   PROTECT BOOTSTRAP GLYPHICONS FROM BEING OVERRIDDEN
   ========================================================================== */

/* Protect Bootstrap 3 Glyphicons */
.glyphicon {
    font-family: 'Glyphicons Halflings' !important;
    font-weight: normal !important;
    font-style: normal !important;
}

/* Specific glyphicon protection */
[class^="glyphicon-"],
[class*=" glyphicon-"] {
    font-family: 'Glyphicons Halflings' !important;
    font-weight: normal !important;
    font-style: normal !important;
}

/* Common glyphicon classes used in OSPOS */
.glyphicon-home,
.glyphicon-user,
.glyphicon-cog,
.glyphicon-list,
.glyphicon-plus,
.glyphicon-edit,
.glyphicon-trash,
.glyphicon-search,
.glyphicon-print,
.glyphicon-shopping-cart,
.glyphicon-usd,
.glyphicon-stats,
.glyphicon-barcode,
.glyphicon-tags,
.glyphicon-folder-open,
.glyphicon-time,
.glyphicon-calendar,
.glyphicon-arrow-left,
.glyphicon-arrow-right,
.glyphicon-ok,
.glyphicon-remove,
.glyphicon-warning-sign {
    font-family: 'Glyphicons Halflings' !important;
    font-weight: normal !important;
    font-style: normal !important;
}



/* ==========================================================================
   UTILITY CLASSES - For manual control
   ========================================================================== */

/* Font family utilities */
.font-primary { font-family: var(--font-primary) !important; }
.font-secondary { font-family: var(--font-secondary) !important; }

/* Font weight utilities */
.font-light { font-weight: 300 !important; }
.font-regular { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-bold { font-weight: 700 !important; }

/* Test class to verify fonts are working */
.font-test {
    border: 2px solid #e74c3c;
    padding: 10px;
    margin: 10px 0;
    background: #f8f9fa;
    font-family: var(--font-primary) !important;
}

.font-test::before {
    content: "✓ Fonts are loaded correctly! ";
    color: #27ae60;
    font-weight: bold;
}