/* =========================================================
   MasterPalm Patch 282 — Light/dark surface text contrast

   Loaded after Patch 281. This file fixes inherited text rules
   that could place pale gray or dark text on the wrong surface,
   especially on the redesigned /contact and /request-quote pages.
========================================================= */

/* ---------------------------------------------------------
   Shared light surfaces
   --------------------------------------------------------- */
body.site-masterpalm #site-main :where(.alert-info, .alert-light),
body.masterpalm-theme #site-main :where(.alert-info, .alert-light) {
  background-color: #f3f6f8 !important;
  border-color: #cfd8df !important;
  color: #26323c !important;
  -webkit-text-fill-color: #26323c !important;
}

body.site-masterpalm #site-main :where(.alert-info, .alert-light) :where(h1, h2, h3, h4, h5, h6, p, span, small, strong, em, li, a),
body.masterpalm-theme #site-main :where(.alert-info, .alert-light) :where(h1, h2, h3, h4, h5, h6, p, span, small, strong, em, li, a) {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

body.site-masterpalm #site-main :where(.bg-white, .bg-light, .mp-light-surface, .ses-light-surface),
body.masterpalm-theme #site-main :where(.bg-white, .bg-light, .mp-light-surface, .ses-light-surface) {
  color: #26323c !important;
}

body.site-masterpalm #site-main :where(.bg-white, .bg-light, .mp-light-surface, .ses-light-surface) :where(h1, h2, h3, h4, h5, h6),
body.masterpalm-theme #site-main :where(.bg-white, .bg-light, .mp-light-surface, .ses-light-surface) :where(h1, h2, h3, h4, h5, h6) {
  color: #111820 !important;
  -webkit-text-fill-color: #111820 !important;
}

body.site-masterpalm #site-main :where(.bg-white, .bg-light, .mp-light-surface, .ses-light-surface) :where(p, li, small, .small, .text-muted),
body.masterpalm-theme #site-main :where(.bg-white, .bg-light, .mp-light-surface, .ses-light-surface) :where(p, li, small, .small, .text-muted) {
  color: #4d5b66 !important;
  -webkit-text-fill-color: #4d5b66 !important;
}

/* ---------------------------------------------------------
   Redesigned MasterPalm contact/RFQ page

   Older cumulative CSS used !important on the direct contact
   section, headings, paragraphs and form controls. These rules
   restore the intended dark industrial surfaces and readable
   light text with greater specificity and a later cascade.
   --------------------------------------------------------- */
body.site-masterpalm.mp-contact-page #site-main > section.mp-industrial-contact,
body.masterpalm-theme.mp-contact-page #site-main > section.mp-industrial-contact {
  background:
    radial-gradient(circle at 12% 8%, rgba(184, 0, 31, .16), transparent 30%),
    linear-gradient(180deg, #0b0e11 0%, #14181d 46%, #0b0e11 100%) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: initial;
}

body.site-masterpalm.mp-contact-page #site-main .mp-contact-hero,
body.masterpalm-theme.mp-contact-page #site-main .mp-contact-hero {
  color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-contact-workspace,
body.masterpalm-theme.mp-contact-page #site-main .mp-contact-workspace {
  background: linear-gradient(180deg, #0b0e11 0%, #101419 58%, #0b0e11 100%) !important;
  color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-industrial-contact :where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6),
body.masterpalm-theme.mp-contact-page #site-main .mp-industrial-contact :where(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-industrial-contact .mp-contact-title span,
body.masterpalm-theme.mp-contact-page #site-main .mp-industrial-contact .mp-contact-title span {
  color: #B8001F !important;
  -webkit-text-fill-color: #B8001F !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-industrial-contact :where(p, li, .small, small, .text-muted),
body.masterpalm-theme.mp-contact-page #site-main .mp-industrial-contact :where(p, li, .small, small, .text-muted) {
  color: #c7d0d8 !important;
  -webkit-text-fill-color: #c7d0d8 !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-contact-breadcrumb,
body.site-masterpalm.mp-contact-page #site-main .mp-contact-breadcrumb a,
body.masterpalm-theme.mp-contact-page #site-main .mp-contact-breadcrumb,
body.masterpalm-theme.mp-contact-page #site-main .mp-contact-breadcrumb a {
  color: #e4e9ed !important;
  -webkit-text-fill-color: #e4e9ed !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-contact-lead,
body.masterpalm-theme.mp-contact-page #site-main .mp-contact-lead {
  color: #d7dee4 !important;
  -webkit-text-fill-color: #d7dee4 !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-response-card,
