/*
 * Alfa Core 0.21.11 - global action-control geometry contract.
 * Every normal Alfa action button shares one 6px radius, one 50px height and centered content; search submit buttons are an explicit 36px-height exception.
 * Pills, chips, badges, accordion/disclosure triggers and intentionally circular/icon-only controls are exempt.
 */

body.alfa-master-controls {
  --alfa-button-radius: 6px;
  --alfa-button-height: 50px;
  --alfa-search-button-height: 36px;
}

/*
 * Canonical action-button geometry. This stylesheet loads after Master CTA and
 * therefore is the final geometry owner for Header, body, form and lower CTA
 * actions on every Alfa frontend page. Hover/focus states may change paint,
 * but not these dimensions.
 */
body.alfa-master-controls .alfa-v2.alfa-master-shell[data-alfa-module="global_header"] .alfa-head-actions .alfa-phone,
body.alfa-master-controls .alfa-v2.alfa-master-shell[data-alfa-module="global_header"] .alfa-head-actions .alfa-btn,
body.alfa-master-controls .alfa-v2:not(.alfa-master-shell) .alfa-btn,
body.alfa-master-controls .alfa-v2:not(.alfa-master-shell) .alfa-phone-cta,
body.alfa-master-controls .alfa-v2:not(.alfa-master-shell) .alfa-cta-phone,
body.alfa-master-controls .alfa-v2:not(.alfa-master-shell) .alfa-search-form button,
body.alfa-master-controls .alfa-v2:not(.alfa-master-shell) .alfa-search-all-link,
body.alfa-master-controls .alfa-v2:not(.alfa-master-shell) .alfa-pricing-actions .alfa-link,
body.alfa-master-controls .alfa-v2:not(.alfa-master-shell) .alfa-refs-intro .alfa-link,
body.alfa-master-controls .alfa-lp .lp-btn,
body.alfa-master-controls .alfa-lp .lp-phone-cta,
body.alfa-master-controls .alfa-lp .lp-cta-phone,
body.alfa-master-controls .elementor-button,
body.alfa-master-controls .wp-block-button__link,
body.alfa-master-controls .thm-btn,
body.alfa-master-controls a.request,
body.alfa-master-controls button[type="submit"],
body.alfa-master-controls button[type="button"]:not([aria-expanded]):not([aria-controls]):not(.alfa-square):not(.alfa-nav-trigger):not(.alfa-mobile-menu-toggle),
body.alfa-master-controls input[type="submit"],
body.alfa-master-controls input[type="button"],
body.alfa-master-controls input[type="reset"] {
  box-sizing: border-box !important;
  height: var(--alfa-button-height, 50px) !important;
  min-height: var(--alfa-button-height, 50px) !important;
  max-height: var(--alfa-button-height, 50px) !important;
  border-radius: var(--alfa-button-radius, 6px) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  text-align: center !important;
  vertical-align: middle !important;
}

/*
 * Search action is the one explicit height exception to the 50px action-button
 * contract. It keeps the shared 6px radius and centered content. This block is
 * intentionally later than the generic geometry rule so legacy search CSS and
 * the global 50px rule cannot win.
 */
body.alfa-master-controls .alfa-v2:not(.alfa-master-shell) .alfa-search-form button {
  height: var(--alfa-search-button-height, 36px) !important;
  min-height: var(--alfa-search-button-height, 36px) !important;
  max-height: var(--alfa-search-button-height, 36px) !important;
}

/*
 * Canonical content alignment for anchors and button elements. Icon + text
 * groups are centered as a unit; multi-line text remains centered as text.
 */
body.alfa-master-controls .alfa-v2.alfa-master-shell[data-alfa-module="global_header"] .alfa-head-actions .alfa-phone,
body.alfa-master-controls .alfa-v2.alfa-master-shell[data-alfa-module="global_header"] .alfa-head-actions .alfa-btn,
body.alfa-master-controls .alfa-v2:not(.alfa-master-shell) .alfa-btn,
body.alfa-master-controls .alfa-v2:not(.alfa-master-shell) .alfa-phone-cta,
body.alfa-master-controls .alfa-v2:not(.alfa-master-shell) .alfa-cta-phone,
body.alfa-master-controls .alfa-v2:not(.alfa-master-shell) .alfa-search-form button,
body.alfa-master-controls .alfa-v2:not(.alfa-master-shell) .alfa-search-all-link,
body.alfa-master-controls .alfa-v2:not(.alfa-master-shell) .alfa-pricing-actions .alfa-link,
body.alfa-master-controls .alfa-v2:not(.alfa-master-shell) .alfa-refs-intro .alfa-link,
body.alfa-master-controls .alfa-lp .lp-btn,
body.alfa-master-controls .alfa-lp .lp-phone-cta,
body.alfa-master-controls .alfa-lp .lp-cta-phone,
body.alfa-master-controls .elementor-button,
body.alfa-master-controls .wp-block-button__link,
body.alfa-master-controls .thm-btn,
body.alfa-master-controls a.request,
body.alfa-master-controls button[type="submit"],
body.alfa-master-controls button[type="button"]:not([aria-expanded]):not([aria-controls]):not(.alfa-square):not(.alfa-nav-trigger):not(.alfa-mobile-menu-toggle) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

/*
 * Explicit descendant guard. Legacy page CSS may set left alignment directly
 * on nested spans/strong/small; the global action-control contract wins.
 */
body.alfa-master-controls :is(
  .alfa-head-actions .alfa-phone,
  .alfa-head-actions .alfa-btn,
  .alfa-v2:not(.alfa-master-shell) .alfa-btn,
  .alfa-v2:not(.alfa-master-shell) .alfa-phone-cta,
  .alfa-v2:not(.alfa-master-shell) .alfa-cta-phone,
  .alfa-lp .lp-btn,
  .alfa-lp .lp-phone-cta,
  .alfa-lp .lp-cta-phone,
  .elementor-button,
  .wp-block-button__link,
  .thm-btn,
  a.request
) :is(span, strong, small, b, em, .elementor-button-content-wrapper, .elementor-button-text) {
  text-align: center !important;
}

body.alfa-master-controls .elementor-button .elementor-button-content-wrapper {
  align-items: center !important;
  justify-content: center !important;
}

/* Explicit exclusions: these are controls, but not rectangular action buttons. */
body.alfa-master-controls .alfa-square,
body.alfa-master-controls .alfa-nav-trigger,
body.alfa-master-controls .alfa-mobile-menu-toggle,
body.alfa-master-controls .alfa-search-chip,
body.alfa-master-controls .lp-city,
body.alfa-master-controls [role="tab"],
body.alfa-master-controls button[aria-expanded],
body.alfa-master-controls button[aria-controls] {
  --alfa-control-geometry-exempt: 1;
}
