/* Use the existing brand asset; CheckoutWC reserves ::after for its spinner. */
html body.woocommerce-checkout.checkout-wc #cfw-payment-action #place_order.haopay_paypal_bg[type="submit"],
html body.woocommerce-checkout.checkout-wc #place_order.haopay_paypal_bg[type="submit"],
html body.woocommerce-checkout #place_order.haopay_paypal_bg[type="submit"] {
  background-color: #ffc439 !important;
  background-image: url('/wp-content/plugins/haopay-stripe-gateway/images/pp.svg') !important;
  background-position: center !important;
  background-size: 86px 28px !important;
  background-repeat: no-repeat !important;
  color: transparent !important;
  font-size: 0 !important;
  animation: none !important;
  transform: none !important;
  min-height: 58px !important;
}
html body.woocommerce-checkout.checkout-wc #cfw-payment-action #place_order.haopay_paypal_bg[type="submit"]::before,
html body.woocommerce-checkout.checkout-wc #place_order.haopay_paypal_bg[type="submit"]::before,
html body.woocommerce-checkout #place_order.haopay_paypal_bg[type="submit"]::before {
  content: none !important;
  display: none !important;
  animation: none !important;
}
html body.woocommerce-checkout.checkout-wc #cfw-payment-action #place_order.haopay_paypal_bg[type="submit"]::after,
html body.woocommerce-checkout.checkout-wc #place_order.haopay_paypal_bg[type="submit"]::after,
html body.woocommerce-checkout #place_order.haopay_paypal_bg[type="submit"]::after {
  content: '' !important;
  display: none !important;
  position: absolute !important;
  left: auto !important;
  right: 20px !important;
  top: calc(50% - 10px) !important;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 2px solid rgba(0,48,135,.25) !important;
  border-top-color: #003087 !important;
  border-radius: 50% !important;
  background: none !important;
  font-size: 0 !important;
  transform: none;
}
html body.woocommerce-checkout.checkout-wc #cfw-payment-action #place_order.haopay_paypal_bg[type="submit"].cfw-button-loading::after,
html body.woocommerce-checkout.checkout-wc #cfw-payment-action #place_order.haopay_paypal_bg[type="submit"].loading::after,
html body.woocommerce-checkout.checkout-wc form.processing #place_order.haopay_paypal_bg[type="submit"]::after,
html body.woocommerce-checkout form.processing #place_order.haopay_paypal_bg[type="submit"]::after {
  display: block !important;
  animation: dailora-payment-spin .8s linear infinite !important;
}
@keyframes dailora-payment-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  html body.woocommerce-checkout.checkout-wc form.processing #place_order.haopay_paypal_bg[type="submit"]::after {
    animation-duration: 2s !important;
  }
}
