/* =====================================================================
   ATLANTA CANCER CARE — LEGACY BRIDGE
   File:   salient-child/css/acc/acc-legacy-bridge.css
   Needs:  acc-tokens.css
   Loads:  on every page when acc-config.php features → legacy_bridge is true.

   WHY THIS FILE EXISTS
   Most pages are still built in WPBakery and styled by Salient's
   Theme Options → Custom CSS box (copy in documentation/reference/).
   That CSS is written against --acc-* tokens, so acc-tokens.css (loaded
   later) already moves it to Frank Ruhl Libre + Roboto and the brand
   colors. This file handles what the tokens alone can't:

     1. Gold (#C7A96B) is not a brand color. Re-point it per use.
     2. Font weights 600 are not loaded for the brand fonts; map to 500/700.
     3. The existing .acc-btn / .acc-btn-outline in WPBakery content:
        keep the look, use the brand red for the primary.
     4. Legacy custom.css fonts (Muli, Myriad, Garamond, Open Sans) in
        content areas.

   It does NOT delete anything. When the Custom CSS box is cleaned up
   (DEPLOYMENT-GUIDE, "Fonts and Custom CSS"), this file keeps working.
   ===================================================================== */


/* ---------------------------------------------------------------------
   1. Gold → brand
   Gold was used three ways; each gets the brand color that keeps its
   contrast:
     text or icons on dark green  → sage pale  (#BFD2C4, 9.6:1 on #16291F)
     fills behind dark-green text → sage pale  (forest on it: 9.6:1)
     thin underlines on cream     → brand green
     small labels on white        → green ink  (5.9:1)
   --------------------------------------------------------------------- */
body.acc-ds {
	--acc-gold:      var(--acc-sage-pale);
	--acc-gold-deep: var(--acc-green-ink);
}
/* Underlines on cream: pale sage is too faint there */
body.acc-ds.page-id-23 .content-inner a,
body.acc-ds #post-13597 .content-inner p a:not([href^="#"]),
body.acc-ds .section-page-links .first-level span.link-underline-blue a,
body.acc-ds .acc-forms__help a {
	border-bottom-color: var(--acc-green) !important;
}
body.acc-ds .acc-forms__help { border-left-color: var(--acc-green) !important; }
/* Slider button hover: dark-green text needs a light fill */
body.acc-ds .nectar-slider-wrap .swiper-slide .button a.extra-color-2:hover {
	background-color: var(--acc-cream) !important;
	border-color: var(--acc-cream) !important;
}
/* Patient Forms featured packet icon: the gold is baked into the SVG */
body.acc-ds .acc-forms a.acc-forms__featured::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23BFD2C4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h4'/%3E%3C/svg%3E") !important;
}


/* Gold typed straight into WPBakery content (inline styles), e.g. the
   "Did you know?" box on Lung Cancer */
body.acc-ds :is(strong, b, span, em, a)[style*="C7A96B" i] { color: var(--acc-sage-pale) !important; }
body.acc-ds div[style*="solid #C7A96B" i] { border-left-color: var(--acc-green) !important; }


/* ---------------------------------------------------------------------
   2. Weights
   The Custom CSS sets headings and menus to 600. Frank Ruhl Libre and
   Roboto are loaded at 400/500/700; a 600 request would be faked by the
   browser (smeared bold). 500 is the editorial heading weight.
   --------------------------------------------------------------------- */
/* :where() keeps this at (0,1,1) so component classes in the new templates still win */
body.acc-ds :where(h1, h2, h3, h4, h5, h6, .section-title, .page-title) {
	font-family: var(--acc-font-head) !important;
	font-weight: var(--acc-fw-medium) !important;
}
body.acc-ds header#top nav[aria-label="Main Menu"] a,
body.acc-ds header#top nav[aria-label="Main Menu"] .menu-title-text {
	font-weight: var(--acc-fw-medium) !important;
}
body.acc-ds .acc-forms h2,
body.acc-ds .acc-forms__num,
body.acc-ds .acc-forms__featured .acc-forms__title {
	font-weight: var(--acc-fw-medium) !important;
}
/* Headings inside WPBakery content: keep tight line height at the new face */
body.acc-ds .main-content :where(h1, h2, h3) { line-height: var(--acc-lh-snug); }
/* The Custom CSS sets list line-height to 32px everywhere; in the new
   templates lists follow .acc-prose instead. */
body.acc-ds .acc :is(ul, ol) { line-height: inherit; }


/* ---------------------------------------------------------------------
   3. Buttons already placed in WPBakery content
   (a.acc-btn / a.acc-btn-outline, e.g. the homepage hero). Same shape,
   primary now in the brand red. acc-base.css styles the new .acc-btn;
   these rules only cover old markup outside .acc templates.
   --------------------------------------------------------------------- */
body.acc-ds .main-content a.acc-btn,
body.acc-ds .main-content .acc-btn a {
	background: var(--acc-red) !important;
	border-color: var(--acc-red) !important;
	color: #fff !important;
	font-family: var(--acc-font-body) !important;
	font-weight: var(--acc-fw-bold) !important;
}
body.acc-ds .main-content a.acc-btn:hover,
body.acc-ds .main-content .acc-btn a:hover {
	background: var(--acc-red-deep) !important;
	border-color: var(--acc-red-deep) !important;
}
body.acc-ds .main-content a.acc-btn-outline,
body.acc-ds .main-content .acc-btn-outline a {
	font-family: var(--acc-font-body) !important;
	font-weight: var(--acc-fw-bold) !important;
	color: var(--acc-heading) !important;
	border-color: var(--acc-dark-green) !important;
}
body.acc-ds .main-content :is(a.acc-btn, a.acc-btn-outline):focus-visible {
	outline: 3px solid var(--acc-focus) !important;
	outline-offset: 3px !important;
}
/* Homepage hero: the green span in "Small practice feel." is inline
   #008000, not a brand color. */
body.acc-ds .hero-copy h1 span[style*="#008000"],
body.acc-ds .hero-copy h1 span[style*="008000"] {
	color: var(--acc-green) !important;
}


/* ---------------------------------------------------------------------
   4. Legacy fonts in content
   custom.css (264 KB, child theme) sets Muli / Myriad Pro / Garamond /
   Open Sans on some old widgets. The Custom CSS box already forces the
   body font on p, li, a; these catch the remaining containers.
   --------------------------------------------------------------------- */
body.acc-ds :is(.physician-search-widget, .physician-search-widget-title, .locations-grid-container, #physicians-section, .section-page-links, .template-top, .blog-recent, .post-content, .testimonial_slider, .nectar-milestone) {
	font-family: var(--acc-font-body) !important;
}
body.acc-ds :is(.physician-name, .locations-grid-container .location-item h3, .section-page-links .section-title, .physician-search-widget-title, .nectar-milestone .number) {
	font-family: var(--acc-font-head) !important;
}


/* ---------------------------------------------------------------------
   5. Links everywhere: visible focus, readable underline
   --------------------------------------------------------------------- */
body.acc-ds .main-content a:focus-visible,
body.acc-ds #footer-outer a:focus-visible {
	outline: 3px solid var(--acc-focus);
	outline-offset: 2px;
}
body.acc-ds #footer-outer a:focus-visible { outline-color: var(--acc-focus-on-dark); }
