.bw-selection-policy-feedback {
    margin: -.15rem 0 .6rem;
    font-size: .82rem;
    line-height: 1.35;
}

.bw-selection-policy-instruction {
    color: var(--body-color, #343a40);
    font-weight: 600;
}

.bw-selection-policy-status {
    margin-top: .1rem;
    color: var(--gray-600, #6c757d);
}

.bw-selection-policy-feedback.is-invalid .bw-selection-policy-status {
    color: var(--danger, #dc3545);
    font-weight: 600;
}

.choice input[data-bw-policy-limit-disabled="true"]:not(:checked) + .choice-item,
.choice input[data-bw-policy-busy-disabled="true"] + .choice-item {
    cursor: not-allowed;
    opacity: .55;
}

.btn-add-to-cart.bw-selection-policy-blocked {
    cursor: not-allowed;
}

@media (max-width: 767.98px) {
    .bw-selection-policy-feedback {
        font-size: .88rem;
    }
}

/* ---------------------------------------------------------------------------
   Paleta kolorów na kontrolce Checkboxes.
   Semantyka pozostaje natywna (Checkboxes = jedyny typ obsługujący wiele
   wartości w Smartstore 6.4), a wygląd jest 1:1 taki sam jak kafelki/obrazy:
   kwadrat 46px, promień 8px, ta sama obwódka zaznaczenia (inset 2px, tak jak
   .choice-box-element w motywie) i bez podpisów tekstowych.
   --------------------------------------------------------------------------- */
.bw-palette-control .choice-control {
    display: block;
}

.bw-palette-control .choice-control > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bw-palette-control .form-check {
    position: relative;
    display: block;
    flex: 0 0 auto;
    width: var(--choice-box-size, 46px);
    height: var(--choice-box-size, 46px);
    margin: 0;
    padding: 0;
}

/* Natywny checkbox jest tylko nośnikiem stanu: bez ramki, tła i reakcji na kursor
   (kliknięcie obsługuje etykieta - inaczej przy najechaniu przebija biały kwadrat). */
.bw-palette-control .form-check-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
    border: 0;
    outline: none;
    background: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.bw-palette-control .form-check-label.choice-item {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: var(--choice-box-size, 46px);
    height: var(--choice-box-size, 46px);
    margin: 0;
    padding: 0;
    font-size: 0;
    line-height: 0;
    color: transparent;
    border: 0;
    border-radius: 8px;
    background: none;
    box-shadow: none;
    outline: none;
}

/* Ukryty tekst etykiety, widoczny wyłącznie kolor/zdjęcie wartości. */
.bw-palette-control .form-check-label.choice-item > * {
    font-size: initial;
    line-height: normal;
}

/* Kolor i zdjęcie wypełniają kwadrat co do piksela (bez przesunięcia w pionie). */
.bw-palette-control .form-check-label .choice-item-color,
.bw-palette-control .form-check-label .choice-item-img {
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: border-box;
    display: block;
    width: var(--choice-box-size, 46px) !important;
    min-width: var(--choice-box-size, 46px) !important;
    height: var(--choice-box-size, 46px) !important;
    min-height: var(--choice-box-size, 46px) !important;
    max-height: var(--choice-box-size, 46px) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #343439;
    border-radius: 8px;
    object-fit: cover;
    background-size: cover;
    background-position: center;
}

/* Zaznaczenie dokładnie jak w kafelkach motywu: biała obwódka WEWNĄTRZ kwadratu. */
.bw-palette-control .form-check.is-selected .choice-item-color,
.bw-palette-control .form-check.is-selected .choice-item-img,
.bw-palette-control .form-check-input:checked + .form-check-label.choice-item .choice-item-color,
.bw-palette-control .form-check-input:checked + .form-check-label.choice-item .choice-item-img {
    box-shadow: inset 0 0 0 2px #fff;
}

.bw-palette-control .form-check:hover .choice-item-color,
.bw-palette-control .form-check:hover .choice-item-img {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35);
}

/* Kafelki nie używają plakietki z ptaszkiem. */
.bw-palette-control .form-check-label.choice-item::after {
    content: none;
    display: none;
}

.bw-palette-control .form-check-label.choice-item-unavailable {
    opacity: .45;
    cursor: not-allowed;
}

/* ==== Konsolidacja: poprawki kafelkow palety (bylo w blokach tymczasowych 12-15) ==== */
+
                                                                                                                                                                                                                                                                                                                                       +
 .bw-palette-control .choice-control > div { display:flex; flex-wrap:wrap; gap:6px; }
                                                                                                                                                                                                                                                  +
 .bw-palette-control .form-check { position:relative; display:block; flex:0 0 auto; width:46px !important; height:46px !important; margin:0 !important; padding:0 !important; }
                                                                                                                                                        +
 .bw-palette-control .form-check-input { position:absolute; top:0; left:0; width:100%; height:100%; margin:0; opacity:0; cursor:pointer; }
                                                                                                                                                                                             +
 .bw-palette-control .form-check-label.choice-item { display:block; width:46px !important; height:46px !important; margin:0 !important; padding:0 !important; font-size:0 !important; line-height:0 !important; color:transparent !important; border:0 !important; border-radius:8px; background:none !important; }
                    +
 .bw-palette-control .form-check-label .choice-item-color,                                                                                                                                                                                                                                                                             +
 .bw-palette-control .form-check-label .choice-item-img { display:block; width:46px !important; min-width:46px !important; height:46px !important; min-height:46px !important; max-height:46px !important; border:1px solid rgba(0,0,0,.125); border-radius:8px; object-fit:cover; background-size:cover; background-position:center; }
+
 .bw-palette-control .form-check-label.choice-item::after { content:none !important; display:none !important; }
                                                                                                                                                                                                                        +
 .bw-palette-control .form-check.is-selected .form-check-label.choice-item,                                                                                                                                                                                                                                                            +
 .bw-palette-control .form-check-input:checked + .form-check-label.choice-item { box-shadow:none; outline:3px solid #f7f7f7; outline-offset:2px; }
                                                                                                                                                                                     +
 .bw-palette-control .form-check:hover .form-check-label.choice-item { box-shadow:0 0 0 2px rgba(255,255,255,.28); }
                                                                                                                                                                                                                   +

.bw-palette-control .form-check-label.choice-item{position:relative!important;font-size:0!important;line-height:0!important;border:0!important;outline:none!important}
.bw-palette-control .choice-item-color,.bw-palette-control .choice-item-img{position:absolute!important;top:0!important;left:0!important;box-sizing:border-box!important;width:46px!important;height:46px!important;min-height:46px!important;max-height:46px!important;border-radius:8px!important;box-shadow:none!important}
.bw-palette-control .form-check.is-selected .choice-item-color,.bw-palette-control .form-check.is-selected .choice-item-img,.bw-palette-control input:checked+.form-check-label .choice-item-color,.bw-palette-control input:checked+.form-check-label .choice-item-img{box-shadow:inset 0 0 0 2px #fff!important}

.bw-palette-control .form-check-input{opacity:0!important;pointer-events:none!important;border:0!important;outline:none!important;background:none!important;box-shadow:none!important;-webkit-appearance:none!important;appearance:none!important;position:absolute!important;top:0!important;left:0!important;width:100%!important;height:100%!important;margin:0!important}
.bw-palette-control .form-check-label.choice-item{position:relative!important;font-size:0!important;line-height:0!important;color:transparent!important;border:0!important;outline:none!important;background:none!important}
.bw-palette-control .form-check-label.choice-item:focus,.bw-palette-control .form-check-label.choice-item:focus-visible{outline:none!important;box-shadow:none!important}

.bw-palette-control .form-check-label.choice-item{position:absolute!important;top:0!important;left:0!important;width:46px!important;height:46px!important;margin:0!important;padding:0!important;box-shadow:none!important;outline:none!important;border:0!important;background:none!important;transform:none!important}
.bw-palette-control .form-check-label.choice-item:hover{box-shadow:none!important;transform:none!important;border:0!important}
