$desktop:  768px;
$handheld: 568px;

p.wc-gzd-additional-info:empty {
  display: none;
}

.wc-gzd-additional-info-placeholder {
  display: none;
}

.product.product-type-variable {
  ul.tabs {
    li.product_safety_tab {
      display: none;
    }
  }
}

#order_review .wc-gzd-checkbox-placeholder {
  clear: both;

  p.form-row {
    text-align: left;
    padding: 0 1em 0 0;
    float: none;

    label {
      display: inline;
    }
  }

  &:empty {
    display: none;
  }
}

.woocommerce-checkout .shop_table {
  background-color: #EEE;
}

table.woocommerce-checkout-review-order-table {
  tr.wc-gzd-cart-item-has-thumbnail {
    .wc-gzd-cart-item-name-wrapper {
      @media ( min-width: $desktop ) {
        display: flex;
        align-items: center;
      }

      .wc-gzd-cart-item-thumbnail {
        max-width: 15%;
        min-width: 60px;
        margin-right: 1em;

        img {
          margin: 0;
        }
      }
    }
  }
}

body.theme-astra {
  table.woocommerce-checkout-review-order-table {
    tr.wc-gzd-cart-item-has-thumbnail {
      td.product-name {
        flex-wrap: wrap;
      }
    }
  }
}

.cart_totals {
  tr.order-total-small-business-notice, tr.order-total-differential-taxation-notice {
    td {
      &::before {
        content: "" !important;
      }
    }
  }
}

/**
 * Hide (block) price labels added via the woocommerce_get_item_data filter
 * while displaying classic shortcodes. Fallback-use only.
 */
.woocommerce-cart, .woocommerce-checkout, .woocommerce-mini-cart, .woocommerce {
  dl.variation, ul.variation {
    dt[class*="variation-gzd-"], dd[class*="variation-gzd-"], div[class*="variation-gzd-"], li[class*="variation-gzd-"] {
      display: none !important;
    }
  }
}

.includes_tax, .tax_label {
  display: none !important;
}
.wc-gzd-small-business-includes-tax {
  display: inline !important;
  font-size: 0.9em;
  padding-left: 3px;
}
.woocommerce-gzd-checkout #order_review_heading {
  display: none;
}
.woocommerce-checkout .shop_table tr td p {
  margin-bottom: 0;
}
.woocommerce-checkout .shop_table td, .woocommerce-checkout .shop_table th {
  line-height: 1.5;
}
.more-variants-available-info {
  font-size: 11px;
  display: block;
  font-weight: normal;
}
.shop_table .product-name-inner, .shop_table .product-name-inner tr td {
  border: none;
  padding: 0;
  margin: 0;
}
.shop_table .product-name-inner tr td:last-child {
  text-align: right;
}

.cart_totals, .woocommerce-checkout table.shop_table {
  .wc-gzd-additional-wrapper {
    text-align: right;
    clear: both;
  }

  p.wc-gzd-additional-info {
    display: inline-block;
    margin-bottom: 0;
    font-size: 0.8em;
    font-weight: normal;
  }
}

.entry-content .woocommerce #payment {
  margin-bottom: 1em;
}
/* Hide first checkout/terms.php template loaded by WooCommerce */
.woocommerce #payment .wc-terms-and-conditions {
  display: none !important;
}
.entry-content .woocommerce .checkout-btn-wrap {
  text-align: right;
}
.woocommerce-checkout p.direct-debit-checkbox {
  display: none;
}
.unit-price-cart {
  font-size: 0.9em;
  display: block;
  margin-top: 5px;
}
.products .wc-gzd-additional-info, .product_list_widget .wc-gzd-additional-info {
  font-size: 0.8em;
  margin: 0.7rem 0 0.7rem 0;
  padding: 0;
}

.product_list_widget .wc-gzd-additional-info, .product_list_widget p.price-unit {
  margin: 0.2rem 0;
  line-height: 1.8em;
}

.product_list_widget .wc-gzd-additional-info a {
  display: inline !important;
}

.products .product .price-unit, .product_list_widget .price-unit {
  font-size: 0.8em;
}

.product_list_widget .price-unit {
  margin-bottom: 0.7em;
}

.product p.wc-gzd-additional-info {
  margin-bottom: 0.5rem;
  font-size: 0.9em;
  clear: left;
}
.product .defect-description:not(:empty) {
  padding: .5em;
  border: 2px solid #4b4f58;
  margin: 1em 0;

  p:last-child {
    margin-bottom: 0;
  }
}

