Leases (Details) - USD ($)
$ in Thousands
12 Months Ended
Dec. 31, 2021
Dec. 31, 2020
Dec. 31, 2019
Components of lease cost      
Operating lease cost $ 7,625 $ 4,902 $ 4,693
Short-term lease cost 4,776 3,167 2,663
Variable lease cost 5,287 4,479 4,172
Total lease cost 17,688 12,548 11,528
Cash paid for amounts included in the measurement of lease liabilities:      
Cash paid for operating leases (8,948) (5,522) (4,683)
Operating lease assets obtained in exchange for operating lease liabilities 65,459 $ 1,675 $ 944
Maturities of lease liabilities under operating leases, Twelve Months Ended June 30,      
2022 11,271    
2023 10,329    
2024 10,861    
2025 10,413    
2026 and thereafter 44,073    
Total future payments for recognized leasing assets 86,947    
Less: leases not commenced yet 6,520    
Less: imputed interest 20,466    
Total lease liabilities $ 59,961    
Average remaining lease term 11 years 9 months 18 days    
Weighted-average discount rate (as a percent) 5.00%    
Lease contracts that has been entered into but not yet commenced $ 6,500