@tailwind base;
@tailwind components;
@tailwind utilities;

/* Global Quicksand font application - Using local font file */
@font-face {
    font-family: 'Quicksand';
    src: url('/fonts/Quicksand.woff2') format('woff2');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

@layer base {
    /* Apply Quicksand to root elements - Override any system-ui fallbacks */
    :host,
    html {
        font-family: 'Quicksand', sans-serif !important;
    }
    
    body {
        font-family: 'Quicksand', sans-serif !important;
    }
    
    /* Apply Quicksand to all common HTML elements */
    div,
    span,
    p,
    h1, h2, h3, h4, h5, h6,
    a,
    li,
    ul,
    ol,
    td,
    th,
    table,
    thead,
    tbody,
    tfoot,
    label,
    input,
    select,
    textarea,
    button,
    form,
    section,
    article,
    header,
    footer,
    nav,
    aside,
    main {
        font-family: 'Quicksand', sans-serif !important;
    }
    
    /* Override any inline styles with font-family */
    [style*="font-family"] {
        font-family: 'Quicksand', sans-serif !important;
    }
    
    /* SVG text elements */
    svg text,
    text {
        font-family: 'Quicksand', sans-serif !important;
    }
    
    /* Override system fonts in inline styles - Force Quicksand */
    [style*="ui-sans-serif"],
    [style*="system-ui"],
    [style*="-apple-system"],
    [style*="BlinkMacSystemFont"],
    [style*="Segoe UI"],
    [style*="Roboto"],
    [style*="Helvetica Neue"],
    [style*="Arial"],
    [style*="Noto Sans"],
    [style*="Figtree"],
    [style*="Inter"] {
        font-family: 'Quicksand', sans-serif !important;
    }
    
    /* Override Tailwind font classes */
    .font-sans {
        font-family: 'Quicksand', sans-serif !important;
    }
    
    /* Exception: Keep monospace for code elements - Must come before universal selector */
    code,
    pre,
    kbd,
    samp,
    .code,
    .monospace {
        font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace !important;
    }
    
    /* Universal override - Force Quicksand everywhere to prevent system-ui fallback */
    /* Excludes code elements which are handled above */
    *:not(code):not(pre):not(kbd):not(samp):not(.code):not(.monospace) {
        font-family: 'Quicksand', sans-serif !important;
    }
}
