/* ============================
   WC Bundle Builder — Shared
   v2.1.0
   ============================ */

/* ---- CSS Variables (theme-adaptive) ---- */
:root {
    --wcbb-accent:        #7c6ff7;
    --wcbb-accent-shadow: rgba(124, 111, 247, 0.35);
    --wcbb-bg:            #ffffff;
    --wcbb-bg-item:       #f5f5f5;
    --wcbb-border:        #e0e0e0;
    --wcbb-border-radius: 8px;
    --wcbb-text:          #333333;
    --wcbb-text-muted:    #666666;
    --wcbb-disabled-op:   0.4;
    --wcbb-tick-bg:       rgba(0, 0, 0, 0.5);
    --wcbb-summary-bg:    #f9f9f9;
    --wcbb-summary-border:#e0e0e0;
}

@media (prefers-color-scheme: dark) {
    :root {
        --wcbb-bg:            #1a1a1a;
        --wcbb-bg-item:       #252525;
        --wcbb-border:        #3a3a3a;
        --wcbb-text:          #d4d4d4;
        --wcbb-text-muted:    #999999;
        --wcbb-summary-bg:    #222222;
        --wcbb-summary-border:#3a3a3a;
    }
}

body.dark-mode, body.is-dark, .ct-dark-mode, [data-theme="dark"] {
    --wcbb-bg:            #1a1a1a;
    --wcbb-bg-item:       #252525;
    --wcbb-border:        #3a3a3a;
    --wcbb-text:          #d4d4d4;
    --wcbb-text-muted:    #999999;
    --wcbb-summary-bg:    #222222;
    --wcbb-summary-border:#3a3a3a;
}

/* ---- Image Picker ---- */
.wcbb-picker { margin: 1.5em 0; }

.wcbb-picker__header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .6em 2em;
    margin-bottom: 1.2em;
}
.wcbb-picker__instructions { margin: 0; font-weight: 600; color: var(--wcbb-text); }
.wcbb-picker__counter      { margin: 0; font-size: .9em; color: var(--wcbb-text-muted); }
.wcbb-count                { font-weight: 700; color: var(--wcbb-accent); }

.wcbb-picker__actions { margin-left: auto; }
.wcbb-clear-all {
    font-size: .8em;
    padding: 3px 10px;
    border: 1px solid var(--wcbb-border);
    border-radius: 4px;
    background: transparent;
    color: var(--wcbb-text-muted);
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.wcbb-clear-all:hover { color: var(--wcbb-accent); border-color: var(--wcbb-accent); }

.wcbb-picker__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 14px;
    margin-bottom: 1.2em;
}

.wcbb-picker__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}
.wcbb-picker__item input[type="checkbox"] { display: none; }

.wcbb-picker__img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid var(--wcbb-border);
    border-radius: var(--wcbb-border-radius);
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    background: var(--wcbb-bg-item);
}
.wcbb-picker__img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .2s;
}
.wcbb-picker__item:hover:not(.is-disabled) .wcbb-picker__img-wrap img {
    transform: scale(1.06);
}
.wcbb-picker__no-img {
    display: block; width: 100%; height: 100%;
    background: var(--wcbb-bg-item);
}
.wcbb-picker__tick {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--wcbb-tick-bg);
    color: #fff; font-size: 2em; font-weight: 700;
    opacity: 0; transition: opacity .15s;
    border-radius: 6px;
}

/* Selected */
.wcbb-picker__item.is-selected .wcbb-picker__img-wrap {
    border-color: var(--wcbb-accent);
    box-shadow: 0 0 0 3px var(--wcbb-accent-shadow);
    transform: translateY(-2px);
}
.wcbb-picker__item.is-selected .wcbb-picker__tick { opacity: 1; }

/* Disabled */
.wcbb-picker__item.is-disabled { opacity: var(--wcbb-disabled-op); cursor: not-allowed; }
.wcbb-picker__item.is-disabled .wcbb-picker__img-wrap { border-color: var(--wcbb-border); }

.wcbb-picker__label {
    font-size: .82em;
    text-align: center;
    line-height: 1.3;
    color: var(--wcbb-text);
}