body.masterpalm-theme.mp-contact-page #site-main .mp-response-card {
  background: linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.035)) !important;
  color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-response-card strong,
body.masterpalm-theme.mp-contact-page #site-main .mp-response-card strong {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-response-card span,
body.masterpalm-theme.mp-contact-page #site-main .mp-response-card span {
  color: #c6d0d8 !important;
  -webkit-text-fill-color: #c6d0d8 !important;
}

body.site-masterpalm.mp-contact-page #site-main :where(.mp-branch-console, .mp-inquiry-console),
body.masterpalm-theme.mp-contact-page #site-main :where(.mp-branch-console, .mp-inquiry-console) {
  background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.025)) !important;
  border-color: rgba(255,255,255,.16) !important;
  color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-console-head :where(h2, span),
body.masterpalm-theme.mp-contact-page #site-main .mp-console-head :where(h2, span) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-console-head span,
body.masterpalm-theme.mp-contact-page #site-main .mp-console-head span,
body.site-masterpalm.mp-contact-page #site-main .mp-office-group-title,
body.masterpalm-theme.mp-contact-page #site-main .mp-office-group-title,
body.site-masterpalm.mp-contact-page #site-main .mp-rfq-kicker,
body.masterpalm-theme.mp-contact-page #site-main .mp-rfq-kicker {
  color: #B8001F !important;
  -webkit-text-fill-color: #B8001F !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-branch-card,
body.masterpalm-theme.mp-contact-page #site-main .mp-branch-card {
  background: #10161b !important;
  border-color: rgba(255,255,255,.16) !important;
  color: #d8e0e6 !important;
  -webkit-text-fill-color: initial;
}

body.site-masterpalm.mp-contact-page #site-main .mp-branch-card :where(h3, strong),
body.masterpalm-theme.mp-contact-page #site-main .mp-branch-card :where(h3, strong) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-branch-card :where(p, .mp-branch-lines, span),
body.masterpalm-theme.mp-contact-page #site-main .mp-branch-card :where(p, .mp-branch-lines, span) {
  color: #c2ccd4 !important;
  -webkit-text-fill-color: #c2ccd4 !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-branch-card:is(.is-active, .active),
body.masterpalm-theme.mp-contact-page #site-main .mp-branch-card:is(.is-active, .active) {
  background: linear-gradient(135deg, #B8001F, #B8001F) !important;
  border-color: rgba(255,255,255,.34) !important;
  color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-branch-card:is(.is-active, .active) :where(h3, p, span, strong, .mp-branch-lines),
body.masterpalm-theme.mp-contact-page #site-main .mp-branch-card:is(.is-active, .active) :where(h3, p, span, strong, .mp-branch-lines) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-map-plate,
body.masterpalm-theme.mp-contact-page #site-main .mp-map-plate {
  background: linear-gradient(135deg, #222a32, #0d1115) !important;
  color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-map-plate :where(.mp-map-plate__head, strong),
body.masterpalm-theme.mp-contact-page #site-main .mp-map-plate :where(.mp-map-plate__head, strong) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-map-selected,
body.masterpalm-theme.mp-contact-page #site-main .mp-map-selected {
  color: #c7d0d8 !important;
  -webkit-text-fill-color: #c7d0d8 !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-field label,
body.masterpalm-theme.mp-contact-page #site-main .mp-field label {
  color: #d1d9df !important;
  -webkit-text-fill-color: #d1d9df !important;
}

body.site-masterpalm.mp-contact-page #site-main :where(
  .mp-field input,
  .mp-field textarea,
  .mp-field select,
  .mp-inquiry-console .form-control,
  .mp-inquiry-console .form-select
),
body.masterpalm-theme.mp-contact-page #site-main :where(
  .mp-field input,
  .mp-field textarea,
  .mp-field select,
  .mp-inquiry-console .form-control,
  .mp-inquiry-console .form-select
) {
  background: #0c1014 !important;
  border-color: rgba(255,255,255,.20) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}

body.site-masterpalm.mp-contact-page #site-main :where(
  .mp-field input,
  .mp-field textarea,
  .mp-field select,
  .mp-inquiry-console .form-control,
  .mp-inquiry-console .form-select
):focus,
body.masterpalm-theme.mp-contact-page #site-main :where(
  .mp-field input,
  .mp-field textarea,
  .mp-field select,
  .mp-inquiry-console .form-control,
  .mp-inquiry-console .form-select
):focus {
  background: #12191f !important;
  border-color: #B8001F !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main :where(.mp-field input, .mp-inquiry-console .form-control)[readonly],
body.masterpalm-theme.mp-contact-page #site-main :where(.mp-field input, .mp-inquiry-console .form-control)[readonly] {
  background: #171d23 !important;
  color: #f0f3f5 !important;
  -webkit-text-fill-color: #f0f3f5 !important;
  opacity: 1 !important;
}

