/*
 * Button. Figma component "Button" (node 1:57).
 * Primary = brand red, white label. Ghost = 2px asphalt outline.
 * Square corners, no radius. L = 56px (hero/forms), M = 52px (inline).
 *
 * Selectors carry the element (a/button/input) so they beat Divi and
 * Bootstrap rules such as ".et_pb_text a" without !important.
 */

a.jsds-btn,
button.jsds-btn,
input.jsds-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  margin: 0;
  padding: 0 28px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: var(--jsds-brand-red);
  color: var(--jsds-surface-white);
  font: 600 22px/1 var(--jsds-font-display);
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

a.jsds-btn:hover,
a.jsds-btn:focus,
button.jsds-btn:hover,
input.jsds-btn:hover {
  background: var(--jsds-brand-red-hover);
  color: var(--jsds-surface-white);
  text-decoration: none;
}

a.jsds-btn:active,
button.jsds-btn:active,
input.jsds-btn:active {
  background: var(--jsds-brand-red-hover);
}

a.jsds-btn:focus-visible,
button.jsds-btn:focus-visible,
input.jsds-btn:focus-visible {
  outline: var(--jsds-focus-ring);
  outline-offset: 2px;
}

/* Size M */
.jsds-btn.jsds-btn--m {
  height: 52px;
  font-size: 21px;
}

/* Ghost */
.jsds-btn.jsds-btn--ghost {
  background: transparent;
  color: var(--jsds-ink-900);
  border: 2px solid var(--jsds-ink-900);
}

/* Ghost hover is not designed in Figma. Assumption: invert to asphalt. */
a.jsds-btn.jsds-btn--ghost:hover,
a.jsds-btn.jsds-btn--ghost:focus,
button.jsds-btn.jsds-btn--ghost:hover,
input.jsds-btn.jsds-btn--ghost:hover {
  background: var(--jsds-ink-900);
  color: var(--jsds-surface-white);
}

/*
 * White. Not a Figma Button variant: the CTA band's "Button · White"
 * (418:421 / 422:453) is a detached frame [B]. White fill, brand/red
 * Button/L 22 label, padding 14/26 (desktop) and 14/20 (mobile), 50px
 * tall. Use only on brand red grounds.
 * Hover is not designed. Assumption: asphalt label, as on Ghost.
 */
.jsds-btn.jsds-btn--white {
  height: 50px;
  padding: 14px 26px;
  background: var(--jsds-surface-white);
  color: var(--jsds-brand-red);
  font-size: 22px;
}

a.jsds-btn.jsds-btn--white:hover,
a.jsds-btn.jsds-btn--white:focus,
button.jsds-btn.jsds-btn--white:hover {
  background: var(--jsds-surface-white);
  color: var(--jsds-ink-900);
}

a.jsds-btn.jsds-btn--white:focus-visible,
button.jsds-btn.jsds-btn--white:focus-visible {
  outline: 2px solid var(--jsds-surface-white);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .jsds-btn.jsds-btn--white {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Full width, e.g. the submit button inside the quote card */
.jsds-btn.jsds-btn--block {
  display: flex;
  width: 100%;
}

/* Disabled is not designed in Figma. Assumption: dimmed, no hover. */
.jsds-btn[disabled],
.jsds-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
