/**
 * Variation Swatches - chip selettore formato.
 */

/* Con JS attivo nascondiamo il select/tabella nativa: le chip la sostituiscono.
   Senza JS (nessuna classe .wsh-enhanced) resta il comportamento nativo. */
.variations_form.wsh-enhanced table.variations {
    display: none;
}
.variations_form.wsh-enhanced .reset_variations {
    display: none;
}

.wsh-swatches {
    margin: 0 0 18px;
}

.wsh-swatches__label {
    font-size: 13px;
    font-weight: 600;
    color: #3b4a5d;
    margin: 0 0 10px;
}

.wsh-swatches__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wsh-swatch {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 68px;
    padding: 9px 16px;
    background: #ffffff;
    border: 1.5px solid #e2e7ee;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    line-height: 1.15;
    transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
}

.wsh-swatch:hover {
    border-color: #b9c6d8;
}

.wsh-swatch:active {
    transform: translateY(1px);
}

.wsh-swatch.is-active {
    border-color: #1c6cd6;
    background: #eef4fd;
    box-shadow: 0 0 0 1px #1c6cd6 inset;
}

.wsh-swatch.is-active .wsh-swatch__label {
    color: #1c6cd6;
}

.wsh-swatch__label {
    font-size: 14px;
    font-weight: 700;
    color: #13202f;
    white-space: nowrap;
}

.wsh-swatch__soldout {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #9aa6b6;
}

/* ---- Variante esaurita: visibile ma tratteggiata/grigia ---- */
.wsh-swatch.is-unavailable {
    border-style: dashed;
    border-color: #d3d9e2;
    background: #f6f7f9;
}

.wsh-swatch.is-unavailable .wsh-swatch__label {
    color: #9aa6b6;
}

.wsh-swatch.is-unavailable.is-active {
    border-color: #9aa6b6;
    box-shadow: 0 0 0 1px #9aa6b6 inset;
}
