/* =========================================================
   Styles pour [bgc_retailer_order_form]
   Version 1.4 - Ajustement Marge & Design
   ========================================================= */

.bgc-retailer-form-wrap {
    max-width: 1100px; /* Un peu plus large pour accueillir la colonne Marge */
    margin: 0 auto; 
}

/* --- 1. Barre d'outils (Haut et Bas) --- */
.bgc-b2b-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px; 
    flex-wrap: wrap;
    gap: 10px;
}

.bgc-b2b-toolbar h3 {
    margin: 0;
    font-size: 24px; 
}

.bgc-b2b-toolbar-bottom {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end; 
}

/* --- 2. NOUVEAU STYLE DE BOUTON --- */
.bgc-b2b-toolbar .button-primary,
.bgc-b2b-toolbar-bottom .button-primary {
    background: linear-gradient(135deg, #6366F1, #8B5CF6); 
    border: none;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 20px; 
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.2s ease-out;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.bgc-b2b-toolbar .button-primary:hover,
.bgc-b2b-toolbar-bottom .button-primary:hover {
    background: linear-gradient(135deg, #4F46E5, #7C3AED); 
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px); 
}
.bgc-b2b-toolbar .button-primary .dashicons,
.bgc-b2b-toolbar-bottom .button-primary .dashicons {
    margin: 0; line-height: 1;
}

/* --- 3. Style de la Table (Look "Cartes") --- */
.bgc-b2b-order-table {
    width: 100%;
    border-collapse: separate; 
    border-spacing: 0 15px; /* Espacement vertical entre les cartes */
}

/* En-tête */
.bgc-b2b-order-table thead th {
    text-align: left;
    padding: 0 16px 10px 16px;
    color: #64748B; 
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none; 
    background: none;
}

/* Lignes (Cartes) */
.bgc-b2b-order-table tbody tr {
    background: #ffffff;
    border-radius: 12px; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bgc-b2b-order-table tbody tr:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); 
    transform: translateY(-2px);
}

.bgc-b2b-order-table td {
    padding: 20px;
    vertical-align: top; /* Alignement haut pour gérer les descriptions longues */
    border: none; 
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
}

/* Coins arrondis */
.bgc-b2b-order-table tbody tr td:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    border-left: 1px solid transparent;
}
.bgc-b2b-order-table tbody tr td:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    border-right: 1px solid transparent;
}

/* --- 4. Contenu des Cellules --- */

/* Largeurs des colonnes */
.bgc-b2b-order-table .bgc-b2b-th-cover { width: 80px; }
.bgc-b2b-order-table .bgc-b2b-th-product { width: auto; }
.bgc-b2b-order-table .bgc-b2b-th-margin { width: 100px; text-align: center; }
.bgc-b2b-order-table .bgc-b2b-th-qty { width: 100px; text-align: center; }
.bgc-b2b-order-table .bgc-b2b-th-price { width: 120px; text-align: right; }

/* Cover */
.bgc-b2b-order-table td img {
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Titre */
.bgc-b2b-order-table td strong a {
    font-size: 16px;
    color: #1e293b;
    font-weight: 700;
    text-decoration: none;
}
.bgc-b2b-order-table td strong a:hover {
    color: #3b82f6;
}

/* Publisher Name */
.bgc-b2b-publisher small {
    font-size: 13px; color: #94a3b8;
}

/* Badges Shipping & Hype */
.bgc-b2b-badges {
    display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px;
}
.bgc-ship-badge {
    font-size: 10px; padding: 2px 6px; border-radius: 4px; 
    border: 1px solid; font-weight: 600; display: inline-block;
}
.bgc-ship-free { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.bgc-ship-reduced { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.bgc-ship-6plus1 { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }

/* Hype Score */
.bgc-hype-score {
    display: inline-flex; align-items: center; gap: 4px;
    background: #f3f4f6; padding: 2px 8px; border-radius: 12px;
    font-size: 11px; color: #4b5563; margin-top: 8px;
}
.bgc-hype-score .dashicons { font-size: 14px; width: 14px; height: 14px; }

/* Preorder Tag */
.bgc-b2b-preorder-tag {
    font-size: 10px; font-weight: 800; text-transform: uppercase;
    color: #b45309; background-color: #fef3c7; 
    padding: 2px 6px; border-radius: 4px; margin-left: 5px;
}

/* Inputs */
.bgc-b2b-qty-input {
    width: 100%; padding: 8px; font-size: 15px; font-weight: 600; text-align: center;
    border: 1px solid #cbd5e1; border-radius: 6px; background: #f8fafc;
    transition: all 0.2s;
}
.bgc-b2b-qty-input:focus {
    background: #fff; border-color: #3b82f6; outline: none;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

/* Totaux */
.bgc-line-total { font-size: 16px; font-weight: 800; color: #0f172a; display: block; }
.bgc-unit-price-display { font-size: 12px; color: #64748b; }

/* Hint (Message dynamique) */
.bgc-discount-hint {
    font-size: 11px; color: #d97706; background: #fffbeb;
    padding: 4px 8px; border-radius: 4px; margin-top: 6px;
    display: inline-block; border: 1px solid #fef3c7;
}
.bgc-discount-hint.is-success { 
    color: #059669; background: #ecfdf5; border-color: #d1fae5; font-weight: 600; 
}

/* Légende (Haut de page) */
.bgc-legend-box {
    margin-bottom: 20px; padding: 15px 20px; background: #fff; 
    border: 1px solid #e2e8f0; border-radius: 8px; 
    display: flex; flex-wrap: wrap; align-items: center; gap: 20px; 
    font-size: 13px; box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}