Debt (Details) $ / shares in Units, $ in Thousands |
1 Months Ended |
3 Months Ended |
|
|
|
|
Mar. 31, 2021
USD ($)
$ / shares
|
Jul. 31, 2020
USD ($)
|
May 31, 2020
USD ($)
|
Jul. 31, 2019
USD ($)
|
May 31, 2021
USD ($)
$ / shares
$ / derivative
|
May 31, 2020
USD ($)
|
Feb. 28, 2021
USD ($)
|
Nov. 06, 2020
USD ($)
|
Jan. 30, 2017
USD ($)
|
| Debt Instrument [Line Items] |
|
|
|
|
|
|
|
|
|
| Debt issuance cost |
|
|
|
|
$ 8,101
|
|
|
|
|
| Long-term Line of Credit |
|
|
|
|
1,084
|
|
$ 1,084
|
|
|
| Repayment of accrued interest in kind |
|
|
|
|
379
|
$ 141
|
|
|
|
| Other Assets |
|
|
|
|
|
|
|
|
|
| Debt Instrument [Line Items] |
|
|
|
|
|
|
|
|
|
| Deferred financing fees |
|
|
|
|
$ 23
|
|
$ 93
|
|
|
| Term Loan |
|
|
|
|
|
|
|
|
|
| Debt Instrument [Line Items] |
|
|
|
|
|
|
|
|
|
| Debt instrument, face amount |
|
|
|
|
|
|
|
|
$ 20,000
|
| Maximum borrowing capacity |
|
|
$ 24,500
|
$ 22,000
|
|
$ 24,500
|
|
|
$ 20,000
|
| Interest Rate |
|
|
8.00%
|
10.00%
|
11.75%
|
8.00%
|
|
|
|
| Interest expenses |
|
|
|
|
$ 0
|
$ 794
|
|
|
|
| Amortization of debt discount |
|
|
|
|
|
81
|
|
|
|
| Additional Borrowing Capacity |
|
|
$ 2,500
|
$ 2,000
|
|
2,500
|
|
|
|
| Interest Payable in Kind Accrued Rate |
|
|
4.50%
|
2.00%
|
|
|
|
|
|
| Debt instrument exit fee |
|
|
|
1.00%
|
|
|
|
|
|
| Repayment of principle portion of debt |
|
$ 24,500
|
|
|
|
|
|
|
|
| Repayment of accrued interest in kind |
|
600
|
|
|
|
|
|
|
|
| Debt instrument end charges |
|
251
|
|
|
|
|
|
|
|
| Debt instrument prepayment fee |
|
$ 502
|
|
|
|
|
|
|
|
| Term Loan | Prepayment of Loan Occur on or Before December 31, 2020 |
|
|
|
|
|
|
|
|
|
| Debt Instrument [Line Items] |
|
|
|
|
|
|
|
|
|
| Debt instrument exit fee |
|
|
2.00%
|
|
|
|
|
|
|
| Term Loan | Prepayment of Loan Occur on or After December 31, 2020 |
|
|
|
|
|
|
|
|
|
| Debt Instrument [Line Items] |
|
|
|
|
|
|
|
|
|
| Debt instrument exit fee |
|
|
0.50%
|
|
|
|
|
|
|
| Convertible Senior Notes |
|
|
|
|
|
|
|
|
|
| Debt Instrument [Line Items] |
|
|
|
|
|
|
|
|
|
| Debt instrument, face amount |
$ 287,500
|
|
|
|
|
|
|
|
|
| Interest Rate |
0.50%
|
|
|
|
|
|
|
|
|
| Conversion rate | $ / shares |
$ 19.8088
|
|
|
|
$ 50.48
|
|
|
|
|
| Principal amount denomination |
$ 1
|
|
|
|
|
|
|
|
|
| Threshold percentage of stock price trigger |
130.00%
|
|
|
|
|
|
|
|
|
| Threshold trading days |
20
|
|
|
|
|
|
|
|
|
| Threshold consecutive trading days |
30
|
|
|
|
|
|
|
|
|
| Percentage of principal amount redeemed |
100.00%
|
|
|
|
|
|
|
|
|
| Cap price | $ / derivative |
|
|
|
|
76.20
|
|
|
|
|
| Proceeds from notes payable |
$ 279,132
|
|
|
|
|
|
|
|
|
| Payment of costs of the capped call transactions |
34,443
|
|
|
|
|
|
|
|
|
| Cost which includes allocated pro-rata on capped call costs |
8,428
|
|
|
|
|
|
|
|
|
| Long-term Debt |
|
|
|
|
$ 287,500
|
|
|
|
|
| Outstanding debt |
|
|
|
|
279,434
|
|
|
|
|
| Debt issuance cost |
|
|
|
|
8,066
|
|
|
|
|
| Interest expenses |
|
|
|
|
553
|
|
|
|
|
| Amortization of debt discount |
|
|
|
|
$ 302
|
|
|
|
|
| Amount allocated to capped call |
$ 60
|
|
|
|
|
|
|
|
|
| Number of business day |
5
|
|
|
|
|
|
|
|
|
| Number of consecutive trading day |
10
|
|
|
|
|
|
|
|
|
| Percentage of average conversion value of note |
98.00%
|
|
|
|
|
|
|
|
|
| Effective interest rate |
|
|
|
|
0.60%
|
|
|
|
|
| Percentage of premium over last reported sale price |
|
|
|
|
100.00%
|
|
|
|
|
| Amount allocated to the Notes |
$ 8,368
|
|
|
|
|
|
|
|
|
| Revolving Credit Facility, 2019 |
|
|
|
|
|
|
|
|
|
| Debt Instrument [Line Items] |
|
|
|
|
|
|
|
|
|
| Maximum borrowing capacity |
|
|
|
$ 80,000
|
|
|
|
$ 50,000
|
|
| Long-term Debt |
|
|
|
|
$ 78,916
|
|
|
|
|
| Outstanding debt |
|
|
|
|
0
|
|
|
|
|
| Debt issuance cost |
|
|
|
|
543
|
|
|
|
|
| Interest expenses |
|
|
|
|
121
|
557
|
|
|
|
| Amortization of deferred financing fees |
|
|
|
|
$ 70
|
$ 60
|
|
|
|
| Revolving Credit Facility, 2019 | London Interbank Offered Rate |
|
|
|
|
|
|
|
|
|
| Debt Instrument [Line Items] |
|
|
|
|
|
|
|
|
|
| Debt Instrument, Basis Spread on Variable Rate |
|
|
|
|
3.50%
|
|
|
|
|
| Revolving Credit Facility, 2019 | Base Rate |
|
|
|
|
|
|
|
|
|
| Debt Instrument [Line Items] |
|
|
|
|
|
|
|
|
|
| Debt Instrument, Basis Spread on Variable Rate |
|
|
|
|
2.50%
|
|
|
|
|