/* Buttons and button-styled links. */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.625rem var(--space-md);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.button--primary {
  color: var(--color-brand-contrast);
  background: var(--color-brand);
  box-shadow: var(--shadow-sm);
}

.button--primary:hover {
  color: var(--color-brand-contrast);
  background: var(--color-brand-hover);
}

.button--primary:active {
  background: var(--color-brand-active);
}

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

.button--secondary:hover {
  color: var(--color-text);
  background: var(--color-surface-muted);
}

.button--danger {
  color: var(--color-alert);
  background: transparent;
  border-color: var(--color-alert-border);
}

.button--danger:hover {
  color: var(--color-alert);
  background: var(--color-alert-bg);
}

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

/* `button_to` wraps its button in a form, which would otherwise force a line
   break in inline contexts. */
.button_to {
  display: inline-block;
}

.button_to--block {
  display: block;
  width: 100%;
}
