| CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE LOSS (Parenthetical) - USD ($) $ in Thousands | 3 Months Ended | 12 Months Ended | 
|---|---|---|
| Mar. 31, 2018 | Dec. 31, 2017 | |
| CONDENSED CONSOLIDATED STATEMENTS OF COMPREHENSIVE LOSS | ||
| Foreign currency translation adjustments, tax | $ 0 | $ 0 | 
| Unrealized holding losses on available-for-sale debt securities, tax | 0 | 0 | 
| Reclassification from accumulated other comprehensive income of losses on available-for-sale debt securities included in net income, tax | $ 0 | $ 0 | 
| 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://www.xbrl.org/2003/role/presentationRef 
 | 
| X | ||||||||||
| 
- Definition Amount of tax expense (benefit) of reclassification adjustment from accumulated other comprehensive income for unrealized gain (loss) realized upon the sale of available-for-sale securities. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
 | 
| X | ||||||||||
| 
- Definition Amount of tax expense (benefit) before reclassification adjustments of unrealized holding gain (loss) on available-for-sale securities. Reference 1: http://www.xbrl.org/2003/role/presentationRef 
 | 
| X | ||||||||||
| 
- References No definition available. 
 |