/* HTML5 Boilerplate v6.1.0 | MIT License | https://html5boilerplate.com/ */

/*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*/

/* ==========================================================================
Base styles: opinionated defaults
========================================================================== */

html {
    color: #222;
    font-size: 1em;
    line-height: 1.4;
}

/*
* Remove text-shadow in selection highlight:
* https://twitter.com/miketaylr/status/12228805301
*
* Vendor-prefixed and regular ::selection selectors cannot be combined:
* https://stackoverflow.com/a/16982510/7133471
*
* Customize the background color to match your design.
*/

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

/*
* A better looking default horizontal rule
*/

hr {
    background: #fff;
    display: block;
    height: 5px;
    border: none;
    margin: 1em 0;
    padding: 0;
}

/*
* Remove the gap between audio, canvas, iframes,
* images, videos and the bottom of their containers:
* https://github.com/h5bp/html5-boilerplate/issues/440
*/

audio,
canvas,
iframe,
img,
svg,
video {
    vertical-align: middle;
}

/*
* Remove default fieldset styles.
*/

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
* Allow only vertical resizing of textareas.
*/

textarea {
    resize: vertical;
}

/* ==========================================================================
Browser Upgrade Prompt
========================================================================== */

.browserupgrade {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}

/* ==========================================================================
Author's custom styles
========================================================================== */

/* ==========================================================================
Variables
========================================================================== */

:root {
    --red: #CC0033;
    --green: #00626D;
    --light-green: #f0f4f6;
    --black: #000;
    --light-grey: #E3E9EE;
    --light-gray: #E3E9EE;

    --text-color: #5f6a72;

    --margin-bottom: 2rem;
}

.text-red {
    color: #CC0033;
}
.text-green {
    color: #00626D;
}
.text-light-grey {
    color: #e3e9ee;
}

@font-face {
    font-family:"Azo Sans Bold";
    src:url("../fonts/azosans-bold-webfont.woff2") format("woff2"), url("../fonts/azosans-bold-webfont.woff") format("woff"),url("../fonts/azosans-bold-webfont.ttf") format("truetype");
    font-style:normal;
    font-weight:normal;
}

@font-face {
    font-family:"Campton Bold";
    src:url("../fonts/Campton-Bold.woff2") format("woff2"),url("../fonts/Campton-Bold.woff") format("woff"),url("../fonts/Campton-Bold.ttf") format("truetype");
    font-style:normal;
    font-weight:normal;
}

@font-face {
    font-family:"Campton Book";
    src:url("../fonts/Campton-Book.woff2") format("woff2"),url("../fonts/Campton-Book.woff") format("woff"),url("../fonts/Campton-Book.ttf") format("truetype");
    font-style:normal;
    font-weight:normal;
}

@font-face {
    font-family:"Campton Light";
    src:url("../fonts/Campton-Light.woff2") format("woff2"),url("../fonts/Campton-Light.woff") format("woff"),url("../fonts/Campton-Light.ttf") format("truetype");
    font-style:normal;
    font-weight:normal;
}


@font-face {
    font-family: "Lato Regular";
    src:url("../fonts/Lato-Regular.woff2") format("woff2"),url("../fonts/Lato-Regular.woff") format("woff"),url("../fonts/Lato-Regular.ttf") format("truetype");
    font-style:normal;
    font-weight:400;
}

@font-face {
    font-family:"Lato Black";
    src:url("../fonts/Lato-Black.woff2") format("woff2"),url("../fonts/Lato-Black.woff") format("woff"),url("../fonts/Lato-Black.ttf") format("truetype");
    font-style:normal;
    font-weight:normal;
}

@font-face {
    font-family:"Icons";
    src: url("../fonts/icons.eot") format("eot");
    src:url("../fonts/icons.eot?#iefix") format("embedded-opentype"),
      url("../fonts/icons.woff") format("woff"),
      url("../fonts/icons.ttf") format("truetype"),
      url("../fonts/icons.svg#Icons") format("svg");
    font-weight: normal;
    font-style: normal;
}

