/* NursingRidge — legacy bridge
   Loaded LAST (weight 90) so it can correct the 134 module stylesheets
   and 41 inline <style> blocks that pre-date this theme.

   Everything here is a targeted fix, not a reset. Each rule exists
   because a real module was doing something the theme has to survive.
   Delete a rule once its module has been cleaned up. */

/* 1. Module pages that assume a Bootstrap container get our gutters. */
.region-content > .container,
.region-content > .container-fluid { max-width: var(--nr-max); padding: 0 var(--nr-gutter); }

/* 2. Bootstrap button classes still used inside module twig. */
.btn-primary { background: var(--nr-navy-900); border-color: var(--nr-navy-900); color: var(--nr-white); }
.btn-primary:hover { background: var(--nr-navy-800); border-color: var(--nr-navy-800); }
.btn-secondary { background: var(--nr-teal-700); border-color: var(--nr-teal-700); color: var(--nr-white); }
.btn-outline-primary { color: var(--nr-navy-900); border-color: var(--nr-navy-900); }
.btn-outline-primary:hover { background: var(--nr-navy-900); color: var(--nr-white); }

/* 3. Bright teal as TEXT fails contrast. Module CSS uses var(--teal) for
      links; the token file already keeps that alias text-safe, but some
      modules hardcode the old hex. Catch the known ones. */
[style*="color:#2b8585"], [style*="color: #2b8585"],
[style*="color:#0FA79D"], [style*="color: #0fa79d"] { color: var(--nr-teal-700) !important; }

/* 4. Old warm ivory backgrounds hardcoded in inline styles → cool paper. */
[style*="background:#f7f3e9"], [style*="background: #f7f3e9"],
[style*="background:#fcfaf5"], [style*="background: #fcfaf5"] { background: var(--nr-paper) !important; }

/* 5. Low-alpha text was the single biggest contrast failure in the old
      system. Any rgba white text on a light ground gets rescued. */
.nr-sec--paper [style*="rgba(255,255,255"],
.nr-sec--white [style*="rgba(255,255,255"] { color: var(--nr-muted) !important; }

/* 6. Module section wrappers get the theme's rhythm. */
.nr-section, .nr-page-section, [class*="nr-section-"] { padding: clamp(48px, 6vw, 96px) 0; }

/* 7. Intelligence and directory gate pages ship their own <style>; make sure
      their body copy is at least readable on our ground. */
[class*="-gate"] p, [class*="_gate"] p { color: var(--nr-ink); }

/* 8. Tables inside module pages. */
.region-content table { background: var(--nr-white); }
.region-content thead th { background: var(--nr-navy-900); color: var(--nr-on-navy); border-bottom: 0; }

/* 9. Kill the Bootstrap navbar if any module still prints one — the theme
      owns the header now. */
body .navbar.bs-navbar-legacy { display: none; }
