/*
 * TCMVET first-party action buttons.
 *
 * Payment-provider iframes and wallet controls are intentionally excluded.
 */
body:not(.wp-admin) {
  --tcm-brand-button: #7cc644;
  --tcm-brand-button-active: #187d3b;
}

body:not(.wp-admin) :is(
  a.et_pb_button,
  button.et_pb_button,
  input.et_pb_button,
  a.et_pb_promo_button,
  a.et_pb_more_button,
  a.wp-block-button__link,
  .wp-element-button,
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  .woocommerce button[type="submit"],
  .affwp-form input[type="submit"],
  .affwp-form button[type="submit"],
  .et_pb_section input[type="submit"],
  .et_pb_section button[type="submit"],
  .nf-form-content input[type="button"],
  .nf-form-content input[type="submit"],
  .nf-form-content button[type="submit"],
  body.page-id-26726 #cta a.btn,
  body.page-id-26677 a.cta-btn,
  .tcm-button
):not(.wc-stripe-payment-request-button):not(.apple-pay-button):not(.google-pay-button):not(.gpay-button) {
  background-color: var(--tcm-brand-button) !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: var(--tcm-brand-button) !important;
  opacity: 1;
  min-height: 44px;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 100ms ease !important;
}

body:not(.wp-admin) :is(
  a.et_pb_button,
  button.et_pb_button,
  input.et_pb_button,
  a.et_pb_promo_button,
  a.et_pb_more_button,
  a.wp-block-button__link,
  .wp-element-button,
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  .woocommerce button[type="submit"],
  .affwp-form input[type="submit"],
  .affwp-form button[type="submit"],
  .et_pb_section input[type="submit"],
  .et_pb_section button[type="submit"],
  .nf-form-content input[type="button"],
  .nf-form-content input[type="submit"],
  .nf-form-content button[type="submit"],
  body.page-id-26726 #cta a.btn,
  body.page-id-26677 a.cta-btn,
  .tcm-button
):not(.wc-stripe-payment-request-button):not(.apple-pay-button):not(.google-pay-button):not(.gpay-button):is(:hover, :focus-visible, :active) {
  background-color: var(--tcm-brand-button-active) !important;
  background-image: none !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: var(--tcm-brand-button-active) !important;
}

body:not(.wp-admin) :is(
  a.et_pb_button,
  button.et_pb_button,
  input.et_pb_button,
  a.et_pb_promo_button,
  a.et_pb_more_button,
  a.wp-block-button__link,
  .wp-element-button,
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  .woocommerce button[type="submit"],
  .affwp-form input[type="submit"],
  .affwp-form button[type="submit"],
  .et_pb_section input[type="submit"],
  .et_pb_section button[type="submit"],
  .nf-form-content input[type="button"],
  .nf-form-content input[type="submit"],
  .nf-form-content button[type="submit"],
  body.page-id-26726 #cta a.btn,
  body.page-id-26677 a.cta-btn,
  .tcm-button
):focus-visible {
  outline: 3px solid #145a2d !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 2px #fff !important;
}

body:not(.wp-admin) :is(
  a.et_pb_button,
  button.et_pb_button,
  input.et_pb_button,
  a.et_pb_promo_button,
  a.et_pb_more_button,
  a.wp-block-button__link,
  .wp-element-button,
  .woocommerce a.button,
  .woocommerce button.button,
  .woocommerce input.button,
  .woocommerce button[type="submit"],
  .affwp-form input[type="submit"],
  .affwp-form button[type="submit"],
  .et_pb_section input[type="submit"],
  .et_pb_section button[type="submit"],
  .nf-form-content input[type="button"],
  .nf-form-content input[type="submit"],
  .nf-form-content button[type="submit"],
  body.page-id-26726 #cta a.btn,
  body.page-id-26677 a.cta-btn,
  .tcm-button
):active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px #10391e38 !important;
}

