/* ==========================================================================
   dbim-overrides.css  (2026-11-27)  DBIM font-size fixes, loaded LAST.
       desktop  H1 36 | H2 24 | H3 20 | body 16 | small 14   (px)
       mobile   H1 24 | H2 20 | H3 16 | body 14 | small 12   (<= 767px)
   Only font-size / line-height. rem units (1rem = 16px, anchored below).
   calc(... * var(--a11y-scale, 1)) keeps the Accessibility Tools text-size buttons working.
   UNDO: remove the <link ... dbim-overrides.css> line in resources/views/partials/header.blade.php
         and run: sudo -u cgiperth php artisan view:clear
   ========================================================================== */

/* 1. rem anchor. 18.css:380 sets "html, body { font-size: 12px !important }" below 1024px,
      which made 1rem = 12px there. Nothing in the site CSS uses rem for layout. */
html { font-size: 100% !important; }

/* 2. Body text below 1024px: 18.css:380 forced 12px (smaller than DBIM). Raise to DBIM body. */
@media (max-width: 1023px) {
  html body#bdMainSite { font-size: calc(1rem * var(--a11y-scale, 1)) !important; }
}
@media (max-width: 767px) {
  html body#bdMainSite { font-size: calc(0.875rem * var(--a11y-scale, 1)) !important; }
}

/* 3. Info boxes / quick links / side panels: box headings were H3 (20px desktop, 16px mobile).
      They are box labels, not page headings: DBIM body size, semibold kept. */
html #bdMainSite h2.box-title,
html #bdMainSite .box-title a,
html #bdMainSite .box-title strong,
html #bdMainSite .box-title span,
html #bdMainSite .info-headeremg .emg-title,
html #bdMainSite h2.contus-header,
html #bdMainSite .contus-header a,
html #bdMainSite .ministerDetails h2.ministerName,
html #bdMainSite .imp-bg h2,
html #bdMainSite .imp-bg h2 a,
html #bdMainSite .register-title,
html #bdMainSite .rightPart .menuTitle,
html #bdMainSite .leftMenu .menuTitle {
  font-size: calc(1rem * var(--a11y-scale, 1));
  line-height: 1.3;
}
/* the small notes inside boxes stay "small text" */
html #bdMainSite .info-headeremg .emg-note,
html #bdMainSite .ministerDetails h2.ministerName span { font-size: calc(0.875rem * var(--a11y-scale, 1)); }

@media (max-width: 767px) {
  html #bdMainSite h2.box-title,
  html #bdMainSite .box-title a,
  html #bdMainSite .box-title strong,
  html #bdMainSite .box-title span,
  html #bdMainSite .info-headeremg .emg-title,
  html #bdMainSite h2.contus-header,
  html #bdMainSite .contus-header a,
  html #bdMainSite .ministerDetails h2.ministerName,
  html #bdMainSite .imp-bg h2,
  html #bdMainSite .imp-bg h2 a,
  html #bdMainSite .register-title,
  html #bdMainSite .rightPart .menuTitle,
  html #bdMainSite .leftMenu .menuTitle { font-size: calc(0.875rem * var(--a11y-scale, 1)); }
  html #bdMainSite .info-headeremg .emg-note,
  html #bdMainSite .ministerDetails h2.ministerName span { font-size: calc(0.75rem * var(--a11y-scale, 1)); }
}

/* 4. Mobile menu + skip link: 16px (18.css:421 ".mp-menu ul li > a", dbim-standard.css:24) */
@media (max-width: 767px) {
  html #bdMainSite .mp-menu ul li > a,
  html #bdMainSite .mp-menu ul li a { font-size: calc(0.875rem * var(--a11y-scale, 1)); }
  /* panel titles inside the slide-out menu were 18px (18.css ".mp-menu h2 {18px !important}") -> DBIM mobile H3 */
  html #bdMainSite .mp-menu .mp-level > h2 { font-size: calc(1rem * var(--a11y-scale, 1)) !important; line-height: 1.3; }
  html #bdMainSite .skip-link { font-size: calc(0.875rem * var(--a11y-scale, 1)); }
  /* 5.css:11730 pads menu links in em; keep the previous pixel geometry so only the text changes */
  html #bdMainSite .mp-menu ul.mobNav > li > a.menuFirstNode { padding: 12.8px 16px 12.8px 28.8px; }
  html #bdMainSite .mp-menu .mp-level > h2 { padding: 18px 14.4px; }   /* 5.css:11692 '1em 0.8em' at the old 18px */
}
@media (max-width: 1023px) {
  /* same: sub-menu links and "Previous" were sized from the old 12px body (5.css:11730, 5.css:11775) */
  html #bdMainSite .mp-menu ul.menuSubUl li > a { padding: 9.6px 12px 9.6px 21.6px; }
  html #bdMainSite .mp-menu a.mp-back { padding: 12px 12px 9.6px; }
}

/* 5. Font sizes typed inline into page content (RTI page: "medium", "11.5pt"; CMS content):
      body size. (Already done by dbim-standard.css; repeated here so it does not depend on it.) */
html #bdMainSite #innerContent [style*="font-size"],
html #bdMainSite .mcontent [style*="font-size"] { font-size: inherit !important; }
