CONSOLIDATED STATEMENTS OF CHANGES IN SHAREHOLDERS' EQUITY - USD ($) $ in Thousands | Total | Cumulative Effect, Period of Adoption, Adjustment | Ordinary shares | Additional paid-in capital | Additional paid-in capitalCumulative Effect, Period of Adoption, Adjustment | Accumulated other comprehensive loss | Retained earnings (accumulated deficit) | Retained earnings (accumulated deficit)Cumulative Effect, Period of Adoption, Adjustment |
Beginning balance (in shares) at Dec. 31, 2019 | | | 99,528,435 | | | | | |
Beginning balance at Dec. 31, 2019 | $ 217,790 | | | $ 871,442 | | $ (2,767) | $ (650,885) | |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Share-based compensation to employees | 16,557 | | | 16,557 | | | | |
Exercise of options and vested RSUs (in shares) | | | 834,538 | | | | | |
Exercise of options and vested RSUs | 4,511 | | | 4,511 | | | | |
Other comprehensive income (loss), net of tax benefit | (862) | | | | | (862) | | |
Net income (loss) | 3,952 | | | | | | 3,952 | |
Ending balance (in shares) at Mar. 31, 2020 | | | 100,362,973 | | | | | |
Ending balance at Mar. 31, 2020 | 241,948 | | | 892,510 | | (3,629) | (646,933) | |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Other comprehensive income (loss), tax benefit | 0 | | | | | | | |
Beginning balance (in shares) at Dec. 31, 2019 | | | 99,528,435 | | | | | |
Beginning balance at Dec. 31, 2019 | 217,790 | | | 871,442 | | (2,767) | (650,885) | |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Net income (loss) | 14,891 | | | | | | | |
Ending balance (in shares) at Sep. 30, 2020 | | | 101,728,327 | | | | | |
Ending balance at Sep. 30, 2020 | 307,037 | | | 946,267 | | (3,236) | (635,994) | |
Beginning balance (in shares) at Dec. 31, 2019 | | | 99,528,435 | | | | | |
Beginning balance at Dec. 31, 2019 | $ 217,790 | | | 871,442 | | (2,767) | (650,885) | |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Accounting standards update [extensible enumeration] | Accounting Standards Update 2020-06 [Member] | | | | | | | |
Net income (loss) | $ 19,808 | | | | | | | |
Ending balance (in shares) at Dec. 31, 2020 | | | 102,334,276 | | | | | |
Ending balance at Dec. 31, 2020 | 476,526 | $ (128,972) | | 1,111,435 | $ (132,474) | (3,832) | (631,077) | $ 3,502 |
Beginning balance (in shares) at Mar. 31, 2020 | | | 100,362,973 | | | | | |
Beginning balance at Mar. 31, 2020 | 241,948 | | | 892,510 | | (3,629) | (646,933) | |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Share-based compensation to employees | 18,770 | | | 18,770 | | | | |
Proceeds from issuance of shares (in shares) | | | 33,075 | | | | | |
Proceeds from issuance of shares | 1,667 | | | 1,667 | | | | |
Exercise of options and warrants and vested RSUs (in shares) | | | 624,673 | | | | | |
Exercise of options and vested RSUs | 3,685 | | | 3,685 | | | | |
Other comprehensive income (loss), net of tax benefit | 97 | | | | | 97 | | |
Net income (loss) | 1,655 | | | | | | 1,655 | |
Ending balance (in shares) at Jun. 30, 2020 | | | 101,020,721 | | | | | |
Ending balance at Jun. 30, 2020 | 267,822 | | | 916,632 | | (3,532) | (645,278) | |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Other comprehensive income (loss), tax benefit | 0 | | | | | | | |
Share-based compensation to employees | 20,121 | | | 20,121 | | | | |
Exercise of options and warrants and vested RSUs (in shares) | | | 707,606 | | | | | |
Exercise of options and vested RSUs | 9,514 | | | 9,514 | | | | |
Other comprehensive income (loss), net of tax benefit | 296 | | | | | 296 | | |
Net income (loss) | 9,284 | | | | | | 9,284 | |
Ending balance (in shares) at Sep. 30, 2020 | | | 101,728,327 | | | | | |
Ending balance at Sep. 30, 2020 | 307,037 | | | 946,267 | | (3,236) | (635,994) | |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Other comprehensive income (loss), tax benefit | 0 | | | | | | | |
Beginning balance (in shares) at Dec. 31, 2020 | | | 102,334,276 | | | | | |
Beginning balance at Dec. 31, 2020 | 476,526 | (128,972) | | 1,111,435 | (132,474) | (3,832) | (631,077) | 3,502 |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Share-based compensation to employees | 18,863 | | | 18,863 | | | | |
Exercise of options and vested RSUs (in shares) | | | 853,184 | | | | | |
Exercise of options and vested RSUs | 7,961 | | | 7,961 | | | | |
Other comprehensive income (loss), net of tax benefit | 1,884 | | | | | 1,884 | | |
Net income (loss) | (4,128) | | | | | | (4,128) | |
Ending balance (in shares) at Mar. 31, 2021 | | | 103,187,460 | | | | | |
Ending balance at Mar. 31, 2021 | 372,134 | | | 1,005,785 | | (1,948) | (631,703) | |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Other comprehensive income (loss), tax benefit | 0 | | | | | | | |
Beginning balance (in shares) at Dec. 31, 2020 | | | 102,334,276 | | | | | |
Beginning balance at Dec. 31, 2020 | 476,526 | $ (128,972) | | 1,111,435 | $ (132,474) | (3,832) | (631,077) | $ 3,502 |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Net income (loss) | (31,893) | | | | | | | |
Ending balance (in shares) at Sep. 30, 2021 | | | 103,817,566 | | | | | |
Ending balance at Sep. 30, 2021 | 413,164 | | | 1,073,532 | | (900) | (659,468) | |
Beginning balance (in shares) at Mar. 31, 2021 | | | 103,187,460 | | | | | |
Beginning balance at Mar. 31, 2021 | 372,134 | | | 1,005,785 | | (1,948) | (631,703) | |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Share-based compensation to employees | 27,881 | | | 27,881 | | | | |
Exercise of options and vested RSUs (in shares) | | | 436,487 | | | | | |
Exercise of options and vested RSUs | 8,695 | | | 8,695 | | | | |
Proceeds from issuance of shares (in shares) | | | 17,291 | | | | | |
Proceeds from issuance of shares | 2,371 | | | 2,371 | | | | |
Other comprehensive income (loss), net of tax benefit | 829 | | | | | 829 | | |
Net income (loss) | (14,641) | | | | | | (14,641) | |
Ending balance (in shares) at Jun. 30, 2021 | | | 103,641,238 | | | | | |
Ending balance at Jun. 30, 2021 | 397,269 | | | 1,044,732 | | (1,119) | (646,344) | |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Other comprehensive income (loss), tax benefit | 0 | | | | | | | |
Share-based compensation to employees | 25,758 | | | 25,758 | | | | |
Exercise of options and vested RSUs (in shares) | | | 176,328 | | | | | |
Exercise of options and vested RSUs | 3,042 | | | 3,042 | | | | |
Other comprehensive income (loss), net of tax benefit | 219 | | | | | 219 | | |
Net income (loss) | (13,124) | | | | | | (13,124) | |
Ending balance (in shares) at Sep. 30, 2021 | | | 103,817,566 | | | | | |
Ending balance at Sep. 30, 2021 | 413,164 | | | $ 1,073,532 | | $ (900) | $ (659,468) | |
Increase (Decrease) in Stockholders' Equity [Roll Forward] | | | | | | | | |
Other comprehensive income (loss), tax benefit | $ 0 | | | | | | | |