/* ==========================================================================
 * PRINT RESET UTILITY
 *
 * Very crude, reset-like styles taken from the HTML5 Boilerplate:
 * https://github.com/h5bp/html5-boilerplate/blob/5.3.0/dist/doc/css.md#print-styles
 * https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/main.css#L205-L282
 * ========================================================================== */

@media print {
  /**
   * 1. Black prints faster: http://www.sanbeiji.com/archives/953
   */

  /**
   * It's necessary to list all elements and avoid using the :first-letter
   * and :first-line selectors as these selectors crash in IE and Edge browsers
   * when priting.
   *
   * Also the * selector causes crash on Edge.
   *
   * Solution: list almost all HTML elements and the pseudo before and after
   * elements
   *
   * READ THIS: For text color utilities, please include all classes inside of
   * @media screen in order to avoid the utility colors being applied when printing
   * the element.
   *
   *
   * Previous color:
   *
   * *,
   * *:before,
   * *:after,
   * *:first-letter,
   * *:first-line {
   *   background: transparent !important;
   *   color: #000 !important;
   *   box-shadow: none !important;
   *   text-shadow: none !important;
   *  }
   */
  html,
  body,
  h1,h2,h3,h4,h5,h6,
  ul,
  ol,
  li,
  p,
  span,
  a,
  div,
  pre,
  blockquote,
  table,
  tbody,
  thead,
  tr,
  th,
  td,
  form,
  button,
  html:before,
  body:before,
  h1:before,h2:before,h3:before,h4:before,h5:before,h6:before,
  ul:before,
  ol:before,
  li:before,
  p:before,
  span:before,
  a:before,
  div:before,
  pre:before,
  blockquote:before,
  table:before,
  tbody:before,
  thead:before,
  tr:before,
  th:before,
  td:before,
  form:before,
  button:before,
  html:after,
  body:after,
  h1:after,h2:after,h3:after,h4:after,h5:after,h6:after,
  ul:after,
  ol:after,
  li:after,
  p:after,
  span:after,
  a:after,
  div:after,
  pre:after,
  blockquote:after,
  table:after,
  tbody:after,
  thead:after,
  tr:after,
  th:after,
  td:after,
  form:after,
  button:after {
    background: transparent !important;
    color: #000 !important; /* [1] */
    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,
  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;
  }

  img {
    max-width: 100% !important;
  }

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

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