/* One colour system for storefront actions. Typography and geometry stay unchanged. */
:root {
  --mc-button-bg: #365640;
  --mc-button-hover: #294332;
  --mc-button-active: #22392b;
  --mc-button-disabled: #e5ebe2;
}

body:not(.wp-admin) :is(.button, .btn, .mc-action, .home-button, .home-product-link, .home-product-quote, .maleonss-quote-button, .maleonss-contact-submit, .maleonss-cookie-actions button, .maleonss-cookie-settings-panel footer button, .mc-whatsapp) {
  --bs-btn-bg: var(--mc-button-bg);
  --bs-btn-border-color: var(--mc-button-bg);
  --bs-btn-hover-bg: var(--mc-button-hover);
  --bs-btn-hover-border-color: var(--mc-button-hover);
  --bs-btn-active-bg: var(--mc-button-active);
  --bs-btn-active-border-color: var(--mc-button-active);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
  transition-property: background-color, border-color, color, box-shadow;
  transition-duration: .18s;
  transition-timing-function: ease;
}

body:not(.wp-admin) :is(.button, .btn, .mc-action, .home-button, .home-product-link, .home-product-quote, .maleonss-quote-button, .maleonss-contact-submit, .maleonss-cookie-actions button, .maleonss-cookie-settings-panel footer button, .mc-whatsapp):not(:disabled):not([aria-disabled="true"]):hover {
  --mc-button-surface: var(--mc-button-hover);
}
body:not(.wp-admin) :is(.button, .btn, .mc-action, .home-button, .home-product-link, .home-product-quote, .maleonss-quote-button, .maleonss-contact-submit, .maleonss-cookie-actions button, .maleonss-cookie-settings-panel footer button, .mc-whatsapp):not(:disabled):not([aria-disabled="true"]):active {
  --mc-button-surface: var(--mc-button-active);
}

/* Filled calls to action, including native WooCommerce forms and modal footers. */
body:not(.wp-admin) :is(.btn-primary, .btn-dark, .btn-secondary, .mc-action, .home-button-dark, .home-product-link, .home-product-quote, .maleonss-quote-button, .maleonss-contact-submit, .maleonss-cookie-actions button, .maleonss-cookie-settings-panel footer button, .mc-whatsapp),
body:not(.wp-admin) .woocommerce :is(a.button, button.button, input.button),
body:not(.wp-admin) #respond input#submit {
  background-color: var(--mc-button-surface, var(--mc-button-bg)) !important;
  border-color: var(--mc-button-surface, var(--mc-button-bg)) !important;
  color: #fff !important;
  background-image: none !important;
}

/* Secondary actions remain light; only hover/press turns them green. */
body:not(.wp-admin) :is(.home-button-light, .btn-outline-primary, .btn-outline-secondary, .btn-outline-dark):not(.button):not(.maleonss-quote-button):not(.quantity-btn),
body.woocommerce ul.products li.product .product-card-actions .secondary-link,
body:not(.wp-admin) .mc-product-page .summary .maleonss-product-contact-trigger,
body:not(.wp-admin) .woocommerce .mc-cart :is(.mc-cart-actions, .shipping-calculator-form) .button {
  background: var(--mc-secondary-surface, transparent) !important;
  color: var(--mc-secondary-ink, var(--mc-button-bg)) !important;
  border-color: var(--mc-secondary-border, #aabca9) !important;
}
body:not(.wp-admin) :is(.home-button-light, .btn-outline-primary, .btn-outline-secondary, .btn-outline-dark):not(.button):not(.maleonss-quote-button):not(.quantity-btn):hover,
body.woocommerce ul.products li.product .product-card-actions .secondary-link:hover,
body:not(.wp-admin) .mc-product-page .summary .maleonss-product-contact-trigger:hover,
body:not(.wp-admin) .woocommerce .mc-cart :is(.mc-cart-actions, .shipping-calculator-form) .button:not(:disabled):hover {
  --mc-secondary-surface: var(--mc-button-hover);
  --mc-secondary-ink: #fff;
  --mc-secondary-border: var(--mc-button-hover);
}

/* Navigation states keep the same family without recolouring body copy. */
body:not(.wp-admin) .woocommerce-MyAccount-navigation :is(li.is-active a, a:hover),
body:not(.wp-admin) .woocommerce-pagination :is(span.current, a:hover) {
  background: var(--mc-button-hover);
  border-color: var(--mc-button-hover);
  color: #fff;
}
/* Catalog and editorial pagination share one clear, stable set of states. */
body .woocommerce nav.woocommerce-pagination ul,
body .journal-pagination .nav-links {display:flex;flex-wrap:wrap;justify-content:center;gap:8px;border:0;background:none;box-shadow:none;padding:0}
body .woocommerce nav.woocommerce-pagination ul li {border:0;overflow:visible}
body :is(.woocommerce-pagination,.journal-pagination) .page-numbers {display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;margin:0;padding:10px 14px;border:1px solid #c7d2c2;border-radius:6px;background:#fff;color:var(--mc-button-bg);font-weight:700;text-decoration:none;transition:background-color .18s,color .18s,border-color .18s}
body :is(.woocommerce-pagination,.journal-pagination) .page-numbers.current {background:var(--mc-button-bg)!important;border-color:var(--mc-button-bg)!important;color:#fff!important}
body :is(.woocommerce-pagination,.journal-pagination) a.page-numbers:hover {background:var(--mc-button-hover)!important;border-color:var(--mc-button-hover)!important;color:#fff!important;transform:none}
body :is(.woocommerce-pagination,.journal-pagination) .page-numbers.dots {background:transparent;border-color:transparent;color:#667169;min-width:24px;padding-inline:4px}
body:not(.wp-admin) :is(.button, .btn, .mc-action, .maleonss-contact-submit, .maleonss-quote-button):disabled,
body:not(.wp-admin) .woocommerce .mc-cart button.button:disabled {
  background: var(--mc-button-disabled) !important;
  border-color: #d5dfd0 !important;
  color: #63725f !important;
}
@media (prefers-reduced-motion: reduce) {
  body:not(.wp-admin) :is(.button, .btn, .mc-action, .home-button, .home-product-link, .maleonss-quote-button, .maleonss-cookie-actions button, .mc-whatsapp) { transition: none !important; }
}
