/* Buttons: primary (moss), secondary (outline), ghost, text link with arrow; sizes. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  padding: var(--space-2) var(--space-5);
  border: 1px solid var(--button-bg);
  border-radius: var(--radius-pill);
  background: var(--button-bg);
  color: var(--button-text);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-base);
}

.button:hover {
  background: var(--button-bg-hover);
  border-color: var(--button-bg-hover);
  color: var(--button-text);
  box-shadow: var(--shadow-md);
}

.button:active {
  transform: translateY(1px);
}

.button--secondary {
  border-color: var(--button-secondary-border);
  background: var(--button-secondary-bg);
  color: var(--button-secondary-text);
}

.button--secondary:hover {
  border-color: var(--button-secondary-hover-bg);
  background: var(--button-secondary-hover-bg);
  color: var(--button-secondary-hover-text);
  box-shadow: none;
}

.button--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--color-text-muted);
  padding-inline: var(--space-3);
}

.button--ghost:hover {
  background: var(--color-surface-muted);
  border-color: transparent;
  color: var(--color-error-text);
  box-shadow: none;
}

.button--large {
  min-height: var(--control-height-lg);
  padding-inline: var(--space-6);
  font-size: var(--font-size-base);
}

.button--block {
  width: 100%;
}

/* Arrow that nudges right on hover (decorative). */
.button__arrow {
  transition: transform var(--transition-base);
}

.button:hover .button__arrow,
.text-link:hover .button__arrow {
  transform: translateX(3px);
}

/* Text link with underline, used for secondary calls to action. */
.text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--control-height);
  color: var(--color-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}

.text-link:hover {
  color: var(--color-primary-hover);
}

/* Leading icon inside a button (e.g. phone handset, chat bubble). */
.button__icon {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
}
