/* The business plugin's fixed rule is not an error or an eligibility status. */
body.mfa-production-cart-view #mfa-native-cart .maxforall-order-minimum,
body.mfa-production-checkout-view #mfa-native-checkout .maxforall-order-minimum {
  margin: 0 0 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 400 12px/1.65 var(--mfa-font-ui);
  overflow-wrap: anywhere;
}
body.mfa-production-cart-view #mfa-native-cart .maxforall-order-minimum::before,
body.mfa-production-checkout-view #mfa-native-checkout .maxforall-order-minimum::before {
  content: none;
}

/* Paint the native production-cart warning without changing its box geometry. */
body.mfa-production-cart-view #mfa-native-cart p.mfa-cart-minimum-alert {
  color: var(--mfa-color-error-text);
  background-color: var(--mfa-color-error-bg);
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px var(--mfa-color-error-border);
}

/* Production legacy mobile button overrides: retain the approved native flow.
 * Only the six conflicting properties need priority; native behavior, focus,
 * loading indicators, notice dismissals and other buttons remain untouched. */
@media only screen and (max-width: 767px) {
  body.mfa-production-cart-view #mfa-native-cart .wc-block-cart__submit-button,
  body.mfa-production-checkout-view #mfa-native-checkout .wc-block-components-checkout-place-order-button {
    padding: 12px 22px !important;
    border-radius: 28px !important;
    background: var(--ink) !important;
    color: #fff !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
  body.mfa-production-cart-view #mfa-native-cart .wc-block-cart__submit-button:hover:not(:disabled):not([aria-disabled="true"]),
  body.mfa-production-checkout-view #mfa-native-checkout .wc-block-components-checkout-place-order-button:hover:not(:disabled):not([aria-disabled="true"]) {
    background: var(--mfa-color-hover) !important;
    color: #fff !important;
  }
  body.mfa-production-cart-view #mfa-native-cart .wc-block-cart__submit-button:is(:disabled, [aria-disabled="true"]),
  body.mfa-production-checkout-view #mfa-native-checkout .wc-block-components-checkout-place-order-button:is(:disabled, [aria-disabled="true"]) {
    background: var(--mfa-color-disabled-bg) !important;
    color: var(--mfa-color-disabled-text) !important;
  }
  body.mfa-production-cart-view #mfa-native-cart .wc-block-components-totals-coupon__button,
  body.mfa-production-checkout-view #mfa-native-checkout .wc-block-components-totals-coupon__button {
    padding-left: 16px !important;
    padding-right: 16px !important;
    border-radius: 24px !important;
    background: var(--ink) !important;
    color: #fff !important;
    font-size: 13px !important;
  }
}

/* Keep the native quantity control transparent under the production theme. */
body.mfa-production-cart-view #mfa-native-cart .wc-block-components-quantity-selector button.wc-block-components-quantity-selector__button {
  background: none transparent;
}

/* Keep the approved checkout CTA colors above the desktop theme defaults. */
@media (min-width: 768px) {
  body.mfa-production-checkout-view #mfa-native-checkout .wc-block-components-checkout-place-order-button {
    background: var(--ink);
    color: #fff;
  }
  body.mfa-production-checkout-view #mfa-native-checkout .wc-block-components-checkout-place-order-button:hover:not(:disabled):not([aria-disabled="true"]) {
    background: var(--mfa-color-hover);
    color: #fff;
  }
  body.mfa-production-checkout-view #mfa-native-checkout .wc-block-components-checkout-place-order-button:is(:disabled, [aria-disabled="true"]) {
    background: var(--mfa-color-disabled-bg);
    color: var(--mfa-color-disabled-text);
  }
}

/* Give narrow-screen card labels room without changing hosted payment fields. */
@media (max-width: 389px) {
  body.mfa-production-checkout-view #mfa-native-checkout .ppcp-sdk-v6-card-fields__row {
    flex-direction: column;
  }
}

/* Remove legacy theme constraints from the production cart/checkout shell only.
 * The footer keeps its existing side margins; the centered main is unchanged. */
body.mfa-production-cart-view #mfa-native-cart > .site-header,
body.mfa-production-checkout-view #mfa-native-checkout > .site-header {
  display: flex;
  width: 100%;
  max-width: none;
}
body.mfa-production-cart-view #mfa-native-cart > .site-footer,
body.mfa-production-checkout-view #mfa-native-checkout > .site-footer {
  width: auto;
  max-width: none;
}
body.mfa-production-cart-view #mfa-native-cart > :is(.site-header, .site-footer)::before,
body.mfa-production-cart-view #mfa-native-cart > :is(.site-header, .site-footer)::after,
body.mfa-production-checkout-view #mfa-native-checkout > :is(.site-header, .site-footer)::before,
body.mfa-production-checkout-view #mfa-native-checkout > :is(.site-header, .site-footer)::after {
  content: normal;
}
