/* Klikalne kwadraciki kolorow - zamiennik rozwijanej listy przy wariantach produktu */

.renoma-swatches-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.renoma-swatch-group-title {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #777;
}

.renoma-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 8px;
    align-items: flex-start;
}

/* Kwadracik + nazwa koloru pod nim (ustawiona w Adawards Core > Kolory tkanin) */
.renoma-swatch-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 46px;
    cursor: pointer;
}

.renoma-swatch {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    background-color: #eee;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 2px #fff;
    transition: border-color 0.15s ease, transform 0.1s ease;
}

.renoma-swatch-item:hover .renoma-swatch {
    transform: translateY(-1px);
}

.renoma-swatch.is-selected {
    border-color: #7c0d0d;
}

.renoma-swatch:focus-visible {
    outline: 2px solid #7c0d0d;
    outline-offset: 2px;
}

.renoma-swatch-name {
    font-size: 11px;
    line-height: 1.2;
    color: #666;
    text-align: center;
    max-width: 46px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.renoma-swatch-item:hover .renoma-swatch-name,
.renoma-swatch-item .renoma-swatch.is-selected ~ .renoma-swatch-name {
    color: #7c0d0d;
}

/* Wartosc bez przypisanego koloru (np. jeszcze nie ustawiono probnika) -
   pokazuje sie jako maly przycisk tekstowy zamiast pustego kwadracika. */
.renoma-swatch--empty {
    width: auto;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    background: #f4f4f4;
    white-space: nowrap;
}

.renoma-swatch-item:has(.renoma-swatch--empty) {
    width: auto;
}

/* Wybor tkaniny na karcie produktu (radio ukryte wizualnie, ale dostepne
   z klawiatury i dla natywnej walidacji "wymagane pole"). */
.renoma-choices {
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 20px;
}

.renoma-choice {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.renoma-choice-label {
    padding: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    font-style: normal;
    color: var(--color-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.renoma-choice-picked {
    font-weight: 400;
    text-transform: none;
    color: #7c0d0d;
}

.renoma-choices .renoma-swatch-item {
    position: relative;
    margin: 0;
}

.renoma-choice-input {
    position: absolute;
    top: 0;
    left: 50%;
    width: 34px;
    height: 34px;
    margin: 0 0 0 -17px;
    opacity: 0;
    pointer-events: none;
}

span.renoma-swatch {
    display: block;
    box-sizing: border-box;
}

.renoma-choice-input:checked + .renoma-swatch {
    border-color: #7c0d0d;
}

.renoma-choice-input:checked ~ .renoma-swatch-name {
    color: #7c0d0d;
    font-weight: 600;
}

.renoma-choice-input:focus-visible + .renoma-swatch {
    outline: 2px solid #7c0d0d;
    outline-offset: 2px;
}
