button[name='update_cart'] {
  opacity: 0;
  visibility: hidden;
  position: absolute;
  clip-path: inset(0 0 0 0);
}

.adebeo6-cart__return {
  margin-bottom: var(--adebeo-spacing-m);
}

body.woocommerce-cart .page-header {
  margin-top: 0;
}

/* =================================== */
/* TABLE */
/* =================================== */

.woocommerce-cart-form__contents {
  display: block;
}

.adebeo6-cart__wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--adebeo-spacing-m);
}

.woocommerce-cart-form__contents table {
  display: block;
  width: 100%;
}

.woocommerce-cart-form__contents thead {
  display: none;
}

.woocommerce-cart-form__contents tbody {
  display: grid;
  gap: 1rem;
}

.woocommerce-cart-form__contents tr {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  order: 0;
}

.woocommerce-cart-form__contents tr:has(.actions) {
  order: -1;
}

.cart_item {
  padding: var(--adebeo-spacing-s);
  border: 2px solid var(--adebeo-color-primary);
  border-radius: var(--adebeo-border-radius-xs);
}

.product-price {
  display: none;
}

.product-remove {
  position: absolute;
  z-index: 8;
  top: var(--adebeo-spacing-s);
  right: var(--adebeo-spacing-s);
  width: 32px;
  height: 32px;
  top: 8px;
  left: 8px;
}

.product-remove .remove {
  text-decoration: none;
  width: 32px;
  height: 32px;
  background-color: var(--adebeo-accent-color);
  border-radius: 30px;
  color: var(--adebeo-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(1);
  transition: transform 0.3s ease-in-out;
}

.product-remove:hover .remove {
  transform: scale(1.25);
}

.product-thumbnail a {
  pointer-events: none;
}

.product-name a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  padding-right: 130px;
  font-weight: 700;
  color: var(--adebeo-color-primary);
}

.product-name .variation {
  display: grid;
  grid-template-columns: 180px calc(100% - 180px);
  grid-gap: var(--adebeo-spacing-2xs) 0;
}

.adebeo6-cart__unit-price {
  display: block;
  margin-top: var(--adebeo-spacing-2xs);
  pointer-events: none;
}

.adebeo6-cart__unit-price .amount {
  font-weight: 300;
}

.product-subtotal {
  position: absolute;
  top: 25px;
  right: 20px;
  font-weight: 700;
  color: var(--adebeo-color-primary);
}

.product-quantity {
  position: absolute;
  top: 66px;
  right: 20px;
}

/* BOX Email licence */
.license-fields-wrapper {
  background-color: var(--adebeo-color-primary);
  padding: var(--adebeo-spacing-s);
  border-radius: var(--adebeo-border-radius-xs);
  color: var(--adebeo-white);
}

