/**
 * Site-wide button style: the solid brand-green button first used on the
 * homepage banner (see banner-dark.css), applied to every button on every page.
 *
 * Covers the theme's .btn links, core Button / Search / File blocks, and
 * Gravity Forms buttons. Menu toggles, slider arrows and other bare
 * <button> elements are left alone.
 *
 * Why the heavy selectors: the Customizer's Additional CSS prints after
 * theme styles and styles core buttons with !important chains up to seven
 * classes deep (e.g. ".has-background .wp-block-button:not(.is-style-outline)
 * .wp-block-button__link:not(:hover):not(:active):not(.has-background)").
 * ":not(#xpt-btn)" adds ID-level specificity so these rules win without
 * matching those chains one by one. Editor-chosen button colours are
 * overridden on purpose, so all buttons match.
 *
 * Plain CSS outside the Sass build; loaded on the front end and in the
 * block editor by AssetsServiceProvider.
 */

:is(
  .btn,
  .wp-block-button__link,
  .wp-element-button,
  .wp-block-file .wp-block-file__button,
  .gform_wrapper .gform_button,
  .gform_wrapper .gform_next_button,
  .gform_wrapper .gform_previous_button
):not(#xpt-btn) {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 17px 26px 15px !important;
  border: 2px solid #00ce7c !important;
  border-radius: 2px !important;
  background: #00ce7c !important;
  color: #16201d !important;
  font-family: "TradeGothicLT-Bold", "Helvetica Neue", Arial, sans-serif !important;
  font-weight: normal !important;
  font-size: 18px !important;
  line-height: 1 !important;
  letter-spacing: 0.02em !important;
  text-decoration: none !important;
  box-shadow: none !important;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease !important;
}

:is(
  .btn,
  .wp-block-button__link,
  .wp-element-button,
  .wp-block-file .wp-block-file__button,
  .gform_wrapper .gform_button,
  .gform_wrapper .gform_next_button,
  .gform_wrapper .gform_previous_button
):not(#xpt-btn):is(:hover, :active) {
  border-color: #33e39a !important;
  background: #33e39a !important;
  color: #16201d !important;
}

:is(
  .btn,
  .wp-block-button__link,
  .wp-element-button,
  .wp-block-file .wp-block-file__button,
  .gform_wrapper .gform_button,
  .gform_wrapper .gform_next_button,
  .gform_wrapper .gform_previous_button
):not(#xpt-btn):focus-visible {
  outline: 3px solid #00ce7c !important;
  outline-offset: 3px !important;
}

@media (prefers-reduced-motion: reduce) {
  :is(.btn, .wp-block-button__link, .wp-element-button):not(#xpt-btn) {
    transition: none !important;
  }
}