[data-icon]:before {
  font-family: "Icons" !important;
  content: attr(data-icon);
  font-style: normal !important;
  font-weight: normal !important;
  font-variant: normal !important;
  text-transform: none !important;
  speak: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[class^="icon-"]:before,
[class*=" icon-"]:before {
  font-family: "Icons" !important;
  font-style: normal !important;
  font-weight: normal !important;
  font-variant: normal !important;
  text-transform: none !important;
  speak: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-i-download:before {
  content: "\61";
}
.icon-i-check:before {
  content: "\62";
}
.icon-i-chevron-down:before {
  content: "\63";
}
.icon-i-download-red:before {
  content: "\64";
}
.icon-i-filter:before {
  content: "\65";
}
.icon-north-america:before {
  content: "\67";
}
.icon-oval:before {
  content: "\68";
}
.icon-oval-2:before {
  content: "\69";
}
.icon-pin:before {
  content: "\6a";
}
.icon-rutgers:before {
  content: "\6b";
}
.icon-i-search:before {
  content: "\6c";
}
.icon-terrain:before {
  content: "\6d";
}
.icon-i-arrow-left:before {
  content: "\6e";
}
.icon-i-close:before {
  content: "\6f";
}
.icon-i-triangle-right-grey:before {
  content: "\66";
}



/* ==========================================================================
Base
========================================================================== */

html {
    /* use whatever the client default is */
    font-size: 1em;
}

body {
    color: #5f6a72;
    font-family: "Campton Book", "Lato", sans-serif;
}

img {
    height: auto;
    max-width: 100%;
}

h1 {
    font-family: "Campton Bold", sans-serif;
    font-size: 4em;
    line-height: 1em;
}

h2 {
    color: #fff;
    font-family: "Campton Light", sans-serif;
    font-size: 2em;
    line-height: 1.125;
    margin: 0 0 1.25rem;
}

h3 {
    color: #00626D;
    font-family: 'Campton Book', sans-serif;
    font-size: 2.25em;
    margin: 0 0 1em;
}

h4 {
    color: #00626D;
    font-family: 'Campton Book', sans-serif;
}

p {
    font-size: 1em;
    line-height: 1.8375;
}

a {
    pointer-events: all;
}

button {
    font-family: "Lato Black", sans-serif;
    pointer-events: all;
}

.btn-download {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #cc0033;
    font-family: "Lato Black";
    font-size: 1em;
    pointer-events: all;
}
    .btn-download:hover {
        color: #cc0033;
        opacity: 0.7;
        text-decoration: none;
    }

.btn-download-border {
    border: 2px solid #cc0033;
    padding: .4375em .675em;
    line-height: 2;
}

.btn-download img {
    display: inline-block;
    height: 26px;
    margin: 0 8px 0 0;
    vertical-align: bottom;
    width: auto;
}

.btn-download-border img {
    vertical-align: middle;
}

.btn-submit {
    background: transparent;
    border: 2px solid #cc0033;
    border-radius: 0;
    color: #cc0033;
    font-family: "Campton Book", sans-serif;
    font-size: 1em;
    line-height: 2;
    padding: 2px 2em;
    pointer-events: all;
}

.btn-link {
    color: #CC0033;
    font-family: "Campton Light", sans-serif;
    font-weight: normal;
}

.high-z {
  z-index: 99999;
}

.icon_block {
    display: block;
}

.icon-inline {
  display: inline;
  height: auto;
  max-width: 20px;
}

.sort {
    cursor: pointer;
    color: #CC0033;
    display: block;
    font-family: "Campton Book", sans-serif;
    font-size: 1em;
    font-weight: normal;
    line-height: 2;
}

hr {
    background: #e3e9ee;
    border: none;
    height: 6px;
    margin: 1.5em 0;
    width: 100%;
}

/* ==========================================================================
    Main Content
========================================================================== */

#main-styles {
    position: relative;
    z-index: 0;
}

    #main-styles:before {
        background-color: #fff;
        background-image: linear-gradient(180deg, #11202E, transparent);
        content: '';
        height: 74vh;
        left: 0;
        position: absolute;
        top: 0;
        width: 100%;
        z-index: -1;
    }

    #main-styles:after {
        background-image: url('../img/terrain.svg');
        background-size: cover;
        background-repeat: no-repeat;
        bottom: -10%;
        content: '';
        height: 40%;
        left: 0;
        position: absolute;
        width: 45%;
        z-index: -1;
        opacity: 0.5;
    }

