/*--------------------------------------------------------------
>>> TABLE OF CONTENTS: CART

1. General Cart Layout
2. Cart Product list table
3. Cart Totals table
4. Error Messages

----------------------------------------------------------------*/

/* 
* General Cart Layout 
*/
body:not(.mobile) #primary .woocommerce {
  min-height: calc(100vh - 250px);
  margin-top: 2rem; /* Important to display the top divider correctly*/
  display: flex;
  flex-direction: column;
}
body.mobile #primary .woocommerce {
  margin-top: 1rem;
}

.woocommerce-cart-form {
  width: 100%;
  padding-right: 1.15rem;
}

.cart-collaterals {
  min-width: 380px;
  width: 50%;
  max-width: 430px;
  padding-left: 1.15rem;
}

/* Product table layout */
.cart-wrapper .cart_item {
  border-bottom: var(--border);
  padding: 2.5rem 0;
  align-items: stretch;
}

.cart-wrapper .cart_item:first-child {
  padding-top: 0;
}

.cart-wrapper .cart_item:last-child {
  border-bottom: none;
}

/* Padding cart totals table */
.cart_totals tr > * {
  padding: 1.2rem 0;
}

.cart_totals tr:first-child * {
  padding-top: 0;
}

.cart_totals tr:last-child {
  border: none;
  align-items: flex-start;
}
.cart_totals tr:last-child > * {
  padding-bottom: 0;
}

.order-total td {
  display: flex;
  flex-direction: column;
}

/* 
* Cart Product list table
*/

/* Thumbnail column */
.cart-wrapper .product-thumbnail {
  width: 180px;
  margin-right: 1.75rem;
}

.cart-wrapper .product-thumbnail img {
  width: 180px;
  height: 180px;
  min-width: 180px;
  object-fit: cover;
  border-radius: 5px;
  border: var(--border);
}

/* Product name column */
.product-name-text {
  padding-right: 5rem;
}
.product-name .variation dt {
  font-weight: 400;
}
.product-name .variation a {
  color: var(--light-grey-clr);
}
.product-name .variation a:hover {
  color: var(--dark-grey-clr);
}

.cart-wrapper .cart_item.add-carbon-offset .product-name-text {
  padding-right: 3rem;
}

/* Quantity column */
.product-quantity-wrapper {
  margin-left: auto;
}
.product-quantity {
  width: 118px;
  min-width: 118px;

  /* Added to visually remove the product quantity when it is only 1 item */
  color: white;
  line-height: 0;
}

.cart-wrapper .quantity .qty::-webkit-outer-spin-button,
.cart-wrapper .quantity .qty::-webkit-inner-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}
.cart-wrapper .quantity .qty {
  width: 35px;
  padding: 0;
  height: 40px;
  text-align: center;
  font-weight: 700;
  border: none;
  appearance: textfield;
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
}
.cart-wrapper .quantity .qty:focus {
  outline: none;
  box-shadow: none;
}
.cart-wrapper .quantity {
  line-height: 36px;
  position: relative;
  border: var(--border);
  border-radius: 50px;
}
.cart-wrapper .quantity .gpbox-icon {
  margin: 6px;
  cursor: pointer;
  background: var(--ultra-light-grey-clr);
  transition: background-color 295ms var(--bezier-nobounce);
  border-radius: 50px;
  padding: 5px;
}
.cart-wrapper .quantity .gpbox-icon:hover {
  background: var(--very-light-grey-clr);
}

.cart-product-actions {
  margin-top: auto;
}

/* Product table Remove item */
.cart-product-actions .product-remove {
  width: 30px;
}
.cart-product-actions .add-coupon {
  margin-left: auto;
  margin-right: -1rem;
}

/* Carbon Offset */
.add-carbon-offset .carbon-button {
  max-width: unset;
  margin-left: auto;
}

[data-product_id="71540"] .product-name {
  pointer-events: none;
}

[data-product_id="71540"] .seller-info,
[data-product_id="71540"] .contact-seller,
[data-product_id="71540"] .add-to-favourites,
[data-product_id="71540"] .add-coupon {
  display: none;
}

@media screen and (max-width: 75rem) {
  .carbon-offset-text {
    width: 100%;
    margin-bottom: 1rem;
    margin-right: 0rem;
  }
}

