/*
 * Nascondiamo il select Colore originale,
 * ma rimane nel DOM perché WooCommerce
 * continua ad utilizzarlo.
 */
.modamia-color-row select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}


/*
 * Contenitore miniature.
 */
.modamia-color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 4px 0 8px;
}


/*
 * Miniatura.
 */
.modamia-color-swatch {
    width: 66px;
    height: 78px;

    padding: 3px;

    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 3px;

    background: #fff;

    cursor: pointer;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease;
}


.modamia-color-swatch img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    border-radius: 1px;
}


/*
 * Hover.
 */
.modamia-color-swatch:hover {
    border-color: #222;
}


/*
 * Selezionato.
 */
.modamia-color-swatch.is-selected {
    border: 2px solid #111;

    box-shadow:
        0 0 0 1px #fff,
        0 0 0 2px #111;
}


/*
 * Combinazione non disponibile.
 *
 * Ad esempio:
 * Taglia M scelta
 * e il Marrone M non esiste.
 */
.modamia-color-swatch.is-disabled {
    opacity: 0.3;

    cursor: not-allowed;
}


/*
 * Fallback nel caso una variazione
 * non abbia nessuna immagine.
 */
.modamia-color-swatch-fallback {
    display: flex;

    width: 100%;
    height: 100%;

    align-items: center;
    justify-content: center;

    padding: 4px;

    font-size: 10px;
    line-height: 1.2;
    text-align: center;
}