/* ── Custom Shipping by Weight PRO — frontend.css ── */

/* ── <li> de chaque méthode ─────────────────────────────────────────────── */

ul#shipping_method li {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    padding: 4px 0 !important;
}

/* ── <label> : flex avec space-between pour titre ↔ prix ────────────────── */
/*
   Le label contient (dans l'ordre DOM) :
     1. Texte du titre          → flex-item de gauche
     2. .csbw-free-label        → poussé à droite (margin-left:auto + space-between)
     3. .csbw-shipping-meta     → flex-basis:100% → passe à la ligne suivante
*/

ul#shipping_method li label {
    display: flex !important;
    flex-wrap: wrap !important;
    flex: 1 !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    width: 100% !important;
    cursor: pointer;
}

/* Prix WooCommerce standard (livraison payante) */
ul#shipping_method li label .woocommerce-Price-amount {
    margin-left: auto !important;
    padding-left: 12px !important;
    white-space: nowrap !important;
    font-weight: 600;
}

/* ── Label livraison gratuite ─────────────────────────────────────────────── */

.csbw-free-label {
    margin-left: auto !important;   /* fonctionne si le label est flex */
    padding-left: 12px;
    color: #28a745;
    font-weight: 700;
    white-space: nowrap;
}

/* ── Bloc secondaire : date estimée + description ────────────────────────── */

.csbw-shipping-meta {
    display: flex !important;
    flex-direction: column;
    flex-basis: 100% !important;    /* force le passage à la ligne */
    margin-top: 4px;
    line-height: 1.5;
}

.csbw-estimated-delivery {
    display: block;
    font-weight: 700;
    font-size: 0.88em;
}

.csbw-user-info {
    display: block;
    font-size: 0.84em;
    color: #888;
}

.csbw-discount-info {
    display: block;
    font-size: 0.88em;
    color: #28a745;
    font-weight: 600;
}