body.site-masterpalm.mp-contact-page #site-main :where(.mp-field input, .mp-field textarea, .mp-inquiry-console .form-control)::placeholder,
body.masterpalm-theme.mp-contact-page #site-main :where(.mp-field input, .mp-field textarea, .mp-inquiry-console .form-control)::placeholder {
  color: #a8b3bc !important;
  -webkit-text-fill-color: #a8b3bc !important;
  opacity: 1 !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-route-note,
body.masterpalm-theme.mp-contact-page #site-main .mp-route-note {
  color: #c8d1d8 !important;
  -webkit-text-fill-color: #c8d1d8 !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-contact-feature,
body.masterpalm-theme.mp-contact-page #site-main .mp-contact-feature {
  background: #12171c !important;
  color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-contact-feature strong,
body.masterpalm-theme.mp-contact-page #site-main .mp-contact-feature strong {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .mp-contact-feature span,
body.masterpalm-theme.mp-contact-page #site-main .mp-contact-feature span {
  color: #c1cbd3 !important;
  -webkit-text-fill-color: #c1cbd3 !important;
}

/* Legacy contact markup remains readable if an older cached view is served. */
body.site-masterpalm.mp-contact-page #site-main :where(.ses-panel, .card.ses-card, .ses-card, .ses-mapbox) {
  background: #ffffff !important;
  border-color: #d4dce2 !important;
  color: #26323c !important;
}

body.site-masterpalm.mp-contact-page #site-main :where(.ses-panel, .card.ses-card, .ses-card, .ses-mapbox) :where(h1, h2, h3, h4, h5, h6, .form-label, strong) {
  color: #151c23 !important;
  -webkit-text-fill-color: #151c23 !important;
}

body.site-masterpalm.mp-contact-page #site-main :where(.ses-panel, .card.ses-card, .ses-card, .ses-mapbox) :where(p, li, .small, small, .text-muted) {
  color: #4f5e69 !important;
  -webkit-text-fill-color: #4f5e69 !important;
}

body.site-masterpalm.mp-contact-page #site-main .ses-office-list .list-group-item,
body.site-masterpalm.mp-contact-page #site-main .list-group-item.ses-office {
  background: #111820 !important;
  border-color: #35414b !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .ses-office-list .list-group-item :where(h1, h2, h3, h4, h5, h6, p, span, small, strong, .small, .text-muted),
body.site-masterpalm.mp-contact-page #site-main .list-group-item.ses-office :where(h1, h2, h3, h4, h5, h6, p, span, small, strong, .small, .text-muted) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .ses-office.active,
body.site-masterpalm.mp-contact-page #site-main .list-group-item.ses-office.active {
  background: linear-gradient(135deg, #B8001F, #B8001F) !important;
  border-color: #B8001F !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.site-masterpalm.mp-contact-page #site-main .form-control[readonly] {
  background: #eef2f5 !important;
  color: #26323c !important;
  -webkit-text-fill-color: #26323c !important;
  opacity: 1 !important;
}

body.site-masterpalm.mp-contact-page #site-main .form-control:focus,
body.site-masterpalm.mp-contact-page #site-main .form-select:focus {
  background: #ffffff !important;
  color: #1f2933 !important;
  -webkit-text-fill-color: #1f2933 !important;
}

/* ---------------------------------------------------------
   Pure-white footer and accessible location tabs

   The native light-footer rules use a pale red active tab with
   red text. Keep the footer white, but use a solid MasterPalm
   red active state with white copy so the active location is
   unmistakable and readable.
   --------------------------------------------------------- */
body.site-masterpalm footer.mp-industrial-footer.mp-footer-light,
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light,
body.site-masterpalm footer.mp-industrial-footer.mp-footer-light[data-bg-type="image"],
body.site-masterpalm footer.mp-industrial-footer.mp-footer-light[data-bg-type="video"],
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light[data-bg-type="image"],
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light[data-bg-type="video"] {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  color: #26323c !important;
  border-top-color: #d5dde3 !important;
}