/* 
* Cart Totals table
*/

/* Total Names */
.cart_totals tr > th {
  text-align: left;
  width: 100%;
  border: none;
}
/* Subtotals */
.cart_totals tr > td {
  text-align: right;
  width: 100%;
  border: none;
}

.cart_totals tr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-bottom: var(--border);
}

/* Coupon code */
.cart-discount div {
  color: var(--medium-dark-green-clr);
  background: var(--fade-green-darker-clr);
  height: 24px !important;
  padding: 0 0.5rem;
  margin: 0 -0.5rem;
  border-radius: 20px;
  position: relative;
}
.cart-discount .coupon-code_amount .amount {
  font-weight: 700;
}

.woocommerce-remove-coupon {
  position: absolute;
  margin-right: 25px;
  left: -35px;
  height: 24px;
}
.woocommerce-remove-coupon::before {
  content: "";
  position: absolute;
  background-image: url(https://www.thegpbox.com/app/themes/gpbox/assets/img/icons/close.svg);
  width: 20px;
  height: 20px;
  margin-left: 5px;
  margin-top: 1px;
  z-index: 2;
  background-size: 22px;
}
.woocommerce-remove-coupon:hover::before {
  opacity: 0.5;
}

/* Shipping country selector force responsive */
.cart_totals .woocommerce-shipping-country {
  flex-wrap: wrap;
}
.cart_totals .woocommerce-shipping-country > th {
  min-width: 90px;
  max-width: 90px;
}
.cart_totals .woocommerce-shipping-country > td {
  width: calc(100% - 90px);
}

/* Shipping */
/* Remove shipping label's double dots */
.woocommerce-shipping-methods label:not(.radio-buttons) {
  visibility: hidden;
  margin-left: auto;
  margin-bottom: 0;
  font-size: 0;
}
.woocommerce-shipping-methods label > span {
  visibility: visible;
  font-size: 1rem;
}
.woocommerce-shipping-methods label.radio-buttons {
  white-space: nowrap;
  margin: 0;
}

.woocommerce-shipping-country .country-currency__selector {
  border: var(--border);
  border-radius: 25px;
  padding-right: 15px;
  background: white;
  margin: 0;
}

.country-currency__selector .country__name {
  white-space: nowrap;
}

/* Go to Checkout Button */
.wc-proceed-to-checkout .disabled {
  background-color: var(--light-grey-clr);
}

/* Security elements */
.cart-collaterals__security .secure-shopping {
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-collaterals__security .secure-shopping.eye svg {
  width: 24px;
  height: 24px;
}
.cart-collaterals__security .secure-shopping.eye svg path {
  fill: var(--dark-grey-clr);
}

/* Purchase protection */
.product-protection {
  border-radius: 8px;
  padding: 0.75rem 1rem;
  background-color: var(--fade-blue-clr);
  color: var(--dark-blue-clr);
  min-height: 60px;
  line-height: 125%;
}

.product-protection a {
  color: var(--dark-blue-clr);
}
.product-protection a:hover {
  color: var(--dark-blue-clr);
  opacity: 0.5;
}

.product-protection svg {
  width: 30px;
  height: 30px;
}

.product-protection svg path {
  stroke: var(--dark-blue-clr);
}

/* 
* Error messages
*/
.restore-item {
  padding-left: 2rem;
  color: var(--medium-dark-green-clr);
  font-weight: 700;
  margin: auto 0;
}
.restore-item:hover {
  opacity: 0.5;
}

/* 
* Cart Empty
*/
.wc-empty-cart-message {
  margin-top: 1rem;
  margin-bottom: auto;
}
.wc-empty-cart-message + .cart-most-popular {
  margin-top: 3.5rem;
}

.woocommerce-notices-wrapper .woocommerce-message {
  margin: 0;
}

.woocommerce-notices-wrapper {
  margin-bottom: 2rem;
}

body.mobile .woocommerce-notices-wrapper {
  margin-bottom: 1rem;
}

.cart-back-to-shop + .woocommerce-notices-wrapper {
  margin-bottom: 0;
  margin-top: 2.5rem;
}

.cart-most-popular {
  margin-top: auto;
}

.cart-most-popular ul.products {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  grid-template-rows: 1fr minmax(0px, 0);
  overflow: hidden;
}

/*
* Cart Header
*/
body.cart:not(.mobile) #primary {
  overflow: visible;
  margin-bottom: 0;
}
body.cart:not(.mobile) #primary::before {
  content: "";
  position: absolute;
  width: 100vw;
  top: -2rem;
  left: calc(50% - 50vw);
  height: 2px;
  background-color: var(--ultra-light-grey-clr);
}

