/* ============================================
   BUTTONS - Style cho các nút bấm
   Chức năng: Primary, secondary, success, danger buttons
   ============================================ */

/* Base Button */
.btn {
  padding: var(--spacing-sm) var(--spacing-md);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--font-size-base);
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Primary Button */
.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #0a5bb8;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 110, 215, 0.3);
}

/* Secondary Button */
.btn-secondary {
  background: #f0f6ff;
  color: var(--accent);
  border: 2px solid #d6e9ff;
}

.btn-secondary:hover:not(:disabled) {
  background: #e0ecff;
}

/* Success Button */
.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Danger Button */
.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Button Group */
.btn-group {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

/* Small Button */
.btn.small {
  padding: 6px 8px;
  font-size: var(--font-size-xs);
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  .btn {
    min-height: 44px; /* Touch-friendly - tối thiểu 44x44px */
    padding: 12px 20px;
    font-size: 15px;
    width: 100%;
    max-width: 100%;
  }
  
  .btn.small {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .btn-group {
    flex-direction: row;
    width: 100%;
    gap: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr !important;
  }
  
  /* Nút Tạo QR Code giữ nguyên full width */
  .btn-group:has(#generateBtn) {
    grid-template-columns: 1fr !important;
  }
  
  .btn-group .btn {
    width: 100%;
    margin: 0;
  }
  
  /* Trên màn hình rất nhỏ */
  @media (max-width: 480px) {
    .btn {
      padding: 10px 16px;
      font-size: 14px;
    }
  }
}

