[data-component="button"],
[data-component="icon-button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 0;
  height: 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--foreground);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.45;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    transform 80ms ease;
  padding: 0 0.5rem;
}

[data-component="button"]:active:not(:disabled),
[data-component="icon-button"]:active:not(:disabled) {
  transform: translateY(1px);
}

[data-component="button"]:disabled,
[data-component="icon-button"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

[data-component="button"]:focus-visible,
[data-component="icon-button"]:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--ring) 38%, transparent);
  outline-offset: 1px;
  border-color: var(--ring);
}

[data-component="button"][data-variant="primary"],
[data-component="icon-button"][data-variant="primary"] {
  background: var(--primary);
  color: var(--primary-foreground);
}

[data-component="button"] [data-component="icon"] {
  color: currentColor;
}

[data-component="button"][data-variant="primary"]:hover,
[data-component="icon-button"][data-variant="primary"]:hover {
  background: color-mix(in oklab, var(--primary) 82%, black 18%);
}

[data-component="button"][data-variant="secondary"],
[data-component="button"][data-variant="outline"],
[data-component="icon-button"][data-variant="secondary"],
[data-component="icon-button"][data-variant="outline"] {
  border-color: var(--border);
  background: var(--input-base);
  color: var(--foreground);
}

[data-component="button"][data-variant="secondary"]:hover,
[data-component="button"][data-variant="outline"]:hover,
[data-component="icon-button"][data-variant="secondary"]:hover,
[data-component="icon-button"][data-variant="outline"]:hover,
[data-component="icon-button"][data-active="true"] {
  background: var(--muted);
  color: var(--foreground);
}

[data-component="button"][data-variant="ghost"],
[data-component="icon-button"][data-variant="ghost"] {
  background: transparent;
  color: var(--muted-foreground);
}

[data-component="button"][data-variant="ghost"]:hover,
[data-component="icon-button"][data-variant="ghost"]:hover {
  background: var(--muted);
  color: var(--foreground);
}

[data-component="button"][data-variant="destructive"],
[data-component="icon-button"][data-variant="destructive"] {
  background: color-mix(in oklab, var(--destructive) 16%, transparent);
  color: var(--destructive);
}

[data-component="button"][data-size="xs"] {
  height: 1.25rem;
  border-radius: var(--radius-sm);
  padding: 0 0.5rem;
  font-size: 0.625rem;
}
[data-component="button"][data-size="sm"] {
  height: 1.5rem;
  padding: 0 0.5rem;
}
[data-component="button"][data-size="lg"] {
  height: 2rem;
  padding: 0 0.625rem;
}
[data-component="icon-button"] {
  width: 1.75rem;
  padding: 0;
}
[data-component="icon-button"][data-size="icon-xs"] {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: var(--radius-sm);
}
[data-component="icon-button"][data-size="icon-sm"] {
  width: 1.5rem;
  height: 1.5rem;
}
[data-component="icon-button"][data-size="icon-lg"] {
  width: 2rem;
  height: 2rem;
}
