/* Panier : récapitulatif et calculateur de livraison alignés sur la même largeur. */
body.woocommerce-cart .cart-collaterals,
body.woocommerce-cart .cart-collaterals .cart_totals {
  clear: both;
  float: none !important;
  width: 100% !important;
}

body.woocommerce-cart .cart-collaterals .cart_totals {
  margin: 2rem auto 0 !important;
  max-width: 1120px;
}

body.woocommerce-cart .cart-collaterals .cart_totals h2 {
  margin: 0 0 .75rem;
}

body.woocommerce-cart .cart-collaterals .cart_totals table {
  table-layout: fixed;
  width: 100%;
}

body.woocommerce-cart .cart-collaterals .cart_totals th {
  width: 25%;
}

body.woocommerce-cart .cart-collaterals tr.woocommerce-shipping-totals th {
  vertical-align: top;
}

body.woocommerce-cart .cart-collaterals tr.woocommerce-shipping-totals td {
  background:var(--andrusin-panel) !important;
  text-align:left !important;
  width: 75%;
}

body.woocommerce-cart .cart-collaterals tr.woocommerce-shipping-totals ul#shipping_method,
body.woocommerce-cart .cart-collaterals tr.woocommerce-shipping-totals ul#shipping_method li {
  background:var(--andrusin-panel) !important;
  display:block !important;
  margin:0 !important;
  padding:0 !important;
  text-align:left !important;
  width:100%;
}

body.woocommerce-cart .cart-collaterals tr.woocommerce-shipping-totals ul#shipping_method label {
  display:block;
  text-align:left !important;
}

body.woocommerce-cart .woocommerce-shipping-calculator,
body.woocommerce-cart .shipping-calculator-form {
  width: 100%;
}

body.woocommerce-cart .shipping-calculator-form {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem 1rem;
  padding-top: .4rem !important;
}

