/**
 * Buttons Component
 * Structure only - colors applied in colors.css
 */

/* Base button structure */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-md);
  border-width: 2px;
  border-style: solid;
  border-color: transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  font-family: inherit;
  white-space: nowrap;
  user-select: none;
  text-align: center;
  /* NO background, NO color - applied in colors.css */
  /* Touch-friendly minimum sizes - WCAG 2.1 Level AAA */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button variants - structure only */
.btn-primary {
  /* Colors applied in colors.css */
}

.btn-secondary {
  /* Colors applied in colors.css */
}

.btn-outline {
  background: transparent;
  /* Border and text colors applied in colors.css */
}

.btn-text {
  background: transparent;
  border: none;
  padding: var(--space-2) var(--space-3);
  /* Text color applied in colors.css */
}

.btn-accent {
  /* Colors applied in colors.css */
}

/* Button sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  gap: var(--space-1);
  min-height: 36px;
}

.btn-md {
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  gap: var(--space-3);
  min-height: 48px;
}

/* Button with icon */
.btn i,
.btn svg {
  width: 1.25em;
  height: 1.25em;
  flex-shrink: 0;
}

/* Button group */
.btn-group {
  display: inline-flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.btn-group .btn {
  margin: 0;
}

/* Full width button */
.btn-block {
  width: 100%;
  display: flex;
}

/* Loading state */
.btn.loading {
  position: relative;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .btn {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    min-height: 48px; /* Larger touch targets on mobile */
  }

  .btn-sm {
    min-height: 44px;
  }

  .btn-lg {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
  }

  .btn-group {
    width: 100%;
  }

  .btn-group .btn {
    flex: 1;
  }
}
