﻿/* ==========================================================================
   DBIM v3 / GIGW 3.0 - typography for every page that uses MasterPage.master
   Loaded LAST in <head> (after the page's own CSS) and uses !important on font-family
   so page-level CSS (notifications.css, Bootstrap, old inline <style> blocks) cannot override it.
   Colours and sizes are NOT touched, so the Accessibility drawer keeps working.
   ========================================================================== */

:root {
    /* Noto Sans = DBIM typeface; Noto Sans Kannada covers ಕನ್ನಡ glyphs (per-glyph fallback) */
    --dbim-font: "Noto Sans", "Noto Sans Kannada", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: "Noto Sans", "Noto Sans Kannada", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
    font-size: 1rem;            /* scales with the A+/A- control and browser settings; never use px on html */
    font-weight: 400;
    line-height: 1.5;           /* WCAG 1.4.12 / GIGW */
    font-synthesis: none;
}

html[lang="kn"] body { line-height: 1.5; }   /* DBIM 4.5 iii: line height 1.2-1.5x, so Kannada is capped at 1.5 too */

/* Everything on the page except icon fonts and code */
body *:not(.fa):not([class*="fa-"]):not([class*="glyphicon"]):not([class^="bi-"]):not(.material-icons):not(code):not(pre):not(kbd):not(samp) {
    font-family: "Noto Sans", "Noto Sans Kannada", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
}

/* Form controls (select, input, button...) do not inherit by default */
button, input, select, textarea, optgroup {
    font-size: 1rem;
    line-height: inherit;
}

h1, h2, h3, h4, h5, h6 { font-weight: 600; line-height: 1.3; }
html[lang="kn"] h1, html[lang="kn"] h2, html[lang="kn"] h3,
html[lang="kn"] h4, html[lang="kn"] h5, html[lang="kn"] h6 { line-height: 1.4; }

strong, b, th { font-weight: 700; }
em, i, cite { font-style: italic; }
code, pre, kbd, samp { font-family: ui-monospace, Consolas, "Courier New", monospace; }

/* File size shown after document links, e.g. "View (245 KB)" - added by FileSizeText.cs / ctd-filesize.js (GIGW: format and size must be visible) */
.file-size {
    font-size: 0.875em;
    margin-inline-start: 0.4em;
    white-space: nowrap;
}

/* ==========================================================================
   ADDED for the DBIM / GIGW audit
   ========================================================================== */

/* DBIM 4.3.1 / 4.3.2 type scale. Sized in rem so the A+/A- control still works.
   Plain element selectors (low specificity): classed headings such as .f-h keep their own size. */
h1 { font-size: 2.25rem; }   /* 36px */
h2 { font-size: 1.5rem; }    /* 24px */
h3 { font-size: 1.25rem; }   /* 20px */
h4, h5, h6, p, li, td, th { font-size: 1rem; }   /* 16px body; use .small / 0.875rem (14px) for secondary text */
small, .small { font-size: 0.875rem; }

@media (max-width: 767px) {
    h1 { font-size: 1.5rem; }    /* 24px */
    h2 { font-size: 1.25rem; }   /* 20px */
    h3 { font-size: 1rem; }      /* 16px */
    small, .small { font-size: 0.75rem; }   /* 12px */
}

/* DBIM 4.5 i, iv: visible hover and focus states on links, buttons and form controls.
   The blue line plus white halo stays visible on both white and navy backgrounds. */
a:hover { text-decoration: underline; }
button:hover:not(:disabled), [role="button"]:hover, input[type="submit"]:hover, input[type="button"]:hover { filter: brightness(0.92); cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid #0D6EFD;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #FFFFFF;
}
button:disabled, input:disabled, select:disabled, [aria-disabled="true"] { opacity: 0.6; cursor: not-allowed; }