/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--fs-footnote);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-spring-snappy),
    background-color var(--dur-fast) var(--ease-standard),
    box-shadow var(--dur-fast) var(--ease-standard),
    border-color var(--dur-fast) var(--ease-standard);
}

.btn:active {
  transform: scale(0.96);
}

/* Flat accent, as before - the gradient belongs to the brand mark, not to
   the action the user presses twenty times a day. What makes it read as a
   physical key instead of a coloured rectangle is the lighting, not the hue:
   a lit top edge inside the button, a dark bottom edge, and a coloured cast
   beneath it. */
.btn--primary {
  background: var(--color-accent-fill);
  color: var(--color-on-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 6px 16px rgba(var(--color-accent-rgb), 0.38);
}

.btn--primary:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 10px 26px rgba(var(--color-accent-rgb), 0.5);
}

.btn--secondary {
  background: var(--color-surface-raised);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-strong);
}

.btn--secondary:hover {
  background: var(--color-surface-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

.btn--ghost:hover {
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

/* Ghost icon button in a persistent "on" state (e.g. the Minimal colour
   scheme being active). */
.btn--ghost.is-active {
  background: var(--color-surface-hover);
  color: var(--color-accent);
}

.btn--danger {
  background: var(--color-loss-soft);
  color: var(--color-loss);
}

.btn--danger:hover {
  background: rgba(255, 69, 58, 0.22);
}

.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--fs-caption);
}

.btn--icon {
  padding: var(--space-2);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
}

.btn--icon svg {
  width: 18px;
  height: 18px;
}

.btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

