/* ---------------------------------------------
Project:TS Index pages printable
Subject: global stylesheet for all print media related attributes for TS index pages
Author Name: Sanjib Adhya
Author URI: http://zacks.com
Date: 11/23/2017
--------------------------------------------- */

@media print {
    /* general attributes */
    *{
        box-shadow: 0;
        text-shadow: none;
        outline: none;
    }
    
    body, #ts_body, .ts_disclaimer{
        width: 100% !important;
    }
    
    #ts_body{
        border-top: none;
    }
    
    .ts_disclaimer{
        clear: both;
        page-break-before: avoid;
    }
    
    img{
        max-width: 100%; /* keeping any image at its original width */
    }
    
    nav.ts_nav{
        margin: 0;
        padding: 0;
        height: 0;
    }
    
    @page{
        margin: 0.5cm; /* setting page margin via using @page rule, not supported in FF yet */
    }
    
    [class*=ts-index--] #masthead{
        display: block !important; /* keeping individual TS mast heads visible while printing */
    }
    
    /* hiding unnecessary html elements such as header, header nav etc. for print purpose */
    section.ts-top-header-section, nav.ts_search_relocated_box, .ts-header-module, .ts-nav-toggle, nav.ts_nav, #ts_sidebar, #ts_sidebar_toggle, .service-menu-mobile, .switch-table, #ts_commentary footer a, .top-movers-panel footer a, .mobile_only.ts_disclaimer, #quick_links, #zacks_reported, #copyright p{
        display: none;
    }
    
    /* removing borders from containers inside main content area */
    #ts_body > section, .top-movers > section{
        border-top: none !important;
        padding-bottom: 0;
    }
    
    /* 
     * asigning page break attribute for following containers in order to keep each container * in acomplete single page 
    */
    .portfolio.additions, .portfolio.deletions, .portfolio.open, #ts_commentary{
        page-break-after: auto;
    }  
    
    #ts_commentary{
        page-break-before: auto;
    }
    
    /* making the background image for masthead cover the entire container */
    #ts_body #masthead h1{
        background-size: cover;
        width: 100%;
    }
    
    /* pushing the 2nd para on the right in ordrer to keep the top movers container in a single page */
    .top-movers-panel section footer span.fine-print p+p{
        float: right;
        width: auto;
        position: relative;
        top: -25px;
    }
    
    /* for performance page */
    .portfolio.closed{
        page-break-before: auto; /* for closed positions table */
    }
    
    .portfolio.closed .accordion .accordion-section .accordion-section-content{
        display: block !important; /* expanding and displaying all hidden closed trades while printing */
    }
    
    
    .portfolio.closed a.accordion-section-title:after{
        content: '\2d' !important; /* showing '-' icon beside each year label while expanding and displaying all hidden closed trades relative to that year during printing  */
    }
    
    
    label[for=view-closed], label[for=view-closed] + a{
        display: none; /* hiding 'view all closed trades' and 'export all transactions' buttons while printing */
    }
    
    #ts_body > section.ts_performance{
        padding-bottom: 0;
    }    
    
    /* for new to ZU page */
    .zu_icon_block.three_col > div{
        height: auto !important;
        page-break-after: always;
    }
    
    .zu_icon_block.three_col > div img{
        margin: 0 30% !important;
    }
    
    .zu_icon_block.three_col p.button{
        display: none;
    }
    
    /* for FAQ and Support page */
    .ts_faq{
        page-break-before: auto;
        page-break-after: auto;
    }
    
    .faq-block{
        page-break-after: auto;
    }
    
    .faq-block input[type=checkbox] ~ section{
        max-height: none !important;
    }
    
    /* footer attributes */    
    #copyright p:first-of-type{
        display: block; /* making the first line only visible while printing */
    }
    
    footer.ts_disclaimer p{
        margin-bottom: 0 !important;
    }
    
    .ts_disclaimer p:last-child{
        margin-bottom: 0 !important;
    }
    
    /* welcome series page attributes */
    .welcome_series_content #masthead{display: none !important;}
    .welcome_series_content #welcome_series .welcome h1, .welcome_series_content #welcome_series .welcome h1 + p, .welcome_series_content #welcome_series .welcome h1 + p + footer, .welcome_series_content ul.pagination{display: none;}
    
    /* addressing author pic for commentary section inside overview page */
    .ts-index--zc #ts_commentary header.author-block > div > span{
        width: 115px !important;
        height: 107px !important;
    }
    
    /* expanding all hidden top movers tables under trades tab for ZU and ZIC */
    .ts-index--zu #ts_body div#30_day_movers, .ts-index--zic #ts_body div#30_day_movers, .ts-index--zu #ts_body div#all_trades, .ts-index--zic #ts_body div#all_trades{display: block !important;}
    
    /* removing blank page issue while printing trades page */
    .ts-index--zu #ts_body div#all_trades + footer{
        float: left;
        width: 100%;
    }
    
    
}

