Short-Term and Long-Term Investments (Details) - USD ($) $ in Thousands |
Mar. 31, 2018 |
Dec. 31, 2017 |
| Schedule of Available-for-sale Securities |
|
|
| Amortized Cost |
$ 400,662
|
$ 375,815
|
| Unrealized Gains |
0
|
3
|
| Unrealized Losses |
(1,513)
|
(667)
|
| Fair Value |
399,149
|
375,151
|
| Short-term investments |
|
|
| Schedule of Available-for-sale Securities |
|
|
| Amortized Cost |
242,192
|
226,994
|
| Unrealized Gains |
0
|
3
|
| Unrealized Losses |
(540)
|
(210)
|
| Fair Value |
241,652
|
226,787
|
| Short-term investments | Commercial Paper, Not Included with Cash and Cash Equivalents [Member] |
|
|
| Schedule of Available-for-sale Securities |
|
|
| Amortized Cost |
|
9,970
|
| Unrealized Gains |
|
0
|
| Unrealized Losses |
|
0
|
| Fair Value |
|
9,970
|
| Short-term investments | U.S. treasury securities |
|
|
| Schedule of Available-for-sale Securities |
|
|
| Amortized Cost |
158,727
|
160,206
|
| Unrealized Gains |
0
|
0
|
| Unrealized Losses |
(255)
|
(121)
|
| Fair Value |
158,472
|
160,085
|
| Short-term investments | U.S. agency securities |
|
|
| Schedule of Available-for-sale Securities |
|
|
| Amortized Cost |
21,407
|
9,917
|
| Unrealized Gains |
0
|
0
|
| Unrealized Losses |
(94)
|
(24)
|
| Fair Value |
21,313
|
9,893
|
| Short-term investments | Corporate bonds |
|
|
| Schedule of Available-for-sale Securities |
|
|
| Amortized Cost |
62,058
|
46,901
|
| Unrealized Gains |
0
|
3
|
| Unrealized Losses |
(191)
|
(65)
|
| Fair Value |
61,867
|
46,839
|
| Long-term investments |
|
|
| Schedule of Available-for-sale Securities |
|
|
| Amortized Cost |
158,470
|
148,821
|
| Unrealized Gains |
0
|
0
|
| Unrealized Losses |
(973)
|
(457)
|
| Fair Value |
157,497
|
148,364
|
| Long-term investments | U.S. treasury securities |
|
|
| Schedule of Available-for-sale Securities |
|
|
| Amortized Cost |
99,562
|
79,371
|
| Unrealized Gains |
0
|
0
|
| Unrealized Losses |
(502)
|
(202)
|
| Fair Value |
99,060
|
79,169
|
| Long-term investments | U.S. agency securities |
|
|
| Schedule of Available-for-sale Securities |
|
|
| Amortized Cost |
8,576
|
18,570
|
| Unrealized Gains |
0
|
0
|
| Unrealized Losses |
(71)
|
(102)
|
| Fair Value |
8,505
|
18,468
|
| Long-term investments | Corporate bonds |
|
|
| Schedule of Available-for-sale Securities |
|
|
| Amortized Cost |
50,332
|
50,880
|
| Unrealized Gains |
0
|
0
|
| Unrealized Losses |
(400)
|
(153)
|
| Fair Value |
$ 49,932
|
$ 50,727
|