/* =========================================================
   MasterPalm Patch 281 — Storefront button contrast guard

   Purpose:
   - Dark red and black buttons always use white text/icons.
   - Light and outline buttons always use dark/red readable text.
   - The category OEM/support CTA copy is explicitly white.
   - CTA buttons use contrasting black and white treatments rather
     than placing a red button on the red CTA background.

   Scope: public MasterPalm storefront only.
========================================================= */

/* Red/dark action controls: force readable white content in every state. */
body.site-masterpalm :where(
  .mp-shop-online,
  .mp-request-quote,
  .mp-btn-red,
  .mp-btn-primary,
  .mp-cta-actions a,
  .mp-news-card b,
  .btn-primary,
  .btn-danger,
  .btn-dark,
  .mp-btn-black,
  .mp-search-box button,
  .mp-inline-search button,
  .mp-rfq-btn,
  .mp-order-online-btn,
  .mp-product-list-actions a:last-child
),
body.masterpalm-theme :where(
  .mp-shop-online,
  .mp-request-quote,
  .mp-btn-red,
  .mp-btn-primary,
  .mp-cta-actions a,
  .mp-news-card b,
  .btn-primary,
  .btn-danger,
  .btn-dark,
  .mp-btn-black,
  .mp-search-box button,
  .mp-inline-search button,
  .mp-rfq-btn,
  .mp-order-online-btn,
  .mp-product-list-actions a:last-child
) {
  color: #ffffff !important;
  text-shadow: none !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.site-masterpalm :where(
  .mp-shop-online,
  .mp-request-quote,
  .mp-btn-red,
  .mp-btn-primary,
  .mp-cta-actions a,
  .mp-news-card b,
  .btn-primary,
  .btn-danger,
  .btn-dark,
  .mp-btn-black,
  .mp-search-box button,
  .mp-inline-search button,
  .mp-rfq-btn,
  .mp-order-online-btn,
  .mp-product-list-actions a:last-child
) :where(span, strong, b, em, small, i),
body.masterpalm-theme :where(
  .mp-shop-online,
  .mp-request-quote,
  .mp-btn-red,
  .mp-btn-primary,
  .mp-cta-actions a,
  .mp-news-card b,
  .btn-primary,
  .btn-danger,
  .btn-dark,
  .mp-btn-black,
  .mp-search-box button,
  .mp-inline-search button,
  .mp-rfq-btn,
  .mp-order-online-btn,
  .mp-product-list-actions a:last-child
) :where(span, strong, b, em, small, i) {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
}

body.site-masterpalm :where(
  a.mp-shop-online,
  a.mp-request-quote,
  a.mp-btn-red,
  a.mp-btn-primary,
  .mp-cta-actions a,
  a.btn-primary,
  a.btn-danger,
  a.btn-dark,
  a.mp-btn-black,
  a.mp-rfq-btn,
  a.mp-order-online-btn,
  .mp-product-list-actions a:last-child
):is(:link, :visited, :hover, :focus, :active),
body.masterpalm-theme :where(
  a.mp-shop-online,
  a.mp-request-quote,
  a.mp-btn-red,
  a.mp-btn-primary,
  .mp-cta-actions a,
  a.btn-primary,
  a.btn-danger,
  a.btn-dark,
  a.mp-btn-black,
  a.mp-rfq-btn,
  a.mp-order-online-btn,
  .mp-product-list-actions a:last-child
):is(:link, :visited, :hover, :focus, :active) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Light/outline controls must retain dark, readable text. */
body.site-masterpalm :where(
  .mp-btn-light,
  .btn-light,
  .mp-btn-outline,
  .btn-outline-secondary
),
body.masterpalm-theme :where(
  .mp-btn-light,
  .btn-light,
  .mp-btn-outline,
  .btn-outline-secondary
) {
  color: #20262d !important;
  -webkit-text-fill-color: #20262d !important;
}

body.site-masterpalm :where(
  .btn-outline-primary,
  .btn-outline-danger
),
body.masterpalm-theme :where(
  .btn-outline-primary,
  .btn-outline-danger
) {
  color: #B8001F !important;
  -webkit-text-fill-color: #B8001F !important;
}

body.site-masterpalm :where(
  .mp-btn-outline,
  .btn-outline-primary,
  .btn-outline-danger,
  .btn-outline-secondary
):is(:hover, :focus, :active),
body.masterpalm-theme :where(
  .mp-btn-outline,
  .btn-outline-primary,
  .btn-outline-danger,
  .btn-outline-secondary
):is(:hover, :focus, :active) {
  background-color: #B8001F !important;
  border-color: #B8001F !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* OEM/support CTA copy: never inherit grey, red, or low-contrast text. */
body.site-masterpalm #site-main .mp-cta-band .mp-cta-inner > div:first-child > :where(strong, span, p, h1, h2, h3),
body.masterpalm-theme #site-main .mp-cta-band .mp-cta-inner > div:first-child > :where(strong, span, p, h1, h2, h3),
body.site-masterpalm #site-main .ses-cta-band :where(h1, h2, h3, p, strong, span),
body.masterpalm-theme #site-main .ses-cta-band :where(h1, h2, h3, p, strong, span) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: none !important;
}

/* Red CTA band: black primary action and white secondary action. */
body.site-masterpalm #site-main .mp-cta-band .mp-cta-actions a:first-child,
body.masterpalm-theme #site-main .mp-cta-band .mp-cta-actions a:first-child {
  background: #111111 !important;
  border-color: #111111 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  box-shadow: none !important;
}

body.site-masterpalm #site-main .mp-cta-band .mp-cta-actions a:not(:first-child),
body.masterpalm-theme #site-main .mp-cta-band .mp-cta-actions a:not(:first-child) {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #20262d !important;
  -webkit-text-fill-color: #20262d !important;
  box-shadow: none !important;
}

body.site-masterpalm #site-main .mp-cta-band .mp-cta-actions a:first-child :where(span, strong, b, i),
body.masterpalm-theme #site-main .mp-cta-band .mp-cta-actions a:first-child :where(span, strong, b, i) {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.site-masterpalm #site-main .mp-cta-band .mp-cta-actions a:not(:first-child) :where(span, strong, b, i),
body.masterpalm-theme #site-main .mp-cta-band .mp-cta-actions a:not(:first-child) :where(span, strong, b, i) {
  color: #20262d !important;
  -webkit-text-fill-color: #20262d !important;
}

body.site-masterpalm #site-main .mp-cta-band .mp-cta-actions a:first-child:hover,
body.site-masterpalm #site-main .mp-cta-band .mp-cta-actions a:first-child:focus,
body.masterpalm-theme #site-main .mp-cta-band .mp-cta-actions a:first-child:hover,
body.masterpalm-theme #site-main .mp-cta-band .mp-cta-actions a:first-child:focus {
  background: #000000 !important;
  border-color: #000000 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

body.site-masterpalm #site-main .mp-cta-band .mp-cta-actions a:not(:first-child):hover,
body.site-masterpalm #site-main .mp-cta-band .mp-cta-actions a:not(:first-child):focus,
body.masterpalm-theme #site-main .mp-cta-band .mp-cta-actions a:not(:first-child):hover,
body.masterpalm-theme #site-main .mp-cta-band .mp-cta-actions a:not(:first-child):focus {
  background: #f1f3f5 !important;
  border-color: #f1f3f5 !important;
  color: #111111 !important;
  -webkit-text-fill-color: #111111 !important;
}
