/* Buttons: primary (ink), secondary (outline), tool (white with icon), bare icon. */

.icon-btn {
  width: 44px;
  height: 44px;
  margin-left: -10px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink);
  display: grid;
  place-items: center;
}

.icon-btn:active {
  background: var(--wash);
}

.icon-btn svg {
  width: 24px;
  height: 24px;
}

.primary-btn,
.secondary-btn,
.soft-btn {
  min-height: 52px;
  border-radius: var(--radius-md);
  font-size: var(--text-body);
  font-weight: 600;
}

.primary-btn {
  padding: 0 var(--space-5);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.secondary-btn {
  padding: 0 var(--space-4);
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.primary-btn:active,
.secondary-btn:active,
.soft-btn:active {
  transform: translateY(1px);
}

.secondary-btn svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.secondary-btn span {
  display: inline;
}

/* Tool buttons under the board: icon over a short label. */
.soft-btn {
  min-width: 0;
  padding: 0 var(--space-1);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
}

.soft-btn svg {
  width: 20px;
  height: 20px;
}

.soft-btn strong {
  color: var(--ink);
  font-size: var(--text-title);
  line-height: 1.1;
}

.soft-btn span {
  display: block;
  font-size: var(--text-caption);
  font-weight: 500;
}

.soft-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.text-button {
  display: block;
}

.link-btn {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-2);
  font-size: var(--text-small);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}

/* Very short screens: tool buttons put the icon beside the label to save height. */
@media (max-height: 640px) {
  .soft-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
  }

  .soft-btn svg {
    width: 18px;
    height: 18px;
  }
}
