/* =====================================================
   Bonbon Configurator – frontend.css
   Laad via: chocolade_selector_frontend_styles()
   ===================================================== */

.bcs-wrap, .bcs-wrap * { box-sizing: border-box; }

/* ── Kolommen ── */
.bcs-wrap .bcs-cols {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}
@media (max-width: 700px) {
    .bcs-wrap .bcs-cols {
        flex-direction: column;
    }
    .bcs-wrap .bcs-col {
        width: 100%;
    }
    /* Grids gecentreerd op mobiel */
    .bcs-wrap .bcs-grid,
    .bcs-wrap .bcs-slots {
        justify-content: center;
    }
    /* Verpakkingen gestapeld */
    .bcs-wrap .bcs-verpak-opties {
        flex-direction: column;
    }
    .bcs-wrap .bcs-verpak-opt {
        width: 100%;
        min-width: 0;
        flex: none;
    }
}
.bcs-wrap .bcs-col {
    flex: 1;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 16px;
    min-width: 0;
    overflow: visible;
}

/* ── Heading ── */
.bcs-wrap .bcs-h {
    margin: 0 0 5px !important;
    padding: 0 !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    color: #000 !important;
    line-height: 1.3 !important;
    border: none !important;
    background: none !important;
}

/* ── Bonbon grid — hoogte wordt via JS ingesteld ── */
.bcs-wrap .bcs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    overflow-y: auto;
    overflow-x: visible;
    padding: 14px 18px 10px 4px;
    scrollbar-width: thin;
    scrollbar-color: #4c3d45 transparent;
}
.bcs-wrap .bcs-grid::-webkit-scrollbar { width: 6px; }
.bcs-wrap .bcs-grid::-webkit-scrollbar-track { background: transparent; }
.bcs-wrap .bcs-grid::-webkit-scrollbar-thumb {
    background: #4c3d45;
    border-radius: 4px;
}

.bcs-wrap .bcs-bonbon {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
}
@media (max-width: 500px) {
    .bcs-wrap .bcs-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Afbeelding — overflow hidden voor de foto zelf via een inner wrapper */
.bcs-wrap .bcs-img {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    border-radius: 8px;
    overflow: visible !important; /* NIET hidden — anders snijdt het de + knop af */
    background: transparent;
    cursor: pointer;
}

/* Inner clip zodat de foto zelf wél netjes wordt bijgesneden */
.bcs-wrap .bcs-img-inner {
    position: absolute !important;
    inset: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #e8e8e8 !important;
}

.bcs-wrap .bcs-img img,
.bcs-wrap .bcs-img .bcs-noimg {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 8px !important;
}
.bcs-wrap .bcs-noimg {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 2em !important;
}

/* ── + knop: buiten de afbeelding, gecentreerd ── */
.bcs-wrap .bcs-add {
    position: absolute;
    top: -9px;
    right: -9px;
    z-index: 4;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #4c3d45;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;   /* verticaal centreren via line-height */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.bcs-wrap .bcs-add:hover { background: #3a2e35; }
.bcs-wrap .bcs-add:after,
.bcs-wrap .bcs-add:before { display: none !important; }

/* ── Naam ── */
.bcs-wrap .bcs-name {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 400;
    color: #000;
    line-height: 1.3;
}

/* ── Allergenen ── */
.bcs-wrap .bcs-algs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
    margin-top: 3px;
}
.bcs-wrap .bcs-alg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    cursor: help;
}
.bcs-wrap .bcs-alg img,
.bcs-wrap .bcs-alg svg { width: 18px; height: 18px; }
.bcs-wrap .bcs-alg-lbl {
    font-size: 9px;
    font-weight: 700;
    background: #eee;
    border-radius: 3px;
    padding: 1px 2px;
    color: #4c3d45;
}

