Commitments and contingencies -Narrative (Details) - USD ($) $ in Thousands |
12 Months Ended |
|
|
Dec. 31, 2020 |
Dec. 31, 2019 |
Dec. 31, 2018 |
Jan. 01, 2020 |
Dec. 31, 2017 |
| Loss Contingencies [Line Items] |
|
|
|
|
|
| Fixed rate loan commitments |
$ 1,070,000
|
|
|
|
|
| Floating rate loan commitments |
1,650,000
|
|
|
|
|
| Cumulative effect adjustment of adoption of accounting principle |
(1,291,382)
|
$ (762,329)
|
$ (671,857)
|
|
|
| Total principal amount of loans repurchased or indemnified |
9,171
|
6,475
|
6,646
|
|
|
| Cumulative effect of change in accounting principle |
|
|
|
|
|
| Loss Contingencies [Line Items] |
|
|
|
|
|
| Cumulative effect adjustment of adoption of accounting principle |
|
25,018
|
1,309
|
|
$ 0
|
| Unfunded Commitments |
|
|
|
|
|
| Loss Contingencies [Line Items] |
|
|
|
|
|
| Impact of CECL adoption on provision for credit losses on unfunded commitments |
|
|
|
$ 2,947
|
|
| Retained earnings |
|
|
|
|
|
| Loss Contingencies [Line Items] |
|
|
|
|
|
| Cumulative effect adjustment of adoption of accounting principle |
$ (317,625)
|
$ (293,524)
|
(221,213)
|
|
|
| Retained earnings | Cumulative effect of change in accounting principle |
|
|
|
|
|
| Loss Contingencies [Line Items] |
|
|
|
|
|
| Cumulative effect adjustment of adoption of accounting principle |
|
|
$ 1,309
|
$ 25,018
|
$ 109
|