/**
 * Font Override CSS
 * This file ensures that the selected font from the theme options panel
 * is applied consistently throughout the site, overriding Bootstrap defaults.
 */

/* Apply font to all elements */
html, body, button, input, optgroup, select, textarea,
h1, h2, h3, h4, h5, h6, p, a, span, div, 
.navbar, .dropdown-item, .card, .btn, .form-control {
    font-family: var(--font-family, 'PT Sans'), sans-serif !important;
}

/* Override Bootstrap specific font definitions */
.h1, .h2, .h3, .h4, .h5, .h6, 
.navbar-brand, .navbar-title, .section-title,
.card-title, .content h1, .content h2, .content h3, 
.content h4, .content h5, .content h6 {
    font-family: var(--font-family, 'PT Sans'), sans-serif !important;
}

/* Ensure font is applied to form elements */
input, select, textarea, button {
    font-family: var(--font-family, 'PT Sans'), sans-serif !important;
}

/* Apply to WordPress admin elements that might appear in the frontend */
.wp-block, .wp-block-paragraph, .wp-block-heading {
    font-family: var(--font-family, 'PT Sans'), sans-serif !important;
}

/* WordPress admin specific overrides */
body.wp-admin #wpcontent, 
body.wp-admin #wpbody,
body.wp-admin .wp-has-current-submenu .wp-submenu .wp-submenu-head,
body.wp-admin #adminmenu .wp-submenu a,
body.wp-admin #adminmenu a,
body.wp-admin .wp-dialog {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

/* Fix for WordPress admin menu */
#adminmenu, #adminmenu .wp-submenu, #adminmenuback, #adminmenuwrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}
