/**
 * Buttons — default size (Figma: Buttons / 20:70)
 * .tf-btn--minor: outline on canvas
 * .tf-btn--major: white fill + black text
 * .tf-btn--accent: orange fill + white text (home CTAs, Figma #ff7300)
 */

.tf-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: var(--btn-padding-block) var(--btn-padding-inline);
  font-family: var(--font-family-body);
  font-weight: var(--font-weight-body);
  font-size: var(--btn-font-size);
  line-height: normal;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 0;
  cursor: pointer;
  /* Drop native button chrome so Minor (outline) vs Major (fill) stay distinct */
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.tf-btn::-moz-focus-inner {
  border: 0;
  padding: 0;
}

.tf-btn:focus {
  outline: none;
}

.tf-btn:focus-visible {
  outline: 2px solid var(--color-text-accent);
  outline-offset: 2px;
}

.tf-btn--minor {
  color: var(--color-text-default);
  background-color: transparent;
  background-image: none;
  border: var(--btn-minor-border);
}

.tf-btn--minor:hover {
  border-color: rgb(255 255 255 / 0.65);
}

.tf-btn--minor:active {
  border-color: rgb(255 255 255 / 0.85);
}

.tf-btn--major {
  color: var(--color-black);
  background-color: var(--color-white);
  background-image: none;
  /* Match outer box to Minor (1px border) without showing an edge */
  border: 1px solid transparent;
}

.tf-btn--major:hover {
  background-color: rgb(255 255 255 / 0.92);
}

.tf-btn--major:active {
  background-color: rgb(255 255 255 / 0.85);
}

.tf-btn--accent {
  gap: 8px;
  color: var(--color-white);
  background-color: var(--color-orange);
  background-image: none;
  border: 1px solid transparent;
  border-radius: var(--btn-accent-radius);
  font-weight: 500;
}

.tf-btn--accent:hover {
  filter: brightness(1.08);
}

.tf-btn--accent:focus-visible {
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

.tf-btn--compact {
  padding: var(--btn-compact-padding-block) var(--btn-compact-padding-inline);
  font-size: var(--btn-compact-font-size);
  line-height: 1.25;
  min-height: var(--btn-compact-min-height);
}

.tf-btn-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--btn-group-gap);
}

.tf-btn-group--stack {
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* nowrap + min-width:auto lets flex items exceed the row; 0 allows true width:100% */
.tf-btn-group--stack > .tf-btn {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Leading icons on accent CTAs (homepage + styleguide sample) */
.tf-home__btn-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.tf-home__btn-icon img {
  display: block;
  width: 13px;
  height: 13px;
  object-fit: contain;
}
