/* Button Component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
  vertical-align: middle;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  min-height: 2.25rem;
  gap: 0.5rem;
}

.btn:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.btn:focus-visible {
  box-shadow:
    0 0 0 2px var(--color-gray-50),
    0 0 0 4px var(--color-primary-500);
}

/* Button Sizes */
.btn--small {
  padding: 0.375rem 0.75rem;
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.btn--medium {
  padding: 0.5rem 1rem;
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.btn--large {
  padding: 0.625rem 1.25rem;
  font-size: var(--font-size-base);
  line-height: 1.5;
}

/* Primary Button */
.btn--primary {
  background-color: var(--color-primary-600);
  color: white;
  border-color: var(--color-primary-600);
  padding: var(--spacing-sm);
}

.btn--primary:hover {
  background-color: var(--color-primary-700);
  border-color: var(--color-primary-700);
  color: white;
  text-decoration: none;
}

.btn--primary:active {
  background-color: var(--color-primary-800);
  border-color: var(--color-primary-800);
  color: white;
}

/* Secondary Button */
.btn--secondary {
  background-color: white;
  color: var(--color-gray-700);
  border-color: var(--color-gray-300);
}

.btn--secondary:hover {
  background-color: var(--color-gray-50);
  color: var(--color-gray-900);
  text-decoration: none;
}

.btn--secondary:active {
  background-color: var(--color-gray-100);
}

/* Danger Button */
.btn--danger {
  background-color: var(--color-danger);
  color: white;
  border-color: var(--color-danger);
}

.btn--danger:hover {
  background-color: var(--color-danger-hover);
  border-color: var(--color-danger-hover);
  color: white;
  text-decoration: none;
}

.btn--danger:active {
  background-color: #b91c1c;
  border-color: #b91c1c;
  color: white;
}

/* Disabled State */
.btn:disabled,
.btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button Group */
.btn-group {
  display: inline-flex;
  gap: var(--spacing-sm);
  align-items: center;
}