form.cart.wc-gzd-replace-price {
  .single_variation_wrap {
    .woocommerce-variation-price {
      display: none;
    }
  }
}

.deposit-packaging-type {
  text-transform: uppercase;
  font-weight: bold;
}

.product p.deposit-packaging-type {
  font-size: 1.2em !important;
}
.wc-gzd-rating-authenticity-status {
  display: block;
  font-size: .9em;
}
.woocommerce-product-rating {
  .wc-gzd-rating-authenticity-status {
    display: inline-block;
  }
}
.product .product_meta {
  margin-top: 1rem;
}
p.footer-info {
  text-align: center;
  font-size: 0.9em;
  padding-bottom: 0.5rem;
}
.wc-gzd-item-desc p, .wc-gzd-item-defect-description p {
  font-size: 0.9em;
  font-weight: normal;
}
.wc-gzd-edit-data-notice {
  background: #EEE;
  display: inline-block;
  padding: 1em;
}
.wc-gzd-edit-data-notice p.wc-gzd-info {
  margin: 0;
  padding: 0;
}

.wc-gzd-power-supply {
  display: flex;
  flex-wrap: wrap;
  height: 70px;
  margin: 1em 0;

  svg {
    display: flex;
    align-items: center;
    width: 70px;
    height: 70px;

    text {
      text-anchor: middle;
      dominant-baseline: middle;
      font-size: 1.8rem;
      font-weight: 600;

      &.min-max-watt-has-decimals {
        font-size: 1.5rem;
      }

      &.power-supply-usb-pd {
        font-size: 1.5rem;
      }
    }
  }
}

.wc-gzd-cart-info {
  display: block;
}

table.product-details-inner {
  table-layout:fixed;
  margin: 0;
  padding: 0;
}
table.product-details-inner, table.product-details-inner tr, table.product-details-inner td {
  padding-top: 0;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
  border: none;
  background: transparent;
}
table.product-details-inner tr td:last-child {
  text-align: right;
}
.wc-gzd-product-name-left, .wc-gzd-product-name-right {
  float: left;
}
.wc-gzd-product-name-left {
  max-width: 15%;
  margin-right: 1em;
}
#order_review .blockMsg {
  line-height: 1.5em;
}
#shipping_parcelshop_post_number_field .optional {
  display: none !important;
}

.wc-gzd-nutri-score-value {
  height: 4rem;
  width: 7.0625rem;
  display: block;
  text-indent: -9999px;
}

.wc-gzd-placeholder-loading {
  position: relative;
  display: flex;
  flex: 0 0 100%;
  flex-flow: column;
  overflow: hidden;

  * {
    box-sizing: border-box;
  }

  &::before {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 50%;
    z-index: 1;
    width: 500%;
    margin-left: -250%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 46%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 54%) 50% 50%;
    -webkit-animation: phAnimation 0.8s linear infinite;
    animation: phAnimation 0.8s linear infinite;
    content: " ";
    pointer-events: none;
  }

  .wc-gzd-placeholder-row {
    display: flex;
    vertical-align: middle;
    align-items: center;

    > * {
      height: 10px;
      background-color: #e7e7e7;
      display: block;
    }

    .wc-gzd-placeholder-row-col-4 {
      min-width: 100px;
    }
  }
}

@-webkit-keyframes phAnimation {
  0% {
    transform: translate3d(-30%, 0, 0);
  }
  100% {
    transform: translate3d(30%, 0, 0);
  }
}

@keyframes phAnimation {
  0% {
    transform: translate3d(-30%, 0, 0);
  }
  100% {
    transform: translate3d(30%, 0, 0);
  }
}

/**
 * Blocks
 */
.wc-block-featured-product {
  .wc-gzd-additional-info {
    width: 100%;
    padding: 5px 48px 0;
    z-index: 1;
    color: inherit;
    text-align: center;
    margin: 0;
    font-size: .9em;
  }
  .wc-gzd-nutri-score {
    width: auto;
  }
}

ul.wc-block-grid__products {
  li.wc-block-grid__product {
    .wc-gzd-additional-info {
      margin: .5em 0;
    }

    .wc-gzd-additional-info:not(.deposit-packaging-type) {
      font-size: .9em;
      font-weight: normal;
    }
  }
}

/**
 * Twenty Twenty
 */
.theme-twentytwenty, .theme-twentytwentyone {
  form.woocommerce-checkout #order_review_heading {
    width: 100%;
    padding-left: 0;
    text-align: left;
    margin-bottom: 2rem;
  }
}
