/* Warm neutrals already used by the portfolio and project inquiry pages. */
:root {
  --btw-button-fill: #e9dfd0;
  --btw-button-hover: #deceb9;
  --btw-button-active: #d2bea3;
  --btw-button-text: #26231f;
  --btw-button-edge: #8a765e;
  --btw-button-focus: #625141;
  --btw-primary-fill: #3e3228;
  --btw-primary-hover: #564436;
  --btw-primary-active: #30271f;
  --btw-primary-text: #fffaf3;
}

/* Override the builder's generic button color without styling plain links.
   Higher-specificity widgets can still keep intentionally distinct styling. */
body[class*="elementor-kit-"] button,
body[class*="elementor-kit-"] :is(input[type="button"], input[type="submit"], input[type="reset"]),
body[class] :is(.elementor-button, .wp-block-button__link, .ast-button, .bw-btn, .woocommerce .button),
body .btw-inquiry-footer button,
body .elementor-menu-toggle,
body.btw-child-photo .hero-caption :is(.view-switch button, .text-action, .arrow-button) {
  background-color: var(--btw-button-fill);
  color: var(--btw-button-text);
  border-color: var(--btw-button-edge);
}

/* Draw the edge without changing button dimensions. */
body[class] :is(.elementor-button, .wp-block-button__link, .ast-button, .bw-btn, .woocommerce .button),
body .btw-inquiry-footer button {
  box-shadow: inset 0 0 0 1px var(--btw-button-edge);
}

body[class*="elementor-kit-"] button:where(:enabled:hover),
body[class*="elementor-kit-"] :is(input[type="button"], input[type="submit"], input[type="reset"]):where(:enabled:hover),
body[class] :is(.elementor-button, .wp-block-button__link, .ast-button, .bw-btn, .woocommerce .button):hover,
body .btw-inquiry-footer button:enabled:hover,
body .elementor-menu-toggle:hover,
body.btw-child-photo .hero-caption :is(.view-switch button, .text-action, .arrow-button):hover:not([aria-disabled="true"]) {
  background-color: var(--btw-button-hover);
  color: var(--btw-button-text);
}

body[class] :is(.elementor-button, .wp-block-button__link, .ast-button, .bw-btn, .woocommerce .button):active,
body .btw-inquiry-footer button:enabled:active,
body .elementor-menu-toggle[aria-expanded="true"],
body.btw-child-photo .hero-caption .view-switch button[aria-pressed="true"] {
  background-color: var(--btw-button-active);
  color: var(--btw-button-text);
}

body.btw-child-photo .hero-caption .view-switch button[aria-pressed="true"] {
  box-shadow: inset 0 -2px 0 var(--btw-button-focus);
}

/* Keep calls to action easy to spot on the paper canvas. */
body[class] .elementor-button,
body[class] .wp-block-button:not(.is-style-outline) .wp-block-button__link,
body .btw-inquiry-footer button {
  background-color: var(--btw-primary-fill);
  border-color: var(--btw-primary-fill);
  color: var(--btw-primary-text);
  box-shadow: none;
}

body[class] .elementor-button:hover,
body[class] .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
body .btw-inquiry-footer button:enabled:hover {
  background-color: var(--btw-primary-hover);
  color: var(--btw-primary-text);
}

body[class] .elementor-button:active,
body[class] .wp-block-button:not(.is-style-outline) .wp-block-button__link:active,
body .btw-inquiry-footer button:enabled:active {
  background-color: var(--btw-primary-active);
  color: var(--btw-primary-text);
}

body :is(button, input[type="button"], input[type="submit"], input[type="reset"], .elementor-button,
          .wp-block-button__link, .ast-button, .bw-btn, .elementor-menu-toggle):focus-visible {
  outline: 2px solid var(--btw-button-focus);
  outline-offset: 3px;
}

body.btw-child-photo .hero-caption :is(button, .text-action):focus-visible {
  outline-offset: -3px;
}
