Investments - Change in unrealized gains and losses (Details) - USD ($)
$ in Thousands
3 Months Ended
Mar. 31, 2018
Mar. 31, 2017
Schedule of Available-for-sale Securities [Line Items]    
Unrealized holding gains (losses) on securities arising during the period, pre-tax $ (18,344) $ 10,664
Unrealized holding gains (losses) on securities arising during the period, tax effects 3,852 (3,733)
Unrealized holding gains (losses) on securities arising during period, net of tax (14,492) 6,932
Realized gains on securities sold, pre-tax (1,363) (519)
Realized gains on securities sold, tax effects (109) 182
Realized gains on securities sold, net of tax 409 (337)
Net impairment losses recognized in earnings (1,588) (10)
Impairment loss recognized in earnings, tax effects (334) (3)
Impairment loss recognized in earnings 1,255 6
Other Comprehensive Income (Loss), Available-for-sale Securities, Tax (3,410) 3,554
Change in unrealized gains (losses) on marketable securities, net, net of tax (12,828) 6,601
Fixed Maturities    
Schedule of Available-for-sale Securities [Line Items]    
Unrealized holding gains (losses) on securities arising during the period, pre-tax (18,346) 4,368
Realized gains on securities sold, pre-tax (519) (52)
Net impairment losses recognized in earnings 1,588 10
Other Comprehensive Income (Loss), Available-for-sale Securities Adjustment, before Tax (16,238) 4,429
Equity securities    
Schedule of Available-for-sale Securities [Line Items]    
Unrealized holding gains (losses) on securities arising during the period, pre-tax   6,294
Realized gains on securities sold, pre-tax   569
Net impairment losses recognized in earnings   0
Other Comprehensive Income (Loss), Available-for-sale Securities Adjustment, before Tax   5,725
Short-term investments    
Schedule of Available-for-sale Securities [Line Items]    
Unrealized holding gains (losses) on securities arising during the period, pre-tax 1 3
Realized gains on securities sold, pre-tax 1 1
Net impairment losses recognized in earnings 0 0
Other Comprehensive Income (Loss), Available-for-sale Securities Adjustment, before Tax $ 0 $ 1