| CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE LOSS (unaudited) (Parenthetical) - USD ($) $ in Thousands | 3 Months Ended | 6 Months Ended | ||
|---|---|---|---|---|
| Jun. 30, 2021 | Jun. 30, 2020 | Jun. 30, 2021 | Jun. 30, 2020 | |
| Foreign currency translation adjustment, tax | $ 63 | $ (150) | $ (680) | $ 211 | 
| Services | ||||
| Cost of revenue, depreciation, depletion, amortization and accretion | 17,861 | 21,750 | 36,850 | 45,305 | 
| Products | ||||
| Cost of revenue, depreciation, depletion, amortization and accretion | 2,384 | 2,346 | 4,521 | 4,654 | 
| Related parties | Services | ||||
| Cost of revenue, depreciation, depletion, amortization and accretion | $ 0 | $ 0 | $ 0 | $ 0 | 
| X | ||||||||||
| 
- Definition Amount of expense for allocation of cost of tangible and intangible assets over their useful lives directly used in production of good and rendering of service. Reference 1: http://www.xbrl.org/2009/role/commonPracticeRef 
 | 
| X | ||||||||||
| 
- Definition Amount of tax expense (benefit), after reclassification adjustments of gain (loss) on foreign currency translation adjustments, foreign currency transactions designated and effective as economic hedges of a net investment in a foreign entity and intra-entity foreign currency transactions that are of a long-term-investment nature, attributable to parent entity. Reference 1: http://fasb.org/us-gaap/role/ref/legacyRef 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 | 
| X | ||||||||||
| 
- Details 
 |