/**
 * Base print styling
 * -----------------------------------------------------------------------------
 * Source: http://html5boilerplate.com/
 */

$black: #000000;
$gray: #999999;

@media print {
    * {
        background: transparent !important;
        color: $black !important;
        box-shadow: none !important;
        text-shadow: none !important;

        &:before,
        &:after {
            background: transparent !important;
            color: $black !important;
            box-shadow: none !important;
            text-shadow: none !important;
        }
    }

    a {
        text-decoration: underline;

        &:visited {
            text-decoration: underline;
        }

        &[href]:after {
            content: '(' attr(href) ')';
        }
    }

    abbr[title]:after {
        content: ' (' attr(title) ')';
    }

    a {
        &[href^='#']:after,
        &[href^='javascript:']:after {
            content: '';
        }
    }

    pre,
    blockquote {
        border: 1px solid $gray;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group;
    }

    tr {
        page-break-inside: avoid;
    }

    img {
        page-break-inside: avoid;
        max-width: 100% !important;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
