/**
 * JYT2.com - Button Styles
 * Industrial Noir Theme - Fire & Electric
 */

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-heading);
  font-size: var(--text-body);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ========================================
   PRIMARY - Fire Gradient
   ======================================== */

.btn-primary {
  background: var(--gradient-fire);
  color: #000;
  box-shadow:
    0 4px 24px rgba(var(--primary-rgb), 0.4),
    0 0 0 0 transparent;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 32px rgba(var(--primary-rgb), 0.5),
    0 0 60px rgba(var(--primary-rgb), 0.3);
}

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

/* Fire Pulse Animation */
.btn-primary.fire-pulse {
  animation: fire-pulse 2s ease-in-out infinite;
}

.btn-primary.fire-pulse:hover {
  animation: none;
}

/* ========================================
   SECONDARY - Electric Outline
   ======================================== */

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 0 transparent;
}

.btn-secondary:hover {
  background: rgba(var(--accent-rgb), 0.1);
  box-shadow:
    0 0 20px rgba(var(--accent-rgb), 0.3),
    inset 0 0 20px rgba(var(--accent-rgb), 0.1);
  transform: translateY(-2px);
}

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

/* ========================================
   TERTIARY - Ghost
   ======================================== */

.btn-tertiary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-tertiary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
}

/* ========================================
   DISCORD BUTTON
   ======================================== */

.btn-discord {
  background: #5865F2;
  color: #FFFFFF;
  box-shadow: 0 4px 20px rgba(88, 101, 242, 0.3);
}

.btn-discord:hover {
  background: #4752C4;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(88, 101, 242, 0.4);
}

.btn-discord .icon {
  width: 20px;
  height: 20px;
}

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

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-small);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-body-lg);
}

.btn-xl {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-h4);
  border-radius: var(--radius-lg);
}

/* ========================================
   BUTTON WITH ICON
   ======================================== */

.btn .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-lg .icon {
  width: 20px;
  height: 20px;
}

.btn-xl .icon {
  width: 24px;
  height: 24px;
}

/* ========================================
   BUTTON STATES
   ======================================== */

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}

.btn-primary.loading::after {
  border-color: #000;
  border-right-color: transparent;
}

@keyframes btn-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   FULL WIDTH
   ======================================== */

.btn-full {
  width: 100%;
}

/* ========================================
   BUTTON GROUP
   ======================================== */

.btn-group {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.btn-group.center {
  justify-content: center;
}

@media (max-width: 576px) {
  .btn-group {
    flex-direction: column;
  }

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

/* ========================================
   ICON BUTTON
   ======================================== */

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-icon.btn-sm {
  width: 36px;
  height: 36px;
}

.btn-icon.btn-lg {
  width: 52px;
  height: 52px;
}

/* ========================================
   LINK STYLE BUTTON
   ======================================== */

.btn-link {
  background: transparent;
  color: var(--primary);
  padding: 0;
  text-transform: none;
  font-weight: 600;
}

.btn-link:hover {
  text-decoration: underline;
}

/* ========================================
   REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .btn {
    transition: none;
  }

  .btn-primary.fire-pulse {
    animation: none;
  }

  .btn.loading::after {
    animation: none;
  }
}