body.cart.mobile #primary {
  border-top: 2px solid var(--ultra-light-grey-clr);
}

/*
* Cart Footer 
*/
.site-footer {
  border-top: 2px solid var(--ultra-light-grey-clr);
}

.site-footer .postfooter.mw-container {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

@media screen and (max-width: 37.5rem) {
  .cart-most-popular ul.products {
    grid-template-columns: repeat(auto-fill, minmax(150px, 0.5fr));
    grid-template-rows: unset;
    row-gap: 0.5rem;
    column-gap: 0.75rem;
  }
  .vertical-border.checkout-company-fields > * {
    border-left: none;
    padding: 0;
  }
}

@media screen and (max-width: 64rem) {
  .woocommerce-cart-form {
    width: 100%;
    padding-right: 0;
  }

  .cart-collaterals {
    width: 100%;
    min-width: unset;
    max-width: unset;
    padding-left: 0;
  }

  .order-total td small {
    white-space: normal;
    font-size: 12px;
  }

  .cart-wrapper {
    margin-top: 1.5rem;
  }

  .cart.woocommerce-cart-form__contents {
    border: var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
  }

  .cart-wrapper .cart_item {
    padding-bottom: 1.5rem;
    padding-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: var(--border);
    overflow: hidden;
  }

  /* nth-last-child(2) due to actions being last and hidden */
  .cart-wrapper .cart_item:last-child {
    padding-bottom: 0;
    margin-bottom: 1rem;
  }

  .cart-wrapper .product-info {
    width: calc(100% - 80px - 0.75rem);
  }

  .cart-wrapper .product-thumbnail {
    max-width: 80px;
    width: 80px;
    margin-right: 0.75rem;
  }

  .cart-wrapper .product-thumbnail img {
    width: 80px;
    height: 80px;
    max-width: 80px;
    min-width: 80px;
  }
  .cart-wrapper .cart_item .product-name-text {
    padding-right: 0;
    line-height: 125%;
    width: 100%;
  }

  .vendor_gravatar {
    min-width: 32px;
  }

  .contact-seller {
    border: var(--border);
    border-radius: 50px;
    min-width: 40px;
    margin-left: auto;
  }
  .product-quantity-wrapper {
    margin-left: 0;
    margin-top: 1rem;
    margin-bottom: 1rem;
    width: 100%;
    justify-content: space-between;
  }

  .cart-product-actions .remove {
    margin-left: auto !important;
    padding-right: 0px !important;
  }
  .cart-product-actions .add-to-favourites {
    margin-left: -5px !important;
    order: -1;
  }

  .cart-product-actions .add-coupon {
    margin-left: 0px;
    margin-right: 0px;
    margin-top: 1rem;
    padding-left: 0px;
    display: none;
  }

  .product-subtotal {
    margin: 0.5rem 0;
  }

  /* Carbon offset mobile */
  .cart-wrapper .cart_item.add-carbon-offset .product-name-text {
    padding-right: 0.7rem;
    margin-bottom: 1rem;
  }

  .add-carbon-offset .carbon-button {
    padding: 0 13px;
    margin-left: 0;
    margin-top: 1.5rem;
  }

  .woocommerce-shipping-country .country-currency__selector {
    padding-right: 7px;
    padding-left: 12px;
  }

  .country-currency__selector .country__name {
    margin-right: 0.1rem;
  }

  .secure-shopping > .gpbox-icon.mr-0875 {
    margin-right: 0.4rem;
  }
  .secure-shopping > .semibold-text {
    font-size: 15px;
  }
}

@media screen and (min-width: 37.5rem) and (max-width: 64rem) {
  .contact-seller {
    border: none;
  }

  .product-quantity-wrapper {
    margin-top: unset;
    width: unset;
    justify-content: space-around;
  }

  .cart-wrapper .cart_item .product-name-text {
    padding-right: 4rem;
  }
}
