/**
 * <Button> — vanilla component kit primitive (F2, issue #60).
 *
 * Variants: --primary | --secondary | --danger | --ghost
 * Sizes:    --sm (28px) | --md (34px, default)
 *
 * Markup:
 *   <button type="button" class="c-btn c-btn--primary c-btn--md">Save</button>
 *   <a class="c-btn c-btn--secondary" href="…">Open billing</a>
 *
 * Tokens consumed from public/shared.css.
 */

.c-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  box-sizing: border-box;
  margin: 0;
  padding: 0 var(--space-4);
  height: 34px;
  font-family: inherit;
  font-size: var(--font-size-body);
  font-weight: 500;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-md);
  border: 0.5px solid var(--text-primary);
  background: var(--text-primary);
  color: var(--bg-primary);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
  -webkit-appearance: none;
  appearance: none;
}

.c-btn:disabled,
.c-btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

.c-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Sizes */
.c-btn--sm {
  height: 28px;
  padding: 0 var(--space-3);
  font-size: var(--font-size-small);
}

.c-btn--md {
  height: 34px;
}

/* Variants */
.c-btn--primary {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
}

.c-btn--primary:hover:not(:disabled):not([aria-disabled="true"]) {
  background: #000;
  border-color: #000;
}

.c-btn--secondary {
  background: var(--bg-primary);
  color: var(--text-primary);
  border-color: var(--border-secondary);
}

.c-btn--secondary:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--bg-tertiary);
}

.c-btn--danger {
  background: var(--bg-primary);
  color: var(--danger-text);
  border-color: var(--danger-border);
}

.c-btn--danger:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--danger-bg);
}

.c-btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: transparent;
  padding-inline: var(--space-2);
}

.c-btn--ghost:hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--bg-tertiary);
}
