/* Surface-specific colors, including visited links and interactive states.
 * Keep the existing geometry. Light inputs and secondary controls remain light.
 */
body.mgs-site :is(
  .mgs-header .mgs-wordmark,
  .mgs-header .mgs-contact-block a,
  .mgs-header .mgs-finder-trigger a,
  .mgs-header .mgs-finder-mobile,
  .mgs-request-intro h3 a,
  .mgs-quote-hero-copy h3 a
),
body.mgs-site :is(
  .mgs-header .mgs-wordmark,
  .mgs-header .mgs-contact-block a,
  .mgs-header .mgs-finder-trigger a,
  .mgs-header .mgs-finder-mobile,
  .mgs-request-intro h3 a,
  .mgs-quote-hero-copy h3 a
):is(:visited, :hover, :focus, :active) {
  color:#fff!important;
}
body.mgs-site :is(.mgs-request-intro h3 a, .mgs-quote-hero-copy h3 a):is(:hover, :focus-visible) {
  text-decoration:underline;
  text-underline-offset:3px;
}
body.mgs-site :is(.mgs-header, .mgs-footer, .mgs-request-intro) a:focus-visible {
  outline-color:#fff;
}
body.mgs-site .mgs-header :is(.mgs-quick-links, .mgs-mobile-contact-bar, .mgs-search-results) a:focus-visible {
  outline-color:var(--mgs-blue);
}

/* Filled actions retain white text and icons in every link state. */
body.mgs-site :is(.mgs-main .buttonyellow, .wp-block-search__button),
body.mgs-site :is(.mgs-main .buttonyellow, .wp-block-search__button):is(:visited, :hover, :focus, :active) {
  color:#fff!important;
}
body.mgs-site :is(.mgs-main .buttonyellow, .wp-block-search__button) :is(.txt-black, .txt-gray, .mgs-icon),
body.mgs-site .mgs-main .buttonyellow.dropdown-toggle::after {
  color:inherit!important;
}

/* Product tabs: both the label and icon use the same foreground. */
body.mgs-site .mgs-single-product .mgs-product-tabs [role=tab]:is(:hover, :focus-visible, [aria-selected=true]) {
  background:var(--mgs-blue)!important;
  color:#fff!important;
}
body.mgs-site .mgs-single-product .mgs-product-tabs [role=tab]:is(:hover, :focus-visible, [aria-selected=true]) :is(span, .mgs-icon) {
  color:#fff!important;
}

/* Neutral controls highlight with a light blue surface, never blue on blue. */
body.mgs-site :is(
  .mgs-finder-close, .mgs-finder-back, .mgs-finder-restart, .mgs-finder-crumb,
  .mgs-finder-bottom-nav button, .mgs-finder-detail-toolbar button,
  .mgs-quantity button, .mgs-manual-line button, .mgs-quote-line button,
  .mgs-submenu-toggle
):not(:disabled):is(:hover, :focus-visible) {
  background:#e6eefc!important;
  color:var(--mgs-blue)!important;
}

/* WooCommerce notices are blue surfaces; field controls are white surfaces. */
body.mgs-site :is(.woocommerce-info, .woocommerce-message) {
  background:var(--mgs-blue)!important;
  color:#fff!important;
}
body.mgs-site .woocommerce-error {
  background:#b42318!important;
  color:#fff!important;
}
body.mgs-site :is(.woocommerce-info, .woocommerce-message, .woocommerce-error)::before,
body.mgs-site :is(.woocommerce-info, .woocommerce-message, .woocommerce-error) :is(a, a:visited, a:hover, a:focus, a:active, strong, span) {
  color:#fff!important;
}
/* These notices must not depend on an unavailable icon font. */
body.mgs-site :is(.woocommerce-info, .woocommerce-message, .woocommerce-error)::before {
  font-family:Arial,sans-serif!important;
  font-weight:700;
  line-height:1!important;
}
body.mgs-site .woocommerce-info::before { content:"i"; }
body.mgs-site .woocommerce-message::before { content:"\2713"; }
body.mgs-site .woocommerce-error::before { content:"!"; }
body.mgs-site :is(.woocommerce-info, .woocommerce-message, .woocommerce-error) a {
  text-decoration:underline;
  text-underline-offset:3px;
  opacity:1;
}
body.mgs-site :is(.woocommerce-info, .woocommerce-message, .woocommerce-error) a:focus-visible { outline-color:#fff; }
body.mgs-site :is(.woocommerce-noreviews, p.no-comments) {
  background:#e6eefc;
  color:var(--mgs-blue);
}
body.mgs-site :is(.woocommerce-noreviews, p.no-comments)::before,
body.mgs-site :is(.woocommerce-noreviews, p.no-comments) a,
body.mgs-site :is(.woocommerce-noreviews, p.no-comments) a:is(:visited, :hover, :focus) {
  color:var(--mgs-blue);
  opacity:1;
}
body.mgs-site .woocommerce-input-wrapper select,
body.mgs-site .woocommerce-input-wrapper select:is(:hover, :focus, :active) {
  background:#fff!important;
  background-image:none!important;
  color:#222!important;
}