main p {
    font-size: 1.125em;
    line-height: 1.8375;
    margin: 0 0 2rem;
}

#species-list-alpha {
  text-transform: capitalize;
}

#species-list-alpha .list {
    width: 100%;
}

/* ---- Data download modal --*/

#dataDownloadModal,
#aboutModal {
    background: #f0f4f6;
}

#aboutModal {
    z-index: 1054;
}

#dataDownloadModal .modal-content,
#aboutModal .modal-content {
    background: transparent;
}

#dataDownloadModal .modal-header,
#aboutModal .modal-header {
    color: #00626d;
    font-family: "Campton Light", sans-serif;
    font-size: 3em;
}

#dataDownloadModal .form-group .form-control,
#aboutModal .form-group .form-control {
    background: #e3e9ee;
    border: none;
    border-radius: 0;
    line-height: 2.5em;
    height: 2.5em;
}

#dataDownloadModal textarea,
#aboutModal textarea,
#dataDownloadModal .form-group textarea.form-control,
#aboutModal .form-group textarea.form-control {
    height: 6em;
}

#dataDownloadModal .close,
#aboutModal .close {
    color: #cc0033;
}

#dataDownloadModal label,
#aboutModal label {
    color: #5f6a72;
    font-size: 1.25em;
    font-family: 'Campton Book';
    font-weight: 300;
    /* line-height: 2em; */
}

.sub-category {
    margin-bottom: 2rem;
}


/* ==========================================================================
Header
========================================================================== */
header {
    display: block;
    postion: relative;
}
.relative {
    position: relative;
}

.navbar.top {
    background: #E3E9EE;
    /* height: 7vh; */
    z-index: 1;
}

.nav-item {
    background-color: #cc0033;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin: 0 4px;
    padding: 1px 12px;
}

.nav-item a {
    color: #fff;
    font-family: "Campton Book", sans-serif;
    font-size: 1.125em;
    letter-spacing: .015em;
    line-height: 1.5;
}

.navbar.main {
    /* height: 13vh; set equal to margin-top of main */
    padding: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1;
}

.rutgers-logo {
    /* height: 2.75vh; */
    width: auto;
}

/* ==========================================================================
    Page Overlay
========================================================================== */

#page-overlay,
.page-overlay {
    background: #fff;
    bottom: 0;
    padding-top: 10vh;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
}
    #page-overlay.national:before {
        background: linear-gradient(180deg, rgba(0, 17, 19, 0.7) -18.18%, rgba(0, 21, 25, 0.6743) -18.18%, rgba(64, 70, 120, 0.7) -18.18%, rgba(17, 32, 46, 0.7) -18.18%, rgba(0, 50, 64, 0.493437) 5.35%, rgba(0, 127, 172, 7e-05) 81.16%);
        content: '';
        height: 30vh;
        left: 0;
        position: absolute;
        right: 0;
        top: 0;
        z-index: -1;
    }

    #page-overlay.national:after {
        background-image: url('../img/terrain.svg');
        background-size: 100% 100%;
        background-repeat: no-repeat;
        content: '';
        height: 78vh;
        left: 25%;
        position: absolute;
        right: 0;
        top: -25%;
        z-index: -1;
        width: 100%;
    }

#page-overlay.regional {
    background: transparent;
}

#page-overlay:empty,
.page-overlay:empty {
  display: none;
}

#page-content {
    display: none;
}

