/**
 * Custom Gaming Buttons - Nitrado Style
 * 100% custom, zero Bootstrap influence
 */

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

.btn-gaming {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: 1;
  border-radius: var(--btn-radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
  white-space: nowrap;
  user-select: none;
}

.btn-gaming:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-gaming:active {
  transform: translateY(1px);
}

/* ========================================
   PRIMARY BUTTON (Blue gradient with glow)
   ======================================== */

.btn-gaming-primary {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: white;
  box-shadow: var(--shadow-glow-primary);
}

.btn-gaming-primary:hover {
  background: linear-gradient(135deg, var(--brand-primary-hover), var(--brand-secondary-hover));
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.6);
  transform: translateY(-2px);
}

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

/* ========================================
   OUTLINE BUTTON (Transparent with border)
   ======================================== */

.btn-gaming-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border-primary);
}

.btn-gaming-outline:hover {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  background: rgba(59, 130, 246, 0.1);
  box-shadow: var(--shadow-glow-primary);
}

/* ========================================
   SUCCESS BUTTON (Green - for start/confirm)
   ======================================== */

.btn-gaming-success {
  background: var(--action-success);
  color: white;
}

.btn-gaming-success:hover {
  background: #059669;
  box-shadow: var(--shadow-glow-success);
  transform: translateY(-2px);
}

/* ========================================
   DANGER BUTTON (Red - for stop/delete)
   ======================================== */

.btn-gaming-danger {
  background: var(--action-danger);
  color: white;
}

.btn-gaming-danger:hover {
  background: #dc2626;
  box-shadow: var(--shadow-glow-danger);
  transform: translateY(-2px);
}

/* ========================================
   WARNING BUTTON (Orange - for restart)
   ======================================== */

.btn-gaming-warning {
  background: var(--action-warning);
  color: white;
}

.btn-gaming-warning:hover {
  background: #d97706;
  box-shadow: var(--shadow-glow-warning);
  transform: translateY(-2px);
}

/* ========================================
   GHOST BUTTON (Minimal, transparent)
   ======================================== */

.btn-gaming-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: var(--space-2) var(--space-4);
}

.btn-gaming-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* ========================================
   ICON BUTTON (Square, icon only)
   ======================================== */

.btn-gaming-icon {
  padding: var(--space-3);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  width: 40px;
  height: 40px;
}

.btn-gaming-icon:hover {
  background: var(--bg-hover);
  color: var(--brand-primary);
}

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

/* Small */
.btn-gaming-sm {
  padding: var(--btn-padding-y-sm) var(--btn-padding-x-sm);
  font-size: var(--text-sm);
}

.btn-gaming-icon-sm {
  width: 32px;
  height: 32px;
  padding: var(--space-2);
}

/* Large */
.btn-gaming-lg {
  padding: var(--btn-padding-y-lg) var(--btn-padding-x-lg);
  font-size: var(--text-lg);
}

.btn-gaming-icon-lg {
  width: 48px;
  height: 48px;
  padding: var(--space-4);
}

/* Extra Large */
.btn-gaming-xl {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-xl);
}

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

.btn-gaming i,
.btn-gaming svg {
  width: 16px;
  height: 16px;
}

.btn-gaming-sm i,
.btn-gaming-sm svg {
  width: 14px;
  height: 14px;
}

.btn-gaming-lg i,
.btn-gaming-lg svg {
  width: 18px;
  height: 18px;
}

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

.btn-group-gaming {
  display: inline-flex;
  gap: var(--space-2);
}

.btn-group-gaming-attached {
  display: inline-flex;
}

.btn-group-gaming-attached .btn-gaming {
  border-radius: 0;
}

.btn-group-gaming-attached .btn-gaming:first-child {
  border-top-left-radius: var(--btn-radius);
  border-bottom-left-radius: var(--btn-radius);
}

.btn-group-gaming-attached .btn-gaming:last-child {
  border-top-right-radius: var(--btn-radius);
  border-bottom-right-radius: var(--btn-radius);
}

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

.btn-gaming-full {
  width: 100%;
}

/* ========================================
   LOADING STATE
   ======================================== */

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

.btn-gaming-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid white;
  border-radius: 50%;
  border-top-color: transparent;
  animation: btn-spin 0.6s linear infinite;
}

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

/* ========================================
   BUTTON WITH BADGE
   ======================================== */

.btn-gaming-with-badge {
  position: relative;
}

.btn-gaming-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--action-danger);
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}

/* ========================================
   PULSE EFFECT (for important CTAs)
   ======================================== */

.btn-gaming-pulse {
  animation: btn-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes btn-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

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

@media (max-width: 640px) {
  .btn-gaming-responsive {
    width: 100%;
  }

  .btn-group-gaming-responsive {
    flex-direction: column;
    width: 100%;
  }

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