body.woocommerce-cart .shipping-calculator-form .form-row {
  clear: none !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

body.woocommerce-cart .shipping-calculator-form .form-row input,
body.woocommerce-cart .shipping-calculator-form .form-row select,
body.woocommerce-cart .shipping-calculator-form .select2-container {
  margin: 0;
  width: 100% !important;
}

body.woocommerce-cart .shipping-calculator-form > p:last-of-type {
  grid-column: 1 / -1;
  margin: .15rem 0 0 !important;
}

body.woocommerce-cart .shipping-calculator-form button[name="calc_shipping"] {
  min-width: 10rem;
}

/* Liste des destinations : une option par ligne et une échelle stable. */
body.woocommerce-cart .select2-results__options,
body.woocommerce-cart .select2-results__option {
  box-sizing:border-box;
  width:100%;
}
body.woocommerce-cart .select2-results__option {
  display:block !important;
  font-family:"metisregular", serif;
  font-size:.95rem;
  line-height:1.35;
  margin:0 !important;
  min-height:40px;
  padding:.55rem .7rem !important;
  white-space:normal;
}
body.woocommerce-cart .shipping-calculator-form select,
body.woocommerce-cart .select2-container .select2-selection,
body.woocommerce-cart .select2-container .select2-selection__rendered {
  font-family:"metisregular", serif !important;
  font-size:.95rem !important;
}

@media (min-width: 701px) {
  body.woocommerce-cart .cart-collaterals .cart_totals tr.cart-subtotal th,
  body.woocommerce-cart .cart-collaterals .cart_totals tr.cart-subtotal td,
  body.woocommerce-cart .cart-collaterals .cart_totals tr.woocommerce-shipping-totals th,
  body.woocommerce-cart .cart-collaterals .cart_totals tr.woocommerce-shipping-totals td {
    border-bottom:1px solid var(--andrusin-line) !important;
  }
  body.woocommerce-cart .cart-collaterals .cart_totals tr.woocommerce-shipping-totals th,
  body.woocommerce-cart .cart-collaterals .cart_totals tr.woocommerce-shipping-totals td,
  body.woocommerce-cart .cart-collaterals .cart_totals tr.order-total th,
  body.woocommerce-cart .cart-collaterals .cart_totals tr.order-total td {
    border-top:0 !important;
  }
  body.woocommerce-cart .cart-collaterals .cart_totals tr.cart-subtotal th,
  body.woocommerce-cart .cart-collaterals .cart_totals tr.cart-subtotal td {
    border-top:0 !important;
  }

  body.woocommerce-cart .cart-collaterals tr.woocommerce-shipping-totals td,
  body.woocommerce-cart .cart-collaterals tr.woocommerce-shipping-totals ul#shipping_method,
  body.woocommerce-cart .cart-collaterals tr.woocommerce-shipping-totals ul#shipping_method li,
  body.woocommerce-cart .cart-collaterals tr.woocommerce-shipping-totals ul#shipping_method label,
  body.woocommerce-cart .woocommerce-shipping-destination,
  body.woocommerce-cart .shipping-calculator-button {
    text-align:left !important;
  }

  body.woocommerce-cart .shipping-calculator-form > p:last-of-type {
    align-self:end;
    grid-column:2;
    margin:0 !important;
  }

  body.woocommerce-cart .shipping-calculator-form button[name="calc_shipping"] {
    height:42px;
    margin:0;
    min-width:10rem;
    width:auto;
  }
}

@media (max-width: 700px) {
  body.woocommerce-cart .select2-results__option {
    font-size:1rem;
    min-height:44px;
    padding:.65rem .75rem !important;
  }
  body.woocommerce-cart .shipping-calculator-form select,
  body.woocommerce-cart .select2-container .select2-selection,
  body.woocommerce-cart .select2-container .select2-selection__rendered {
    font-size:1rem !important;
  }

  body.woocommerce-cart .cart-collaterals .cart_totals {
    margin-top: 1.5rem !important;
  }

  body.woocommerce-cart .cart-collaterals .cart_totals table,
  body.woocommerce-cart .cart-collaterals .cart_totals tbody,
  body.woocommerce-cart .cart-collaterals .cart_totals tr,
  body.woocommerce-cart .cart-collaterals .cart_totals th,
  body.woocommerce-cart .cart-collaterals .cart_totals td {
    display: block;
    width: 100% !important;
  }

  body.woocommerce-cart .cart-collaterals .cart_totals tr {
    border-bottom: 1px solid var(--andrusin-line);
  }

  body.woocommerce-cart .cart-collaterals .cart_totals th,
  body.woocommerce-cart .cart-collaterals .cart_totals td {
    border: 0 !important;
    padding: .7rem .85rem;
  }

  body.woocommerce-cart .cart-collaterals .cart_totals td {
    padding-top: 0;
  }

  /* Expédition mobile : une seule surface et une hiérarchie régulière. */
  body.woocommerce-cart .cart-collaterals tr.woocommerce-shipping-totals td,
  body.woocommerce-cart .cart-collaterals tr.woocommerce-shipping-totals ul#shipping_method,
  body.woocommerce-cart .cart-collaterals tr.woocommerce-shipping-totals ul#shipping_method li {
    background:var(--andrusin-panel) !important;
  }
  body.woocommerce-cart .cart-collaterals tr.woocommerce-shipping-totals ul#shipping_method,
  body.woocommerce-cart .cart-collaterals tr.woocommerce-shipping-totals ul#shipping_method li {
    margin:0 !important;
    padding:0 !important;
    text-align:left !important;
    width:100%;
  }
  body.woocommerce-cart .cart-collaterals tr.woocommerce-shipping-totals ul#shipping_method label,
  body.woocommerce-cart .woocommerce-shipping-destination,
  body.woocommerce-cart .shipping-calculator-button,
  body.woocommerce-cart .shipping-calculator-form label {
    font-size:1rem !important;
    line-height:1.4;
  }
  body.woocommerce-cart .cart-collaterals tr.woocommerce-shipping-totals ul#shipping_method label {
    display:block;
    margin:0 0 .8rem;
    text-align:left;
  }
  body.woocommerce-cart .woocommerce-shipping-destination {
    margin:.2rem 0 1.35rem;
  }
  body.woocommerce-cart .shipping-calculator-button {
    margin:.2rem 0 .9rem;
  }

  /* Détache visuellement le montant du bandeau Total. */
  body.woocommerce-cart .cart-collaterals .cart_totals tr.cart-subtotal td {
    padding-top:.55rem;
  }
  body.woocommerce-cart .cart-collaterals .cart_totals tr.order-total td {
    padding-top:.65rem;
  }

  /* Les titres sont déjà affichés par les cellules <th> : neutralise la
   * seconde copie ajoutée par WooCommerce via data-title. */
  body.woocommerce-cart .cart-collaterals .cart_totals td::before,
  body.woocommerce-cart .cart-collaterals .cart_totals td[data-title]::before {
    content: none !important;
    display: none !important;
  }

  body.woocommerce-cart .shipping-calculator-form {
    grid-template-columns: 1fr;
    gap: .7rem;
  }

  body.woocommerce-cart .shipping-calculator-form > p:last-of-type {
    grid-column: auto;
  }

  body.woocommerce-cart .shipping-calculator-form button[name="calc_shipping"] {
    width: 100%;
  }
}