#page-content.show {
    display: block;
    position: relative;
    z-index: 3;
}

.title {
    border-bottom: 6px solid rgba(95, 106, 113, 0.1);
    color: #00626d;
    font-family: "Campton Bold", sans-serif;
    font-size: 1.125em;
    padding-bottom: .5rem;
}

.title:empty {
  border-bottom: none;
  padding-bottom: 0;
}

#regionalName {
    border-bottom: 6px solid #fff;
    color: #fff;
    display: inline-block;
    font-family: "Campton Book", sans-serif;
    font-size: 2em;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
}

.region-options {
}

.region-option {
    display: inline-block;
}

.region-option .btn-link {
    /* color: #fff; */
    font-family: "Campton Book", sans-serif;
    font-size: 1.75em;
    padding: .5rem 2rem .5rem 0;
    margin-bottom: 1.25rem;
}

.region-option .btn-link:hover,
.region-option .btn-link:active,
.region-option .btn-link:focus {
    color: #fff;
}

.region-option .btn-link.selected {
    color: #fff;
    text-decoration: underline;
}

.chart-title,
.chart-title h2 {
    color: #00626d;
    margin: 2rem 0;
}

.exit {
    cursor: pointer;
    color: #CC0033;
    display: inline-block;
    margin: 1.75rem 1.5rem;
    position: relative;
    vertical-align: middle;
    font-family: 'Campton Book', sans-serif;
    font-size: 1.25em;
}

.chart-wrap {
    display: block;
    height: 480px;
    margin-bottom: 2rem;
    pointer-events: all;
    position: relative;
    width: 100%;
    max-width: 980px;
}

.chart-wrap .graph {
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

.bg-light-grey {
    background: #F0F4F6;
}

/* ==========================================================================
  Regional Page
========================================================================== */

#selected-species h4 {
    font-family: 'Campton Light', sans-serif;
    font-size: 1em;
}

#selected-species strong {
    font-family: "Campton Book", sans-serif;
    font-size: 1.1875em;
}

.search-wrap {
    display: none;
}
    .search-wrap.show {
        display: block;
    }

.search-wrap:not(:empty) {
    background: #F0F4F6;
    padding: 2rem 0 1rem;
    position: relative;
}

.search-wrap h2 {
    font-size: 1em;
    color: #00626D;
}

.species-all {
  color: #00626D;
  text-align: left;
  vertical-align: middle;
}
  .species-all:before {
    background: #fff;
    border: 2px solid #E3E9EE;
    border-radius: 50%;
    content: '';
    height: 17px;
    position: absolute;
    left: -16px;
    top: 8px;
    width: 17px;

  }
  .species-all.active:before {
    background: #00626D
  }

#species-list-alpha-toggle {
    padding-right: 20px;
    text-align: right;
}

#species-list-alpha-toggle .chevron {
    border-bottom: 3px solid #CC0033;
    height: 10px;
    position: absolute;
    right: 0;
    transition: .25s rotate ease-in-out;
    transform: rotate(0);
    top: 10px;
    width: 10px;
}

#species-list-alpha-toggle.collapsed .chevron {
    border-right: 3px solid #CC0033;
    transform: rotate(45deg);
}

.species-search {
    color: #9B9B9B;
    font-family: 'Campton Book', sans-serif;
    font-size: .9375em;
}

.species-search h2 {
    color: #00626D;
    font-size: 2.25em;
}

button.search {
    border: none;
    background: #CC0033;
}

#species-search-input {
    background-image: url('/img/search_red.svg');
    background-position: 96% 50%;
    background-size: 24px 24px;
    background-repeat: no-repeat;
    padding: .25rem .5rem;
}

#species-listing-alphabetical {
    border-bottom: 3px solid #9B9B9B;
    border-top: 3px solid #9B9B9B;
    margin: 2rem 0;
    padding: 2rem 0;
}

#species-listing-alphabetical h2 {
    margin: 0 0 2rem;
}

#species-listing-alphabetical .nav-item {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

