@charset "UTF-8";

/*
Theme Name: Astrawalker
Adding print support. The print styles are based on the the great work of
Andreas Hecht in https://www.jotform.com/blog/css-perfect-print-stylesheet-98272/.
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
# Margins
# Paddings
# Width
# Typography
# Page breaks
# Links
# Visibility
# WooCommerce
--------------------------------------------------------------*/
@media print {

  /* Margins */

  @page {
    margin: 2cm;
  }

  .entry-header,
  .site-footer {
    margin: 0;
  }

  /* Paddings */

  .posts {
    padding: 0;
  }
  
  /* Width */

  .entry-content,
  .entry-content p,
  .section-inner,
  .section-inner.max-percentage,
  .section-inner.medium,
  .section-inner.small,
  .section-inner.thin {
    max-width: 100%;
    width: 100%;
  }

  /* Fonts */

  body {
    background: #fff !important;
    color: #000;
    font: 13pt Georgia, "Times New Roman", Times, serif;
    line-height: 1.3;
  }

  h1 {
    font-size: 20pt;
  }

  h2,
  h2.entry-title,
  h3,
  h4,
  .has-normal-font-size,
  .has-regular-font-size,
  .has-large-font-size,
  .comments-header {
    font-size: 14pt;
    margin-top: 1cm;
  }

  /* Page breaks */

  a {
    page-break-inside: avoid;
  }

  blockquote {
    page-break-inside: avoid;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    page-break-after: avoid;
    page-break-inside: avoid;
  }

  img {
    page-break-inside: avoid;
    page-break-after: avoid;
  }

  table,
  pre {
    page-break-inside: avoid;
  }

  ul,
  ol,
  dl {
    page-break-before: avoid;
  }

  /* Links */
  
  a:link,
  a:visited,
  a {
    background: transparent;
    font-weight: bold;
    text-decoration: underline;
  }

  a {
    page-break-inside: avoid;
  }

  a[href^="http"]:after {
    content: " < " attr(href) "> ";
  }

  a:after > img {
    content: "";
  }

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

  a:not(:local-link):after {
    content: " < " attr(href) "> ";
  }

  /* Visibility */

  #site-header,
  .comment-form,
  .comments-wrapper,
  .comment .comment-metadata,
  .footer-social-wrapper,
  .footer-widgets-outer-wrapper,
  .header-navigation-wrapper,
  .pagination-wrapper,
  .post-meta-wrapper.post-meta-single-bottom,
  .post-separator,
  .site-logo img {
    display: none;
  }

  .entry-content .wp-block-button .wp-block-button__link,
  .entry-content .wp-block-button .wp-block-file__button,
  .entry-content .button {
    background: none;
    color: #000;
  }
}

/* WooCommerce */

@media print {

  .cart-page .left {
    display: none;
  }

  .cart-page .right {
    width: calc(100% - 4rem);
    padding: 2rem;
    max-width: 100%;
  }

  .cart-items {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .cart-items .item {
    display: flex;
    gap: 1rem;
  }

  .cart-items *::after {
   display: none;
  }

  .cart-items .item div:not(.product-name) {
    flex: 1 1 100px;
  }

  .cart-items .item .product-name .remove {
    display: none;
  }

  .cart-items .item .product-quantity .lbl {
    display: none;
  }
  
  .cart-items .item .product-quantity .minus,
  .cart-items .item .product-quantity .plus {
    display: none;
    visibility: hidden;
    opacity: 0;
  }

  .cart-items .item .product-quantity .value {
    visibility: visible;
  }

  .cart-items .item .product-desc,
  .cart-items .item .product-col {
    margin-top: 1.5vw;
  }

  .cart-items .item .product-col a {
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, .4);
  }

  /* print styles scoped to cart page */

  @page portrait {
    size: portrait;
    margin: 0;
  }

  header.main:has(~ .cart-page) .header-bar > div {
    display: none;
  }

  .page-template-cart.page-template-templatescart-php {
    page: portrait;
  }

  .cart-page img {
    -webkit-print-color-adjust: exact!important;
    color-adjust: exact!important;
    image-resolution: 300dpi;
    max-width: 100%;
    height: auto;
  }

  .cart-page ~ footer.footer-wrapper {
    display: none;
  }

  .page-template .cart-page .right {
    float: unset;
    width: unset;
    padding-top: 0;
  }

  .cart-page .right > h1 {
    display: none;
  }

  .cart-page .right .print-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    align-items: center;
    gap: 1rem;
    width: 100%;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .cart-page .right .print-header > * {
    flex: 1 1 100px;
    height: 100%;
    align-items: flex-start;
  }

  .cart-page .right .print-header p:last-child {
    justify-self: end;
    margin-bottom: 1.1111111111111112vw;
    white-space: nowrap;
  }

  .cart-page .right .print-header p {
    align-self: start;
  }

  #chat-widget-container {
    display: none;
  }

  .cart-page .right .print-header div {
    display: flex;
    gap: 2rem;
  }

  .cart-page .right .print-header .print-title {
    margin-bottom: unset;
    font-family: 'Messina Sans', sans-serif;
    font-size: 1rem;
    white-space: nowrap;
   }

  .cart-page .right .print-header .print-header-logo {
    background-image: url('./assets/images/logo_name.svg');
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    max-width: 11.38888888888889vw;
    display: block;
    padding: 0;
    width: 100%;
    align-items: flex-start;
  }

  .cart-page .right .cart-items .top-row {
    display: flex!important;
    width: 100%;
    gap: 1rem;
  }

  .cart-page .right .cart-items .top-row span {
    flex: 1 1 100px;
    margin-bottom: 0.5rem;
  }

  .cart-page .right .cart-items .top-row span:nth-child(2) {
    padding-left: 1rem;
  }

  .cart-page .right .cart-items .item {
    width: 100%!important;
    border-top: 1px solid rgba(0, 0, 0, .4);
    padding: 1rem 0;
  }

}