/* ── Slots grid ── */
.bcs-wrap .bcs-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* overschreven door JS */
    gap: 10px;
    margin-bottom: 10px;
    padding: 14px 14px 14px 4px;
    overflow: visible;
}
.bcs-wrap .bcs-slot {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #e8e8e8;
}
@media (max-width: 500px) {
    .bcs-wrap .bcs-slots { grid-template-columns: repeat(2, 1fr); }
}
.bcs-wrap .bcs-slot--empty  { border: 2px dashed #ccc; }
.bcs-wrap .bcs-slot--filled { border: 2px solid transparent; overflow: visible; }
.bcs-wrap .bcs-slot-in { position: absolute; inset: 0; }
.bcs-wrap .bcs-slot-in img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

/* ── − knop: buiten de slot-afbeelding, gecentreerd ── */
.bcs-wrap .bcs-rm {
    position: absolute;
    top: -9px;
    right: -9px;
    z-index: 4;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #4c3d45;
    border: none;
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.bcs-wrap .bcs-rm:hover { background: #3a2e35; }
.bcs-wrap .bcs-rm:after,
.bcs-wrap .bcs-rm:before { display: none !important; }

/* ── Teller ── */
.bcs-wrap .bcs-counter {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #000;
    margin-top: 8px;
    text-transform: uppercase;
}

/* ── Verpakking ── */
.bcs-wrap .bcs-verpak { margin-bottom: 16px; }
.bcs-wrap .bcs-verpak-opties {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
@media (max-width: 600px) {
    .bcs-wrap .bcs-verpak-opties { flex-direction: column; }
    .bcs-wrap .bcs-verpak-opt { min-width: 0; width: 100%; }
}
.bcs-wrap .bcs-verpak-opt {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 400;
    user-select: none;
    background: #fff;
    color: #333;
    transition: border-color .15s;
}
.bcs-wrap .bcs-verpak-opt input[type="radio"] { display: none; }
.bcs-wrap .bcs-verpak-opt--on {
    border-color: #4c3d45;
    color: #4c3d45;
    font-weight: 600;
}
.bcs-wrap .bcs-verpak-opt:hover { border-color: #4c3d45; }

/* ── Cart rij ── */
.bcs-wrap .bcs-cart-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── Qty — horizontaal: − getal + ── */
.bcs-wrap .bcs-qty {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: auto !important;
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    background: #fff !important;
}
.bcs-wrap #bcs-num {
    width: 36px !important;
    height: 38px !important;
    border: none !important;
    border-left: 1px solid #ccc !important;
    border-right: 1px solid #ccc !important;
    text-align: center !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    background: #fff !important;
    color: #000 !important;
    -moz-appearance: textfield !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: normal !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.bcs-wrap #bcs-num::-webkit-inner-spin-button,
.bcs-wrap #bcs-num::-webkit-outer-spin-button { -webkit-appearance: none !important; }

.bcs-wrap .bcs-qbtns { display: none !important; } /* niet meer nodig */

.bcs-wrap .bcs-qbtn {
    width: 34px !important;
    height: 38px !important;
    background: #fff !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 18px !important;
    color: #4c3d45 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
    margin: 0 !important;
    font-weight: 400 !important;
}
.bcs-wrap .bcs-qbtn:hover { background: #f5f5f5 !important; }
.bcs-wrap .bcs-qbtn:after,
.bcs-wrap .bcs-qbtn:before { display: none !important; }

/* ── Submit knop — meer top/bottom padding ── */
.bcs-wrap .bcs-btn,
.bcs-wrap .bcs-btn.button,
.bcs-wrap .bcs-btn.button.alt,
.woocommerce .bcs-wrap .bcs-btn,
.woocommerce-page .bcs-wrap .bcs-btn {
    height: auto !important;
    padding: 14px 36px !important;
    color: #fff !important;
    background: #4c3d45 !important;
    background-color: #4c3d45 !important;
    border: none !important;
    border-radius: 50px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
.bcs-wrap .bcs-btn:after,
.bcs-wrap .bcs-btn:before,
.bcs-wrap .bcs-btn.button:after,
.bcs-wrap .bcs-btn.button:before { display: none !important; content: '' !important; }

.bcs-wrap .bcs-btn:hover:not(:disabled),
.bcs-wrap .bcs-btn.button:hover:not(:disabled),
.woocommerce .bcs-wrap .bcs-btn:hover:not(:disabled),
.woocommerce-page .bcs-wrap .bcs-btn:hover:not(:disabled) {
    background: #3a2e35 !important;
    background-color: #3a2e35 !important;
    color: #fff !important;
    padding: 14px 36px !important;
    border: none !important;
    opacity: 1 !important;
}
.bcs-wrap .bcs-btn:disabled { opacity: 0.45 !important; cursor: not-allowed !important; }
.bcs-wrap .bcs-btn svg { flex-shrink: 0 !important; width: 20px !important; height: 20px !important; }

/* ── Tooltip: bonbon beschrijving ── */
#bcs-tooltip {
    position: fixed;
    z-index: 999999;
    background: #f6bddd;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 12px;
    pointer-events: none;
    max-width: 220px;
    white-space: normal;
    text-align: left;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
#bcs-tooltip::after {
    content: '';
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: #f6bddd;
}

/* ── Tooltip: allergeen naam ── */
#bcs-tooltip.bcs-tip--alg {
    background: #4c3d45;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    max-width: none;
    white-space: nowrap;
    text-align: center;
}
#bcs-tooltip.bcs-tip--alg::after { border-top-color: #4c3d45; }


/* ── Modal: te veel bonbons ── */
.bcs-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.bcs-modal {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px 28px;
    max-width: 420px;
    width: 100%;
    position: relative;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    text-align: center;
}
.bcs-modal-close {
    position: absolute;
    top: 14px; right: 16px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 4px;
}
.bcs-modal-close:hover { color: #4c3d45; }
.bcs-modal-close:after, .bcs-modal-close:before { display: none !important; }
.bcs-modal-tekst {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin: 0 0 24px;
    padding: 0;
}
.bcs-modal-tekst strong { color: #4c3d45; }
.bcs-modal-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}
.bcs-modal-nee {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    background: transparent !important;
    color: #4c3d45 !important;
    border: 1px solid #4c3d45 !important;
    border-radius: 50px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s, color .2s !important;
    /* Divi reset */
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
}
.bcs-modal-nee:hover,
.bcs-modal-nee:focus {
    background: #4c3d45 !important;
    color: #fff !important;
    border-color: #4c3d45 !important;
    padding: 10px 22px !important;
    border-width: 1px !important;
    box-shadow: none !important;
    text-shadow: none !important;
}
.bcs-modal-nee:after,
.bcs-modal-nee:before { display: none !important; content: '' !important; }
.bcs-modal-ja {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    background: #f6bddd;
    color: #fff !important;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .2s;
    border: none;
}
.bcs-modal-ja:hover { background: #e8a5c8; color: #fff !important; }
.bcs-modal-ja:after, .bcs-modal-ja:before { display: none !important; }
@media (max-width: 480px) {
    .bcs-modal { padding: 28px 20px 24px; }
    .bcs-modal-btns { flex-direction: column; }
    .bcs-modal-nee, .bcs-modal-ja { width: 100%; }
}