#species-listing-alphabetical .nav-item.active {
    background: transparent;
    font-weight: bold;
}

#species-listing-alphabetical .nav-item a {
    color: #9B9B9B;
    padding: .125rem .5rem;
    font-size: 1em;
}

#search-options.show {
    border-top: 5px solid #E3E9EE;
    margin-top: 2rem;
    padding-top: 2rem;
}

.species-search .list {
    background: #fff;
    display: none;
    list-style: none;
    min-height: 500px;
    max-height: 60vh;
    overflow: scroll;
    position: absolute;
    z-index: 9;
}

#species-listing-alphabetical-list .list {
    background: #fff;
    display: block;
    position: relative;
}

.common_name,
.scientific_name,
.species-selection em,
.no-events {
    pointer-events: none;
}

.scientific_name {
    font-style: italic;
    text-transform: initial;
}

#species-listing-alphabetical-list .list a {
    display: block;
    margin: 0 0 1rem;
}

#species-picture[src=""],
.species-pictures {
    max-height: 0vh;
    min-height: 0vh;
}

#species-picture[src*="."],
.species-pictures {
    max-height: 66vh;
    min-height: 400px;
}

@media (min-width: 1200px) {
    #species-picture[src*="."],
	.species-pictures {
        max-height: 66vh;
        min-height: 66vh;
    }
}

#species-picture-rcp26,
#species-picture-rcp85 {
    display: inline-block;
    height: auto;
    max-height: 0;
    min-height: 0;
    margin: 0 -2px;
    max-width: 48%;
    width: auto;
}

#species-picture-rcp26[src*="future"],
#species-picture-rcp85[src*="future"] {
    height: auto;
    max-height: 66vh;
    min-height: 400px;
}

#animation-wrap {
    background: rgba(240,244,246,0.95);
    height: 100%;
    overflow: auto;
    position: absolute;
    right: 0;
    top: 0;
    text-align: center;
    max-width: 50%;
    z-index: 9;
}
#slider-div {
min-height:3em;
margin: 0 0;
}

#slider-area {
display:table;
width:100%;
}
#slider-row {
display:table-row;
}
#slider-start-year {
display:table-cell;
width:15%;
min-width:3em;
text-align:center;
}
#slider-cell {
display:table-cell;
width:70%;

}
#slider-end-year {
display:table-cell;
width:15%;
min-width:3em;
text-align:center;
}

.dygraph-axis-label {
  font-size: 11px;
}

/* ==========================================================================
  National Page
========================================================================== */

/* ==========================================================================
Map
========================================================================== */
/* keep map-wrap and map the same height */
#map-wrap {
    background: transparent;
    height: 78vh;
    min-height: 480px;
    left: 0%;
    position: relative;
    top: 0;
    width: 100%;
    z-index: 1;
}
    #map-wrap.half-height {
        height: 20vh;
        min-height: 250px;
    }

#map {
    height: 78vh;
    min-height: 480px;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

#map-overlay {
    pointer-events: none;
    position: absolute;
    left: 10%;
    overflow: auto;
    top: 10%;
    z-index: 1;
}

#map-overlay.opacity-overlay {
    background: rgba(0,0,0,0.9);
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 2.5%;
    top: 0;
    width: 50%;
    z-index: 1;
}

#map-overlay.regional {
    color: #fff;
    pointer-events: auto;
}

#map-overlay h1 {
    color: #fff;
    font-size: 4em;
    margin: 0 0 1em;
    text-shadow: 0 0 6px rgba(80,80,80,0.4);
}

@media (min-width: 62em) {
    #animation-wrap {
        width: 65%;
        max-width: 65%;
    }

    #map-overlay {
        left: 50%;
        top: 0%;
        max-width: 400px;
        transform: translate(-400px,0%);
    }
    #map-overlay.opacity-overlay {
        width: 35%;
        max-width: 100%;
        transform: translate(0,0);
    }
}

