Annual report pursuant to Section 13 and 15(d)

Stock-Based Compensation - Additional Information (Details)

v3.8.0.1
Stock-Based Compensation - Additional Information (Details)
1 Months Ended 12 Months Ended
Aug. 31, 2017
USD ($)
solar_energy_system_install
$ / shares
shares
Aug. 31, 2015
USD ($)
shares
Jul. 31, 2015
shares
Mar. 31, 2015
shares
Dec. 31, 2017
USD ($)
$ / shares
shares
Dec. 31, 2016
USD ($)
$ / shares
shares
Dec. 31, 2015
USD ($)
$ / shares
shares
Aug. 31, 2014
shares
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Common stock, shares outstanding         107,350,000 104,321,000    
Common stock reserved for issuance         34,425,000 30,595,000    
Unvested exercisable shares         276,660 276,660    
Unvested exercisable shares, vesting period         1 year 2 months 12 days      
Unvested options exercised         0 0    
Unvested options subject to repurchase, outstanding           0    
Weighted-average grant-date fair value of stock options granted | $ / shares         $ 2.57 $ 2.26 $ 4.56  
Total intrinsic value of options exercised | $         $ 2,300,000 $ 6,300,000 $ 8,100,000  
Total fair value of options vested | $         7,500,000 9,800,000 9,100,000  
Compensation expense recognized | $         22,042,000 18,723,000 $ 15,823,000  
Total unrecognized compensation cost | $         $ 34,800,000 $ 29,400,000    
Weighted-average period of recognition         2 years 9 months 12 days 2 years 7 months 6 days    
Restricted Stock Units (RSUs)                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Common stock reserved for issuance         5,330,000 4,106,000    
Stock option plan, number of shares granted         3,540,000 3,363,000 947,342  
Vesting starting period         2014-08      
Stock Options                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Common stock reserved for issuance         16,268,000 12,897,000    
Outstanding stock options         80,000      
Performance-based Plan                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Compensation expense recognized | $         $ 800,000 $ 1,200,000    
Expire in August 2017 | Restricted Stock Units (RSUs)                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Expiration period of RSUs         2017-08      
Expire in September 2017 | Restricted Stock Units (RSUs)                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Expiration period of RSUs         2017-09      
Expire in September 2019 | Restricted Stock Units (RSUs)                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Expiration period of RSUs         2019-09      
MEC 2009 Stock Plan                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Common stock, shares outstanding         516,386      
2013 Equity Incentive Plan                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Additional common stock shares reserved for issuance       3,000,000        
Common stock reserved for issuance       4,500,000        
Stock options vesting period       4 years        
Stock option plan, number of shares granted         0      
2013 Equity Incentive Plan | Maximum                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Common stock reserved for issuance       8,044,829        
Stock options granted, expiration period       10 years        
2013 Equity Incentive Plan | End of One Year                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Vesting award percentage       25.00%        
2013 Equity Incentive Plan | Monthly Over the Remaining Three Years                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Vesting award percentage       75.00%        
2014 Equity Incentive Plan                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Common stock reserved for issuance     1,197,342         947,342
2014 Equity Incentive Plan | Restricted Stock Units (RSUs)                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Stock option plan, number of shares granted     1,197,342          
2015 Equity Incentive Plan                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Common stock reserved for issuance     11,400,000   8,857,000 11,081,000    
Stock options vesting period     4 years          
Minimum annual automatic increase included in common stock reserved for future issuance as of first day of each fiscal year     10,000,000          
Minimum percentage of annual automatic increase included in common stock reserved for future issuance as of last day of immediately preceding fiscal year     4.00%          
Terms of shares available for issuance         The automatic increase of the number of shares available for issuance under the 2015 Plan is equal to the least of 10 million shares, 4% of the outstanding shares of common stock as of the last day of our immediately preceding fiscal year or such other amount as the Board of Directors may determine.      
Additional common stock shares reserved for issuance         4,172,883 4,051,282    
2015 Equity Incentive Plan | Restricted Stock Units (RSUs)                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Stock options vesting period     4 years          
Outstanding RSUs         350,000      
2015 Equity Incentive Plan | Maximum                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Common stock reserved for issuance     15,439,334          
Stock options granted, expiration period     10 years          
2015 Equity Incentive Plan | End of One Year                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Vesting award percentage     25.00%          
2015 Equity Incentive Plan | End of One Year | Restricted Stock Units (RSUs)                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Vesting award percentage     25.00%          
2015 Equity Incentive Plan | Monthly Over the Remaining Three Years                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Vesting award percentage     75.00%          
2015 Equity Incentive Plan | Quarterly Over the Remaining Three Years | Restricted Stock Units (RSUs)                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Vesting award percentage     75.00%          
Employee Stock Purchase Plan                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Common stock reserved for issuance   1,000,000            
Annual automatic increase included in common stock reserved for future issuance as of last day of immediately preceding fiscal year | $   $ 5,000,000            
Minimum percentage of annual automatic increase included in common stock reserved for future issuance as of last day of immediately preceding fiscal year   2.00%            
Terms of shares available for issuance         The ESPP provides for an automatic increase of the number of shares available for issuance under the ESPP on the first day of each fiscal year beginning on January 1, 2016, equal to the least of 5 million shares, 2% of the outstanding shares of our common stock on the last day of the immediately preceding fiscal year, or such other amount as may be determined by the Board of Directors.      
Additional common stock shares reserved for issuance         2,086,416 2,025,641    
Offering period         24 months      
Maximum percentage in payroll deductions to acquire shares of common stock   15.00%            
Maximum deductible fair market value of shares available for employee to purchase per calendar year | $   $ 25,000            
Maximum number of shares available for employee to purchase per offering period   10,000            
Term of offering period         Eligible employees are offered shares bi-annually through two six month offering periods, which begin on the first trading day on or after May 15 and November 15 of each year.      
Warrant, Comcast Corporation                
Share-based Compensation Arrangement by Share-based Payment Award [Line Items]                
Warrant, term 40 months              
Warrant, number of securities called by warrants 11,793,355              
Warrant, exercise price (in dollars per share) | $ / shares $ 0.01              
Warrant, vesting percentage 50.05%              
Warrant, milestone one, solar energy systems | solar_energy_system_install 30,000              
Warrant, milestone, marketing and sales dollars | $ $ 10,000,000              
Warrant, vesting term 5 years              
Warrant, milestone two, solar energy systems | solar_energy_system_install 6,000