/**
 * ═════════════════════════════════════════════════════════════════════════════════
 * buttons.css — Reusable Button System
 * ═════════════════════════════════════════════════════════════════════════════════
 *
 * PURPOSE:
 * Provides a consistent button system for all actions in the GSS application.
 * All buttons in the application should use these classes.
 *
 * AI GUIDELINES:
 * - NEVER create new button styles - USE these existing classes
 * - NEVER hardcode button colors - reference design tokens
 * - Combine base class (.btn) with variant classes (.btn--primary)
 * - Use size modifiers (.btn--sm, .btn--lg) for different contexts
 *
 * USAGE:
 * <button class="btn btn--primary">Primary Action</button>
 * <button class="btn btn--secondary">Secondary Action</button>
 * <button class="btn btn--ghost">Tertiary Action</button>
 * <button class="btn btn--danger">Delete</button>
 * <button class="btn btn--icon btn--primary"><svg/></button>
 *
 * @see README_AI_RULES.md Section 22 - Button Classes
 */

/* ═════════════════════════════════════════════════════════════════════════════════
   BASE BUTTON
   ─────────────────────────────────────────────────────────────────────────────────
   Foundation styles applied to all buttons.
   Do NOT use .btn alone - always combine with a variant.
   ═════════════════════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0 var(--space-xl);
  height: 40px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* ═════════════════════════════════════════════════════════════════════════════════
   SIZE MODIFIERS
   ─────────────────────────────────────────────────────────────────────────────────
   Adjust button height and padding for different contexts.
   ═════════════════════════════════════════════════════════════════════════════════ */

/* Small button - Use in tight spaces, table rows */
.btn--sm {
  height: 32px;
  padding: 0 var(--space-md);
  font-size: var(--font-size-xs);
}

/* Large button - Use for primary page actions */
.btn--lg {
  height: 48px;
  padding: 0 var(--space-2xl);
  font-size: var(--font-size-base);
}

/* ═════════════════════════════════════════════════════════════════════════════════
   PRIMARY VARIANT
   ─────────────────────────────────────────────────────────────────────────────────
   Main call-to-action button. Use for primary actions (Save, Submit, Create).
   Orange brand color with hover lift effect.
   ═════════════════════════════════════════════════════════════════════════════════ */
.btn--primary {
  background: var(--color-brand-orange);
  color: #FFFFFF;
}

.btn--primary:hover {
  background: var(--color-brand-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(243, 161, 43, 0.2);
}

.btn--primary:active {
  transform: translateY(0);
}

/* ═════════════════════════════════════════════════════════════════════════════════
   SECONDARY VARIANT
   ─────────────────────────────────────────────────────────────────────────────────
   Secondary action button. Use for Cancel, Back, or alternative actions.
   Light background with border.
   ═════════════════════════════════════════════════════════════════════════════════ */
.btn--secondary {
  background: var(--color-surface-card);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-medium);
}

.btn--secondary:hover {
  background: var(--color-surface-muted);
  border-color: var(--color-text-tertiary);
}

/* ═════════════════════════════════════════════════════════════════════════════════
   GHOST VARIANT
   ─────────────────────────────────────────────────────────────────────────────────
   Tertiary/ghost button. Use for low-emphasis actions (Learn More, View Details).
   Transparent background, visible on hover.
   ═════════════════════════════════════════════════════════════════════════════════ */
.btn--ghost {
  background: transparent;
  color: var(--color-text-secondary);
}

.btn--ghost:hover {
  background: var(--color-surface-muted);
  color: var(--color-text-primary);
}

/* ═════════════════════════════════════════════════════════════════════════════════
   DANGER VARIANT
   ─────────────────────────────────────────────────────────────────────────────────
   Destructive action button. Use for Delete, Remove, or irreversible actions.
   Red color to indicate warning.
   ═════════════════════════════════════════════════════════════════════════════════ */
.btn--danger {
  background: var(--color-danger-red);
  color: #FFFFFF;
}

.btn--danger:hover {
  background: #DC2626;
}

/* ═════════════════════════════════════════════════════════════════════════════════
   ICON BUTTON
   ─────────────────────────────────────────────────────────────────────────────────
   Square button for icon-only actions. Combine with variant class.
   Usage: .btn.btn--icon.btn--primary
   ═════════════════════════════════════════════════════════════════════════════════ */
.btn--icon {
  width: 40px;
  padding: 0;
}

.btn--icon.btn--sm {
  width: 32px;
}

/* ═════════════════════════════════════════════════════════════════════════════════
   DISABLED STATE
   ─────────────────────────────────────────────────────────────────────────────────
   Disabled buttons are faded and non-interactive.
   Apply via: <button disabled> or .disabled class
   ═════════════════════════════════════════════════════════════════════════════════ */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}