@media (min-width: 84em) {
    #animation-wrap {
        width: 70%;
        max-width: 100%;
    }

    .map-overlay {
        left: 42%;
    }
    .map-overlay.regional {
        left: 0;
    }
    #map-overlay.opacity-overlay {
        width: 30%;
    }
}

@media (min-height: 60em) {
  .exit {
    margin: 4rem 2rem;
  }

  #map-overlay.opacity-overlay {
    padding: 5%;
  }
}

@media (min-width: 62em) and (min-height: 40em) {
    #map-overlay {
        transform: translate(-400px,14%);
    }
}


/* ==========================================================================
    footer
========================================================================== */

footer {
    background: #F0F4F6;
    color: #9B9B9B;
    box-shadow: 0 -1px 8px #d7d7d7;
    font-family: "Campton Light", sans-serif;
    /* font-family: 'Quicksand', sans-serif; */
    padding: 2em;
}

footer strong {
    font-family: "Campton Bold", sans-serif;
}

footer .rutgers-logo {
    height: 4vh;
}

footer .footer-row-wrap > div:nth-child(1):after,
footer .footer-row-wrap > div:nth-child(1):before {
    border-left: 4px solid #e3e9ee;
    bottom: 0;
    content: '';
    position: absolute;
    top: 0;
}

footer .footer-row-wrap > div:nth-child(1):before {
    left: 10px;
}

footer .footer-row-wrap > div:nth-child(1):after {
    right: -14px;
}

.noaa-logo {
    margin-bottom: 2rem;
}

.noaa-logo a {
    color: #337ab7;
    display: inline-block;
    margin: 0 -2px;
    font-size: .8125em;
    vertical-align: middle;
}

.noaa-logo a:nth-of-type(1) {
    width: 54px;
    max-width: 20%;
}

.noaa-logo a:nth-of-type(2) {
    padding-left: 10px;
    max-width: 80%;
}

.noaa-logo a:nth-of-type(2) img {
    display: block;
    max-width: 205px;
    margin-top: 8px;
    width: 90%;
}

/* ==========================================================================
Helper classes
========================================================================== */

/*
* Hide visually and from screen readers
*/

.hidden {
    display: none !important;
}

/*
* Hide only visually, but have it available for screen readers:
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
*
* 1. For long content, line feeds are not interpreted as spaces and small width
*    causes content to wrap 1 word per line:
*    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
*/

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    white-space: nowrap; /* 1 */
}

/*
* Extends the .visuallyhidden class to allow the element
* to be focusable when navigated to via the keyboard:
* https://www.drupal.org/node/897638
*/

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
    white-space: inherit;
}

/*
* Hide visually and from screen readers, but maintain layout
*/

.invisible {
    visibility: hidden;
}

/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
*    `contenteditable` attribute is included anywhere else in the document.
*    Otherwise it causes space to appear at the top and bottom of elements
*    that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
*    `:before` to contain the top-margins of child elements.
*/

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

/* ==========================================================================
EXAMPLE Media Queries for Responsive Design.
These examples override the primary ('mobile first') styles.
Modify as content requires.
========================================================================== */

@media only screen and (min-width: 35em) {
    /* Style adjustments for viewports that meet the condition */
}

@media print,
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 1.25dppx),
(min-resolution: 120dpi) {
    /* Style adjustments for high resolution devices */
}

/* ==========================================================================
Print styles.
Inlined to avoid the additional HTTP request:
https://www.phpied.com/delay-loading-your-print-css/
========================================================================== */

@media print {
    *,
    *:before,
    *:after {
        background: transparent !important;
        color: #000 !important; /* Black prints faster */
        -webkit-box-shadow: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

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

    /*
    * Don't show links that are fragment identifiers,
    * or use the `javascript:` pseudo protocol
    */

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

    pre {
        white-space: pre-wrap !important;
    }
    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    /*
    * Printing Tables:
    * http://css-discuss.incutio.com/wiki/Printing_Tables
    */

    thead {
        display: table-header-group;
    }

    tr,
    img {
        page-break-inside: avoid;
    }

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

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