/* Selection summary */
.wcbb-picker__summary {
    display: none;
    margin: .5em 0 1em;
    padding: 10px 14px;
    background: var(--wcbb-summary-bg);
    border: 1px solid var(--wcbb-summary-border);
    border-radius: var(--wcbb-border-radius);
}
.wcbb-picker__summary.is-visible { display: block; }
.wcbb-picker__summary-title {
    font-size: .8em;
    font-weight: 600;
    color: var(--wcbb-text-muted);
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.wcbb-picker__summary-list {
    margin: 0; padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.wcbb-picker__summary-list li {
    font-size: .82em;
    background: var(--wcbb-accent);
    color: #fff;
    padding: 3px 10px;
    border-radius: 20px;
}

/* Message */
.wcbb-picker__message { margin: .5em 0 1em; }
.wcbb-picker__message label { display: block; margin-bottom: 4px; color: var(--wcbb-text); }
.wcbb-picker__message textarea {
    width: 100%; max-width: 480px;
    background: var(--wcbb-bg-item);
    border: 1px solid var(--wcbb-border);
    color: var(--wcbb-text);
    border-radius: 4px;
    padding: 6px 8px;
}

/* Notice */
.wcbb-picker__notice { margin: .5em 0; min-height: 1.2em; font-size: .9em; color: var(--wcbb-text); }
.wcbb-picker__notice.is-error { color: #e53935; }

/* ---- Slot Builder ---- */
.wcbb-slots { margin: 1.5em 0; }

.wcbb-slot {
    border: 1px solid var(--wcbb-border);
    border-radius: var(--wcbb-border-radius);
    padding: 16px;
    margin-bottom: 16px;
    background: var(--wcbb-bg-item);
}
.wcbb-slot__title   { font-weight: 600; margin: 0 0 8px; color: var(--wcbb-text); }
.wcbb-slot__current { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.wcbb-slot__current img {
    width: 64px; height: 64px;
    object-fit: cover; border-radius: 6px;
    border: 1px solid var(--wcbb-border);
}
.wcbb-slot__name  { font-size: .95em; color: var(--wcbb-text); }
.wcbb-slot__empty { color: var(--wcbb-text-muted); font-size: .9em; font-style: italic; }
.wcbb-slot__badge {
    display: inline-block; font-size: .75em;
    padding: 2px 8px; border-radius: 10px;
    background: #ffe082; color: #333;
    margin-bottom: 6px;
}
.wcbb-slot__badge.is-required { background: #ffcdd2; color: #c62828; }
.wcbb-slot__change {
    font-size: .85em; cursor: pointer;
    border: 1px solid var(--wcbb-border); border-radius: 4px;
    padding: 4px 10px; background: var(--wcbb-bg); color: var(--wcbb-text);
}

/* Modal */
.wcbb-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
}
.wcbb-modal {
    background: var(--wcbb-bg); border-radius: 10px;
    padding: 24px; max-width: 600px; width: 90%;
    max-height: 80vh; overflow-y: auto;
}
.wcbb-modal__header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.wcbb-modal__title  { font-size: 1.1em; font-weight: 600; margin: 0; color: var(--wcbb-text); }
.wcbb-modal__close  { cursor: pointer; font-size: 1.4em; background: none; border: none; color: var(--wcbb-text-muted); }
.wcbb-modal__grid   { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.wcbb-modal__item {
    border: 2px solid var(--wcbb-border); border-radius: var(--wcbb-border-radius);
    padding: 8px; cursor: pointer; text-align: center;
    transition: border-color .15s; background: var(--wcbb-bg-item);
}
.wcbb-modal__item:hover,
.wcbb-modal__item.is-selected { border-color: var(--wcbb-accent); }
.wcbb-modal__item img         { width: 100%; aspect-ratio:1; object-fit:cover; border-radius:4px; }
.wcbb-modal__item-name        { font-size: .82em; margin-top: 4px; color: var(--wcbb-text); }
.wcbb-modal__variants         { margin-top: 8px; }
.wcbb-modal__variants select  { width: 100%; }

.wcbb-price-total { font-size: 1.1em; font-weight: 600; margin: 1em 0 .5em; color: var(--wcbb-text); }
.wcbb-slots__notice { font-size:.9em; min-height:1.2em; color: var(--wcbb-text); }
.wcbb-slots__notice.is-error { color: #e53935; }

/* ---- Responsive ---- */
@media (max-width: 480px) {
    .wcbb-picker__grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .wcbb-modal { padding: 16px; }
    .wcbb-modal__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 481px) and (max-width: 768px) {
    .wcbb-picker__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================
   Visual Box Builder (mode: visual_box)
   ============================ */
/* Pin a clean light palette on the bundle UI so it always matches the
   nalaynshareef store — the site's dark-mode classes must not darken it. */
.wcbb-vbox {
    --wcbb-accent:        #b8912f;   /* gold, on-brand */
    --wcbb-accent-shadow: rgba(184,145,47,.30);
    --wcbb-bg:            #ffffff;
    --wcbb-bg-item:       #f6f6f4;
    --wcbb-border:        #e7e5e0;
    --wcbb-text:          #2a2d31;
    --wcbb-text-muted:    #6b7280;
    --wcbb-summary-bg:    #faf9f6;
    --wcbb-summary-border:#ece9e2;
    margin: 1em 0;
    color: var(--wcbb-text);
}
.wcbb-vbox__stage {
    position: relative;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    aspect-ratio: 16 / 6;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: var(--wcbb-border-radius);
    overflow: hidden;
}
/* Bookmarks are tall, 4-across — give the stage room so it isn't cramped. */
.wcbb-vbox--tall .wcbb-vbox__stage { aspect-ratio: 16 / 10; max-width: 520px; }
.wcbb-vbox__stage.is-placeholder {
    background: var(--wcbb-bg-item);
    border: 2px dashed var(--wcbb-border);
}
.wcbb-vbox__row {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    gap: 3%; padding: 5%;
}
.wcbb-vbox--tall .wcbb-vbox__row { gap: 4%; padding: 6% 5%; }
.wcbb-vbox__slot {
    flex: 1 1 0;
    min-width: 0;
    height: 84%;
    display: flex; align-items: center; justify-content: center;
    /* Nudge outer wells inward to match the box perspective. */
    --wcbb-well-nudge: 3%;
}
.wcbb-vbox--tall .wcbb-vbox__slot { height: 92%; }
/* Pull well 1 right and well 4 left to sit inside the tilted box. */
.wcbb-vbox__slot[data-slot="0"] { transform: translateX(var(--wcbb-well-nudge)); }
.wcbb-vbox__slot[data-slot="3"] { transform: translateX(calc(-1 * var(--wcbb-well-nudge))); }

/* Bookmarks: lie sideways, overlapping into a close vertical fan in the box.
   Each slot is a thin band; the bookmark image is rotated 90deg (portrait ->
   landscape) and slots overlap via absolute stacking so they sit ON each other. */
.wcbb-vbox--bookmarks .wcbb-vbox__stage { aspect-ratio: 16 / 9; }
.wcbb-vbox--bookmarks .wcbb-vbox__row {
    display: block; padding: 0;
}
.wcbb-vbox--bookmarks .wcbb-vbox__slot {
    position: absolute; left: 50%; width: 74%; height: 26%;
    transform: translateX(-50%);
    display: flex; align-items: center; justify-content: center;
}
/* Stagger vertically, close together (each ~11% apart => heavy overlap). */
.wcbb-vbox--bookmarks .wcbb-vbox__slot[data-slot="0"] { top: 20%; z-index: 4; }
.wcbb-vbox--bookmarks .wcbb-vbox__slot[data-slot="1"] { top: 31%; z-index: 3; }
.wcbb-vbox--bookmarks .wcbb-vbox__slot[data-slot="2"] { top: 42%; z-index: 2; }
.wcbb-vbox--bookmarks .wcbb-vbox__slot[data-slot="3"] { top: 53%; z-index: 1; }
.wcbb-vbox--bookmarks .wcbb-vbox__preview { overflow: visible; }
.wcbb-vbox--bookmarks .wcbb-vbox__preview img {
    max-width: none; max-height: none;
    height: 300%; width: auto;           /* portrait art, rotated below, spans the band */
    filter: drop-shadow(0 5px 10px rgba(0,0,0,.35));
}
/* Straight (no fan tilt) — bookmarks lie flat and stacked in the box. */
.wcbb-vbox--bookmarks .wcbb-vbox__preview img { transform: rotate(90deg); }
.wcbb-vbox--bookmarks .wcbb-vbox__empty { display: none; }
.wcbb-vbox__preview {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    transition: transform .15s ease;
}
.wcbb-vbox__preview:has(img) { transform: scale(1.02); }
.wcbb-vbox__preview img {
    max-width: 100%; max-height: 100%; object-fit: contain;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,.28));
    animation: wcbb-drop-in .22s ease;
}
@keyframes wcbb-drop-in { from { opacity: 0; transform: translateY(-6px) scale(.94); } to { opacity: 1; transform: none; } }
.wcbb-vbox__empty {
    font-size: .72em; letter-spacing: .02em;
    color: #9aa1ab; text-align: center; padding: 0;
    background: none; border: 0;
}
/* Once a badge is placed in a well, no chrome behind it. */
.wcbb-vbox__preview:has(img) { background: none; }
.wcbb-vbox__pickers { display: grid; gap: 18px; margin-top: 18px; }
.wcbb-vbox__picker {
    padding: 12px 14px;
    border: 1px solid var(--wcbb-border);
    border-radius: var(--wcbb-border-radius);
    background: var(--wcbb-bg, #fff);
}
.wcbb-vbox__picker-title {
    display: flex; align-items: center; gap: 8px;
    font-weight: 600; margin: 0 0 10px; color: var(--wcbb-text);
}
.wcbb-vbox__badge {
    font-size: .68em; font-weight: 600; padding: 2px 8px; border-radius: 999px;
    background: var(--wcbb-bg-item); color: var(--wcbb-text-muted);
    text-transform: uppercase; letter-spacing: .03em;
}
.wcbb-vbox__badge.is-required { background: var(--wcbb-accent); color: #fff; }
/* Clean product-card grid — thin, modern, transparent-art friendly. */
.wcbb-vbox__thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 14px;
}
.wcbb-vbox__thumb {
    position: relative;
    display: flex; flex-direction: column;
    padding: 0; border: 0; background: none; cursor: pointer;
    text-align: center;
    transition: transform .12s ease;
}
.wcbb-vbox__thumb:hover { transform: translateY(-2px); }
.wcbb-card__img {
    display: block; position: relative;
    aspect-ratio: 1 / 1; width: 100%;
    background: var(--wcbb-bg-item, #f4f5f7);
    border: 1px solid var(--wcbb-border, #e6e8eb);
    border-radius: 12px; overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.wcbb-vbox--tall .wcbb-card__img { aspect-ratio: 3 / 4; }
.wcbb-card__img img {
    width: 100%; height: 100%; object-fit: contain;
    padding: 10px; box-sizing: border-box;
    transition: transform .3s ease;
}
.wcbb-vbox__thumb:hover .wcbb-card__img img { transform: scale(1.06); }
.wcbb-card__info { display: flex; flex-direction: column; gap: 1px; padding: 7px 2px 0; }
.wcbb-card__name {
    font-size: 12.5px; font-weight: 600; line-height: 1.25;
    color: var(--wcbb-text, #2a2d31);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.wcbb-card__price { font-size: 12px; font-weight: 600; color: var(--wcbb-text-muted, #6b7280); }
.wcbb-card__price .amount { color: inherit; }
/* Selected state — subtle ring + tick, no heavy box. */
.wcbb-vbox__thumb.is-selected .wcbb-card__img {
    border-color: var(--wcbb-accent, #2d6cdf);
    box-shadow: 0 0 0 2px var(--wcbb-accent, #2d6cdf);
}
.wcbb-vbox__thumb.is-selected .wcbb-card__name { color: var(--wcbb-accent, #2d6cdf); }
.wcbb-vbox__thumb.is-selected::after {
    content: "✓"; position: absolute; top: 6px; right: 6px;
    width: 20px; height: 20px; line-height: 20px; text-align: center;
    font-size: 12px; font-weight: 700; color: #fff;
    background: var(--wcbb-accent, #2d6cdf); border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,.28);
}

/* Visual Box search (many-design slots) */
.wcbb-vbox__search{width:100%;padding:9px 12px;margin:0 0 10px;border:1px solid var(--wcbb-border,#cbd2d9);border-radius:8px;font-size:14px;box-sizing:border-box}
.wcbb-vbox__search:focus{outline:2px solid var(--wcbb-accent,#2d6cdf);outline-offset:1px}
.wcbb-vbox__thumbs{max-height:300px;overflow-y:auto;padding:2px}
.wcbb-vbox__noresults{padding:12px;color:var(--wcbb-text-muted,#6b7280);font-size:14px;text-align:center;width:100%}
/* Clean total-price bar (EPB-style, crisper) */
#wcbb-vbox-price-total{
    display:flex;align-items:center;justify-content:space-between;
    margin-top:18px;padding:14px 16px;
    background:var(--wcbb-bg-item,#f7f8fa);border-radius:12px;
    box-shadow:0 1px 3px rgba(0,0,0,.06),0 4px 12px rgba(0,0,0,.05);
    font-size:1.05em;font-weight:700;color:var(--wcbb-text,#2a2d31)
}

/* Compact LIST layout (e.g. bookmarks — no box stage, tidy cards) */
.wcbb-vbox--layout-list .wcbb-vbox__pickers{margin-top:0}

/* ============================
   Two-tier picker: slot cards + selection modal
   ============================ */

/* Title + info banner */
.wcbb-vbox__head { text-align: center; margin: 0 0 20px; }
.wcbb-vbox__title {
    display: inline-block; margin: 0; padding: 8px 22px;
    font-size: 1.35em; font-weight: 700; color: var(--wcbb-text);
    border: 2px solid var(--wcbb-accent); border-radius: 999px;
}
.wcbb-vbox__intro {
    max-width: 620px; margin: 12px auto 0; padding: 12px 16px;
    font-size: .92em; line-height: 1.5; color: var(--wcbb-text-muted);
    background: linear-gradient(135deg, var(--wcbb-bg-item), var(--wcbb-summary-bg));
    border: 1px solid var(--wcbb-border); border-radius: 12px;
}

/* Slot cards grid */
.wcbb-vbox__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 18px; margin-top: 18px;
}
.wcbb-vbox__card {
    position: relative;
    display: flex; flex-direction: column;
    padding: 14px 14px 12px;
    border: 1px solid var(--wcbb-border); border-radius: 14px;
    background: var(--wcbb-bg, #fff); cursor: pointer;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s, transform .12s;
}
.wcbb-vbox__card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.wcbb-vbox__card:focus-visible { outline: 2px solid var(--wcbb-accent); outline-offset: 2px; }
.wcbb-vbox__card.is-filled { border-color: var(--wcbb-accent); }

/* Empty vs filled state toggling */
.wcbb-vbox__card-filled { display: none; }
.wcbb-vbox__card.is-filled .wcbb-vbox__card-empty { display: none; }
.wcbb-vbox__card.is-filled .wcbb-vbox__card-filled { display: block; }

.wcbb-vbox__card-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; min-height: 150px; text-align: center;
    background: var(--wcbb-bg-item); border: 1px dashed var(--wcbb-border);
    border-radius: 12px;
}
.wcbb-vbox__card-plus { font-size: 2.4em; line-height: 1; color: var(--wcbb-text-muted); }
.wcbb-vbox__card-hint { font-size: .82em; color: var(--wcbb-text-muted); }

.wcbb-vbox__card-filled { position: relative; }
.wcbb-vbox__card-filled .wcbb-card__img { border-radius: 10px; }
.wcbb-vbox__card-qty {
    position: absolute; top: 6px; left: 6px;
    min-width: 22px; height: 22px; line-height: 22px; text-align: center;
    font-size: 12px; font-weight: 700; color: #fff;
    background: var(--wcbb-accent); border-radius: 999px; padding: 0 6px;
}

.wcbb-vbox__card-label {
    margin-top: 10px; font-size: .86em; font-weight: 600;
    color: var(--wcbb-text); text-align: center;
}

/* Round add-button, bottom-right INSIDE the card so the card's overflow:hidden
   (needed for rounded filled-image corners) never clips it. */
.wcbb-vbox__card-add {
    position: absolute; bottom: 10px; right: 10px; top: auto; transform: none;
    width: 34px; height: 34px; border-radius: 50%;
    border: none; background: var(--wcbb-accent); color: #fff;
    font-size: 20px; line-height: 34px; text-align: center; padding: 0; cursor: pointer;
    box-shadow: 0 2px 8px var(--wcbb-accent-shadow);
    transition: transform .12s;
    z-index: 2;
}
.wcbb-vbox__card-add:hover { transform: scale(1.1); }

/* Corner ribbon (optional slots) */
/* Small pill tag in the corner — no diagonal, never clipped. */
.wcbb-vbox__ribbon {
    position: absolute; top: 8px; left: 8px; z-index: 2;
    padding: 2px 8px; border-radius: 999px;
    font-size: .62em; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: #b23a6d;
    background: #fde4ef; border: 1px solid #f7c6dc;
}

/* Line-item summary */
.wcbb-vbox__summary {
    list-style: none; margin: 18px 0 0; padding: 0;
    border: 1px solid var(--wcbb-summary-border); border-radius: 12px;
    background: var(--wcbb-summary-bg); overflow: hidden;
}
.wcbb-vbox__summary-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; cursor: pointer;
    border-bottom: 1px solid var(--wcbb-summary-border);
    transition: background .12s;
}
.wcbb-vbox__summary-row:last-child { border-bottom: 0; }
.wcbb-vbox__summary-row:hover { background: var(--wcbb-bg-item); }
.wcbb-vbox__summary-name  { flex: 1 1 auto; font-size: .9em; color: var(--wcbb-text); }
.wcbb-vbox__summary-qty   { font-size: .85em; color: var(--wcbb-text-muted); }
.wcbb-vbox__summary-price { font-size: .9em; font-weight: 600; color: var(--wcbb-text); min-width: 60px; text-align: right; }
.wcbb-vbox__summary-edit  {
    border: none; background: none; cursor: pointer;
    font-size: 1em; color: var(--wcbb-text-muted); padding: 2px 4px;
}
.wcbb-vbox__summary-edit:hover { color: var(--wcbb-accent); }
.wcbb-vbox__summary-remove {
    border: none; background: none; cursor: pointer;
    font-size: 1em; color: var(--wcbb-text-muted); padding: 2px 4px; line-height: 1;
}
.wcbb-vbox__summary-remove:hover { color: #d63638; }

/* Selection modal */
.wcbb-vbox__modal-overlay {
    position: fixed; inset: 0; z-index: 100000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.6); padding: 20px;
}
.wcbb-vbox__modal {
    position: relative;
    width: 100%; max-width: 720px; max-height: 84vh; overflow-y: auto;
    padding: 26px 24px 24px;
    background: var(--wcbb-bg); border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.wcbb-vbox__modal-close {
    position: absolute; top: 14px; right: 16px;
    border: none; background: none; cursor: pointer;
    font-size: 1.6em; line-height: 1; color: var(--wcbb-text-muted);
}
.wcbb-vbox__modal-close:hover { color: var(--wcbb-text); }
.wcbb-vbox__modal-title {
    margin: 0 0 16px; text-align: center;
    font-size: 1.05em; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--wcbb-text);
}
.wcbb-vbox__modal-remove {
    display: block; margin: 0 0 14px; padding: 8px 14px; width: 100%;
    border: 1px solid #d63638; border-radius: 8px; cursor: pointer;
    background: #fff; color: #d63638; font-size: .9em; font-weight: 600;
}
.wcbb-vbox__modal-remove:hover { background: #d63638; color: #fff; }
.wcbb-vbox__modal-search {
    width: 100%; padding: 10px 14px; margin: 0 0 16px;
    border: 1px solid var(--wcbb-border); border-radius: 10px;
    font-size: 14px; box-sizing: border-box;
    background: var(--wcbb-bg-item); color: var(--wcbb-text);
}
.wcbb-vbox__modal-search:focus { outline: 2px solid var(--wcbb-accent); outline-offset: 1px; }
.wcbb-vbox__modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
}
.wcbb-vbox__modal-noresults { padding: 14px; text-align: center; color: var(--wcbb-text-muted); font-size: 14px; }

@media (max-width: 480px) {
    .wcbb-vbox__cards { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .wcbb-vbox__modal-grid { grid-template-columns: repeat(2, 1fr); }
}
