/**
 * Button Components
 * Simple, clean buttons for CTAs and navigation
 */

/* ============================================
   BASE BUTTON
   ============================================ */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base) var(--ease-out);
  white-space: nowrap;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.button:active {
  transform: translateY(0);
}

/* Button text and icon alignment */
.button-text {
  display: inline-block;
}

.button-icon {
  display: inline-flex;
  font-size: 1.25em;
  line-height: 1;
}

/* ============================================
   BUTTON COLORS
   ============================================ */

/* Primary (CTA) */
.button-primary {
  background-color: #3b82f6;
  color: white;
}

.button-primary:hover {
  background-color: #2563eb;
  color: white;
}

/* Secondary */
.button-secondary {
  background-color: #6b7280;
  color: white;
}

.button-secondary:hover {
  background-color: #4b5563;
  color: white;
}

/* Success */
.button-success {
  background-color: #10b981;
  color: white;
}

.button-success:hover {
  background-color: #059669;
  color: white;
}

/* Danger */
.button-danger {
  background-color: #ef4444;
  color: white;
}

.button-danger:hover {
  background-color: #dc2626;
  color: white;
}

/* Warning */
.button-warning {
  background-color: #f59e0b;
  color: #1f2937;
}

.button-warning:hover {
  background-color: #d97706;
  color: #1f2937;
}

/* Info */
.button-info {
  background-color: #3b82f6;
  color: white;
}

.button-info:hover {
  background-color: #2563eb;
  color: white;
}

/* Light */
.button-light {
  background-color: #f3f4f6;
  color: #1f2937;
  border-color: #d1d5db;
}

.button-light:hover {
  background-color: #e5e7eb;
  color: #1f2937;
}

/* Dark */
.button-dark {
  background-color: #1f2937;
  color: white;
}

.button-dark:hover {
  background-color: #111827;
  color: white;
}

/* ============================================
   BUTTON STYLES
   ============================================ */

/* Pill style (fully rounded) */
.button-pill {
  border-radius: var(--radius-full);
}

/* Outline style */
.button-outline {
  background-color: transparent;
  border-color: currentColor;
}

.button-outline.button-primary {
  color: #3b82f6;
  border-color: #3b82f6;
}

.button-outline.button-primary:hover {
  background-color: #3b82f6;
  color: white;
}

.button-outline.button-secondary {
  color: #6b7280;
  border-color: #6b7280;
}

.button-outline.button-secondary:hover {
  background-color: #6b7280;
  color: white;
}

.button-outline.button-success {
  color: #10b981;
  border-color: #10b981;
}

.button-outline.button-success:hover {
  background-color: #10b981;
  color: white;
}

.button-outline.button-danger {
  color: #ef4444;
  border-color: #ef4444;
}

.button-outline.button-danger:hover {
  background-color: #ef4444;
  color: white;
}

/* ============================================
   BUTTON SIZES
   ============================================ */

/* Small */
.button-sm {
  padding: 0.375rem 1rem;
  font-size: var(--text-sm);
}

/* Large */
.button-lg {
  padding: 0.875rem 2rem;
  font-size: var(--text-lg);
}

/* ============================================
   BUTTON GROUPS
   ============================================ */

.button-group {
  display: inline-flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ============================================
   DARK MODE
   ============================================ */

@media (prefers-color-scheme: dark) {
  .button-light {
    background-color: #374151;
    color: #f3f4f6;
    border-color: #4b5563;
  }

  .button-light:hover {
    background-color: #4b5563;
    color: #f3f4f6;
  }

  .button-warning {
    color: #111827;
  }

  .button-warning:hover {
    color: #111827;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
  .button {
    width: 100%;
    justify-content: center;
  }

  .button-group {
    flex-direction: column;
    width: 100%;
  }

  .button-group .button {
    width: 100%;
  }
}