body.site-masterpalm footer.mp-industrial-footer.mp-footer-light::before,
body.site-masterpalm footer.mp-industrial-footer.mp-footer-light::after,
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light::before,
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

body.site-masterpalm footer.mp-industrial-footer.mp-footer-light :where(
  .container,
  .container-fluid,
  .container-xxl,
  .mp-footer-inner,
  .mp-footer-primary,
  .mp-footer-locations,
  .mp-footer-location-panels,
  .mp-footer-location-panel,
  .mp-footer-rfq-row,
  .mp-footer-rfq,
  .mp-footer-credentials-row,
  .mp-footer-credential-panel,
  .mp-footer-policy-row,
  .mp-footer-bottom
),
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light :where(
  .container,
  .container-fluid,
  .container-xxl,
  .mp-footer-inner,
  .mp-footer-primary,
  .mp-footer-locations,
  .mp-footer-location-panels,
  .mp-footer-location-panel,
  .mp-footer-rfq-row,
  .mp-footer-rfq,
  .mp-footer-credentials-row,
  .mp-footer-credential-panel,
  .mp-footer-policy-row,
  .mp-footer-bottom
) {
  background-color: #ffffff !important;
  background-image: none !important;
}

body.site-masterpalm footer.mp-industrial-footer.mp-footer-light :where(h1, h2, h3, h4, h5, h6, strong, .mp-footer-policy-title),
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light :where(h1, h2, h3, h4, h5, h6, strong, .mp-footer-policy-title) {
  color: #111820 !important;
  -webkit-text-fill-color: #111820 !important;
}

body.site-masterpalm footer.mp-industrial-footer.mp-footer-light :where(p, li, address, .mp-footer-copy, .mp-footer-copyright, .mp-footer-location-panel span),
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light :where(p, li, address, .mp-footer-copy, .mp-footer-copyright, .mp-footer-location-panel span) {
  color: #4d5b66 !important;
  -webkit-text-fill-color: #4d5b66 !important;
}

body.site-masterpalm footer.mp-industrial-footer.mp-footer-light a:not(.mp-btn),
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light a:not(.mp-btn) {
  color: #26323c !important;
  -webkit-text-fill-color: #26323c !important;
}

body.site-masterpalm footer.mp-industrial-footer.mp-footer-light a:not(.mp-btn):hover,
body.site-masterpalm footer.mp-industrial-footer.mp-footer-light a:not(.mp-btn):focus,
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light a:not(.mp-btn):hover,
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light a:not(.mp-btn):focus {
  color: #B8001F !important;
  -webkit-text-fill-color: #B8001F !important;
}

body.site-masterpalm footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button,
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button {
  background: #ffffff !important;
  background-image: none !important;
  border: 1px solid #b8c2ca !important;
  color: #26323c !important;
  -webkit-text-fill-color: #26323c !important;
  opacity: 1 !important;
}

body.site-masterpalm footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button:not(.is-active):hover,
body.site-masterpalm footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button:not(.is-active):focus,
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button:not(.is-active):hover,
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button:not(.is-active):focus {
  background: #f1f4f6 !important;
  border-color: #7a8791 !important;
  color: #111820 !important;
  -webkit-text-fill-color: #111820 !important;
  outline: 2px solid transparent;
  outline-offset: 2px;
}

body.site-masterpalm footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button.is-active,
body.site-masterpalm footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button[aria-selected="true"],
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button.is-active,
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button[aria-selected="true"] {
  background: #B8001F !important;
  background-image: none !important;
  border-color: #B8001F !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.20) !important;
}

body.site-masterpalm footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button.is-active *,
body.site-masterpalm footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button[aria-selected="true"] *,
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button.is-active *,
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button[aria-selected="true"] * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  fill: currentColor !important;
}

body.site-masterpalm footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button.is-active:hover,
body.site-masterpalm footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button.is-active:focus,
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button.is-active:hover,
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light .mp-footer-location-tabs button.is-active:focus {
  background: #B8001F !important;
  border-color: #B8001F !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.site-masterpalm footer.mp-industrial-footer.mp-footer-light .mp-footer-rfq .mp-btn-primary,
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light .mp-footer-rfq .mp-btn-primary {
  background: #B8001F !important;
  border-color: #B8001F !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.site-masterpalm footer.mp-industrial-footer.mp-footer-light .mp-footer-rfq .mp-btn-primary *,
body.masterpalm-theme footer.mp-industrial-footer.mp-footer-light .mp-footer-rfq .mp-btn-primary * {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
