/**
 * Pastilles couleurs pour produits variables (Bolduc, Poids ballons)
 * CSS strictement identique au configurateur d'impression
 * (extrait de product-configurator.css, sections "PASTILLES" + "COLOR NAME")
 */

/* ============================================
   STRUCTURE
   ============================================ */

.lbp-color-picker {
    margin: var(--space-5) 0;
}

.lbp-color-picker .lbc-section-title {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 22px;
    font-weight: var(--fw-bold);
    color: var(--color-text);
    margin: 0 0 var(--space-2);
    line-height: 1.3;
}

/* ============================================
   COLOR NAME WRAP (identique au configurateur)
   ============================================ */

.lbc-color-name-wrap {
    display: block;
    margin: 12px 0 0 0;
    min-height: 1.4em;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: #555;
    line-height: 1.4;
    word-wrap: break-word;
}

.lbc-color-name {
    color: var(--color-text);
    font-weight: var(--fw-bold);
}

/* ============================================
   PASTILLES (identique au configurateur)
   ============================================ */

.lbc-pastilles {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 12px;
    max-width: 700px;
}

.lbc-pastille {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid transparent;
    box-sizing: border-box;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    padding: 0;
    transition: all 0.15s ease;
    background-clip: padding-box !important;
    position: relative;
}

.lbc-pastille:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.lbc-pastille.is-selected {
    border-color: var(--color-primary);
    border-width: 2px;
    box-shadow: 0 0 0 1px var(--color-primary), 0 2px 8px rgba(31, 168, 220, 0.3);
    transform: scale(1.1);
}

.lbc-pastille[style*="#FFFFFF"],
.lbc-pastille[style*="#ffffff"],
.lbc-pastille[style*="#FFF"],
.lbc-pastille[style*="#fff"] {
    box-shadow: 0 0 0 1px #ddd;
}

/* ============================================
   RUPTURE DE STOCK
   ============================================ */

.lbc-pastille.is-out-of-stock {
    opacity: 0.35;
    cursor: not-allowed;
}

.lbc-pastille.is-out-of-stock:hover {
    transform: none;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.lbc-pastille.is-out-of-stock::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    width: 70%;
    height: 2px;
    background: rgba(0, 0, 0, 0.5);
}

/* ============================================
   MASQUER LE SELECT WC NATIF
   ============================================ */

body.has-lbp-color-picker table.variations {
    display: none !important;
}

body.has-lbp-color-picker .single_variation_wrap {
    margin-top: var(--space-5);
}

body.has-lbp-color-picker .woocommerce-variation {
    margin-bottom: var(--space-4);
}

/* ============================================
   RESPONSIVE (identique au configurateur)
   ============================================ */

@media (max-width: 900px) {
    .lbp-color-picker .lbc-section-title {
        font-size: 20px;
    }
    .lbc-pastilles {
        grid-template-columns: repeat(8, 1fr);
        gap: 10px;
    }
    .lbc-pastille {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 600px) {
    .lbc-pastilles {
        grid-template-columns: repeat(7, 1fr);
    }
}
/* Aligner quantite + bouton avec un gap, comme sur les produits non-variables */
.woocommerce-variation-add-to-cart {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}
.lbp-color-picker .lbc-color-name-wrap {
    margin: 12px 0 24px 0 !important;
}