.license-fields-wrapper:has(+ .license-fields-wrapper) {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.license-fields-wrapper + .license-fields-wrapper {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.license-fields-wrapper__label {
  margin-bottom: var(--adebeo-spacing-2xs);
  font-size: var(--adebeo-font-size-h3);
}

.license-fields-wrapper .woocommerce-input-wrapper {
  display: block;
  margin-top: var(--adebeo-spacing-2xs);
}

.license-fields-wrapper .form-row {
  margin: 0;
}

.adebeo6-license-field.error {
  padding-right: 35px;
  border: 2px solid var(--adebeo-accent-color);
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill="%23d54414" d="M12 17q.425 0 .713-.288T13 16v-4q0-.425-.288-.712T12 11t-.712.288T11 12v4q0 .425.288.713T12 17m0-8q.425 0 .713-.288T13 8t-.288-.712T12 7t-.712.288T11 8t.288.713T12 9m0 13q-2.075 0-3.9-.788t-3.175-2.137T2.788 15.9T2 12t.788-3.9t2.137-3.175T8.1 2.788T12 2t3.9.788t3.175 2.137T21.213 8.1T22 12t-.788 3.9t-2.137 3.175t-3.175 2.138T12 22m0-2q3.35 0 5.675-2.325T20 12t-2.325-5.675T12 4T6.325 6.325T4 12t2.325 5.675T12 20m0-8"/></svg>')
    center right 8px no-repeat var(--adebeo-white);
}

/* Checkbox */
.license-fields-wrapper:has(input[type='checkbox']) {
  position: relative;
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: center;
  gap: var(--adebeo-spacing-2xs);
}

.license-fields-wrapper:has(input[type='checkbox']) :is(.woocommerce-input-wrapper, .license-fields-wrapper__label) {
    margin: 0;
}

.license-fields-wrapper:has(input[type='checkbox']) .checkbox.woocommerce-form__label {
    font-size: var(--adebeo-font-size-h4);
    min-height: 24px;
    padding-left: 24px;
}

.license-fields-wrapper:has(input[type='checkbox']) label:has(input[type='checkbox']) input[type='checkbox'] {
    width: 200px;
    max-width: calc(100vw - 40px);
}

.license-fields-wrapper:has(input[type='checkbox']) .required {
    display: none;
} 

/* =================================== */
/* Upload btn */
/* =================================== */

.shop_table .upload-file {
    min-height: 0;
    background: var(--adebeo-accent-color);
    color: var(--adebeo-white);
    border-radius: var(--adebeo-border-radius-xs);
    margin-bottom: var(--adebeo-spacing-2xs);
    padding: 15px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    font-size: var(--adebeo-font-size-btn);
    font-weight: 400;
    width: fit-content;
}

.shop_table .upload-file.upload-errors {
    background-position: 10px center;
    border-radius: var(--adebeo-border-radius-xs);
    margin-bottom: var(--adebeo-spacing-2xs);
    padding: 15px 30px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    font-size: var(--adebeo-font-size-btn);
    font-weight: 400;

}

.shop_table .upload-file:not(.upload-errors):before {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    transition: width 0.3s ease;
}

.shop_table .upload-file:not(.upload-errors):hover:before {
    width: 5px;
}

.shop_table .upload-file:not(.upload-errors):after {
    content: '';
    display: block;
    opacity: 0;
    transition: opacity 0.4s ease-out, width 0.3s ease, transform 0.3s ease;
    width: 20px;
    transform: translateX(-5px);
    height: 20px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 23 20"><path fill="%23fff" d="m22.03 10.111-9.669 9.67-1.06-1.061 7.938-7.94H.003v-1.5h19.075l-7.499-7.5L12.64.72l9.391 9.391Z"/></svg>') center right no-repeat;
}

.shop_table .upload-file:not(.upload-errors):hover:after {
    opacity: 1;
    width: 35px;
    transform: translateX(0);
}

/* =================================== */
/* Collaterals */
/* =================================== */

.cart_totals {
  padding: var(--adebeo-spacing-s);
  border: 2px solid var(--adebeo-color-primary);
  border-radius: var(--adebeo-border-radius-xs);
}

.cart_totals table {
  margin: var(--adebeo-spacing-s) 0;
  width: 100%;
}

.cart_totals table th {
  text-align: left;
}

.cart_totals table td {
  text-align: right;
}

.cart_totals tr:last-child {
  font-size: var(--adebeo-font-size-h3);
  color: var(--adebeo-color-primary);
}

.adebeo6-cart__reassurance {
  margin-top: var(--adebeo-spacing-s);
  text-align: center;
}

.cart_totals .checkout-button {
  width: 100%;
}

.cart-fields-error p {
  margin-bottom: var(--adebeo-spacing-s);
  color: var(--adebeo-accent-color);
}

div.woocommerce table.shop_table th.product-name {
  width: 100%;
  text-align: left;
}

/* Responsive : adapte les colonnes sur mobile */

@media (min-width: 1024px) {
  .adebeo6-cart__wrapper {
    grid-template-columns: 2fr 1fr;
  }

  .product-thumbnail {
    position: absolute;
    top: var(--adebeo-spacing-s);
    left: var(--adebeo-spacing-s);
  }

  .product-thumbnail img {
    height: 80px;
    width: 130px;
    object-fit: cover;
    border-radius: var(--adebeo-border-radius-xs);
  }

  .product-name a {
    padding-left: 142px;
    min-height: 110px;
  }

  .cart_totals {
    position: sticky;
    top: 80px;
  }
}

@media (max-width: 1023px) {
  .product-thumbnail {
    display: none;
  }
  .product-name a {
    padding-top: 30px;
    min-height: 130px;
  }
}

/* =================================== */
/* COUPON */
/* =================================== */

.coupon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 4px solid var(--adebeo-accent-color);
  background-color: var(--adebeo-accent-color);
  border-radius: var(--adebeo-border-radius-xs);
  margin-bottom: var(--adebeo-spacing-m);
  color: var(--adebeo-white);
}

/* =================================== */
/* INSTALL PROGRAM */
/* =================================== */

.adebeo6-cart__install-pack {
  margin-top: var(--adebeo-spacing-s);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--adebeo-spacing-s);
  padding: var(--adebeo-spacing-s);
  border-radius: var(--adebeo-border-radius-xs);
  background-color: var(--adebeo-color-primary);
  color: var(--adebeo-white);
}

.adebeo6-cart__install-pack h3 {
  margin-bottom: var(--adebeo-spacing-2xs);
}

.adebeo6-cart__install-pack .button {
  white-space: nowrap;
}

@media (max-width: 1023px) {
  .adebeo6-cart__install-pack {
    flex-direction: column;
  }
}

/* =================================== */
/* ADDONS */
/* =================================== */

.addons {
  margin: var(--adebeo-spacing-2xl) 0 0 0;
}

.addons h2 {
  margin-bottom: var(--adebeo-spacing-l);
}

/* =================================== */
/* EMPTY CART */
/* =================================== */

.cart-empty {
  margin: var(--adebeo-spacing-xm) 0;
}
