/* 
 * Global Font Uniformity CSS
 * Ensures consistent Poppins font family across the entire application
 * Author: Assistant
 * Purpose: Override all existing font declarations for uniformity
 */

/* Import Poppins font with all necessary weights */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Global font override - highest specificity */
* {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* Body and HTML base */
html,
body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    font-weight: 400 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* All heading elements */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    font-weight: 600 !important;
}

/* Paragraphs and text elements */
p, span, div, a, li, td, th, label, input, textarea, select, button {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* Form elements */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
textarea,
select {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    font-weight: 400 !important;
}

/* Buttons */
button,
.btn,
input[type="button"],
input[type="submit"],
input[type="reset"] {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    font-weight: 500 !important;
}

/* Navigation elements */
nav,
.navigation,
.nav,
.navbar {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* Table elements */
table,
thead,
tbody,
tfoot,
tr,
td,
th {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* Override specific template classes that might have font declarations */
.text,
.content,
.description,
.title,
.subtitle,
.heading {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* Admin area overrides */
.main-sidebar,
.content-wrapper,
.main-header,
.main-footer,
.sidebar,
.navbar-nav {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* Bootstrap overrides */
.card,
.card-body,
.card-header,
.card-footer,
.modal,
.modal-body,
.modal-header,
.modal-footer {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* Font weight classes for better typography */
.font-light { font-weight: 300 !important; }
.font-normal { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }
.font-black { font-weight: 900 !important; }

/* Ensure icons don't inherit the font family */
i[class*="fa-"],
i[class*="flaticon-"],
i[class*="icon-"],
.fa,
.fas,
.far,
.fal,
.fab,
.flaticon {
    font-family: inherit !important;
}

/* Responsive font sizes for better readability */
@media (max-width: 768px) {
    body {
        font-size: 14px !important;
    }
    
    h1, .h1 { font-size: 28px !important; }
    h2, .h2 { font-size: 24px !important; }
    h3, .h3 { font-size: 20px !important; }
    h4, .h4 { font-size: 18px !important; }
    h5, .h5 { font-size: 16px !important; }
    h6, .h6 { font-size: 14px !important; }
}

/* Print styles */
@media print {
    * {
        font-family: 'Poppins', Arial, sans-serif !important;
    }
}
