/**
 * Frais de livraison — L'Esprit du Combattant.
 *
 * Tout est préfixé « edc-ship » et porté par des variables posées sur le
 * conteneur : le plugin ne dépend d'aucun thème et n'écrase aucune de ses
 * règles.
 */

.edc-ship,
.edc-ship *,
.edc-ship *::before,
.edc-ship *::after {
  box-sizing: border-box;
}

.edc-ship {
  --edc-ship-gold: #d8a83e;
  --edc-ship-gold-dark: #7c5e22;
  --edc-ship-text: #f5f5f2;
  --edc-ship-muted: #9a9a93;
  --edc-ship-panel: #121417;
  --edc-ship-free: #5fbf5b;

  margin-top: 16px;
  color: var(--edc-ship-text);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- zone renforcee, ne pas retirer ----------
   Sans cette remise a zero, le style « button » du theme traverse et repeint
   les commandes du composant : la croix de fermeture devient bleue, les
   pastilles prennent un fond clair. Elle pese une classe et un element, donc
   moins que les regles du composant, qui en portent deux. */
.edc-ship button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
}

.edc-ship table {
  border-collapse: collapse;
  border-spacing: 0;
  background: none;
  margin: 0;
}

.edc-ship ul,
.edc-ship ol {
  margin: 0;
  padding: 0;
  list-style: none;
}


.edc-ship.edc-ship--panel{
  padding: 14px 16px 15px;
  background: var(--edc-ship-panel);
  border: 1px solid var(--edc-ship-gold-dark);
  border-radius: 3px;
}

.edc-ship .edc-ship__title{
  margin: 0 0 10px;
  font-family: var(--edc-ship-font-title, inherit);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--edc-ship-text);
}

/* ---------- Les tarifs ---------- */

.edc-ship .edc-ship__list{
  margin: 0;
  padding: 0;
  list-style: none;
}

.edc-ship .edc-ship__row{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(154, 154, 147, .22);
}

.edc-ship .edc-ship__row:last-child{ border-bottom: none; }

.edc-ship .edc-ship__label{
  min-width: 0;
  color: var(--edc-ship-muted);
}

.edc-ship .edc-ship__value{
  flex: 0 0 auto;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.edc-ship .edc-ship__value--free{ color: var(--edc-ship-free); }

/* WooCommerce enveloppe ses montants : on neutralise ses propres couleurs. */
.edc-ship .edc-ship__value .woocommerce-Price-amount,
.edc-ship .edc-ship__value bdi{
  color: inherit;
  font: inherit;
}

/* ---------- Livraison offerte ---------- */

.edc-ship .edc-ship__progress{ margin-top: 12px; }

.edc-ship .edc-ship__bar{
  height: 4px;
  background: rgba(154, 154, 147, .22);
  border-radius: 2px;
  overflow: hidden;
}

.edc-ship .edc-ship__bar span{
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--edc-ship-gold-dark), var(--edc-ship-gold));
  transition: width .4s ease-out;
}

.edc-ship .edc-ship__goal{
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--edc-ship-muted);
}

.edc-ship .edc-ship__goal strong{
  color: var(--edc-ship-gold);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.edc-ship .edc-ship__goal--done{ color: var(--edc-ship-free); font-weight: 600; }

/* ---------- Mentions ---------- */

.edc-ship .edc-ship__note{
  margin: 11px 0 0;
  font-size: 12px;
  color: var(--edc-ship-muted);
}

/* Rappel réservé au marchand. */
.edc-ship .edc-ship__admin{
  margin: 12px 0 0;
  padding: 9px 11px;
  border-left: 3px solid var(--edc-ship-gold);
  background: rgba(216, 168, 62, .09);
  font-size: 12px;
  color: var(--edc-ship-text);
}

@media (max-width: 420px) {
  .edc-ship .edc-ship__row{
    flex-direction: column;
    gap: 2px;
  }
  .edc-ship .edc-ship__value{ align-self: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .edc-ship .edc-ship__bar span{ transition: none; }
}