body:not(.wp-admin) :is(
  .et_pb_button,
  .wp-element-button,
  .woocommerce .button,
  .woocommerce button[type="submit"],
  .affwp-form input[type="submit"],
  .affwp-form button[type="submit"],
  .woocommerce input[type="submit"],
  .nf-form-content input[type="button"],
  .nf-form-content input[type="submit"],
  .nf-form-content button[type="submit"],
  body.page-id-26726 #cta a.btn,
  body.page-id-26677 a.cta-btn,
  .tcm-button
):is(:disabled, [disabled], [aria-disabled="true"], .disabled):not(.wc-stripe-payment-request-button):not(.apple-pay-button):not(.google-pay-button):not(.gpay-button) {
  background: #e5ebe5 !important;
  color: #526252 !important;
  -webkit-text-fill-color: #526252 !important;
  border-color: #c7d1c7 !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

html body:not(.wp-admin).single-product.woocommerce-page div.product div.summary form.cart button.single_add_to_cart_button.button.disabled.wc-variation-selection-needed {
  background: #e5ebe5 !important;
  color: #526252 !important;
  -webkit-text-fill-color: #526252 !important;
  border-color: #c7d1c7 !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

body:not(.wp-admin) :is(
  .woocommerce .button.loading,
  .woocommerce button[aria-busy="true"],
  .nf-form-content button[aria-busy="true"],
  body.page-id-26726 #cta a.btn[aria-busy="true"],
  body.page-id-26677 a.cta-btn[aria-busy="true"],
  .tcm-button[aria-busy="true"]
) {
  background-color: var(--tcm-brand-button-active) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  padding-inline-end: 44px !important;
  cursor: progress !important;
}

body:not(.wp-admin) :is(
  .woocommerce .button.loading,
  .woocommerce button[aria-busy="true"],
  .nf-form-content button[aria-busy="true"],
  body.page-id-26726 #cta a.btn[aria-busy="true"],
  body.page-id-26677 a.cta-btn[aria-busy="true"],
  .tcm-button[aria-busy="true"]
)::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  width: 15px;
  height: 15px;
  inset-inline-end: 15px;
  top: calc(50% - 8px);
  border: 2px solid #ffffff66;
  border-top-color: #fff;
  border-radius: 50%;
  animation: tcm-button-spin .7s linear infinite;
}

@keyframes tcm-button-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Remove the contact button's thick two-tone ring; keep form behavior intact. */
body:not(.wp-admin) button.et_pb_contact_submit,
body.page-id-26726 #cta a.btn,
body.page-id-26677 a.cta-btn {
  border-width: 2px !important;
  border-style: solid !important;
  border-radius: 6px !important;
  padding: 12px 22px !important;
  line-height: 1.4 !important;
  filter: none !important;
  white-space: normal;
}

@media (prefers-reduced-motion: reduce) {
  body:not(.wp-admin) :is(.et_pb_button, .woocommerce .button, body.page-id-26726 #cta a.btn, .cta-btn, .tcm-button) {
    transition: none !important;
    transform: none !important;
  }

  body:not(.wp-admin) :is(
    .woocommerce .button.loading,
    .woocommerce button[aria-busy="true"],
    body.page-id-26726 #cta a.btn[aria-busy="true"],
    body.page-id-26677 a.cta-btn[aria-busy="true"],
    .tcm-button[aria-busy="true"]
  )::before {
    animation: none;
  }
}

/* Scoped first-party actions missed by the generic Divi/WooCommerce selector. */
body.page-id-26547 a.gp-btn,
body.page-id-31298 a.btvg-btn,
body.page-id-26825 a.sdm_download.green {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px !important;
  border: 2px solid #7cc644 !important;
  border-radius: 8px !important;
  background: #7cc644 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-weight: 600;
  line-height: 1.45;
  text-decoration: none !important;
  transition: background-color 160ms ease, border-color 160ms ease, transform 100ms ease, box-shadow 160ms ease !important;
}
body.page-id-26547 a.gp-btn:hover,
body.page-id-26547 a.gp-btn:focus-visible,
body.page-id-26547 a.gp-btn:active,
body.page-id-31298 a.btvg-btn:hover,
body.page-id-31298 a.btvg-btn:focus-visible,
body.page-id-31298 a.btvg-btn:active,
body.page-id-26825 a.sdm_download.green:hover,
body.page-id-26825 a.sdm_download.green:focus-visible,
body.page-id-26825 a.sdm_download.green:active {
  background: #187d3b !important;
  border-color: #187d3b !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}

body.page-id-26547 a.gp-btn:focus-visible,
body.page-id-31298 a.btvg-btn:focus-visible,
body.page-id-26825 a.sdm_download.green:focus-visible {
  outline: 3px solid #145a2d !important;
  outline-offset: 4px !important;
  box-shadow: 0 0 0 2px #fff !important;
}

body.page-id-26547 a.gp-btn:active,
body.page-id-31298 a.btvg-btn:active,
body.page-id-26825 a.sdm_download.green:active {
  transform: translateY(1px) !important;
  box-shadow: inset 0 2px 4px #10391e38 !important;
}

@media (prefers-reduced-motion: reduce) {
  body.page-id-26547 a.gp-btn,
  body.page-id-31298 a.btvg-btn,
  body.page-id-26825 a.sdm_download.green {
    transition: none !important;
    transform: none !important;
  }
}
