.ecomColorSwatches {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ecomColorSwatchesLabel {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: var(--ecomColorTextStrong);
    letter-spacing: -0.28px;
}

@media (min-width: 1024px) {
    .ecomColorSwatchesLabel {
        font-size: 16px;
        letter-spacing: -0.32px;
    }
}

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

.ecomColorSwatch {
    --ecomColorSwatchHex: transparent;

    position: relative;
    width: 28px;
    height: 28px;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid rgba(7, 59, 74, 0.18) !important;
    border-radius: 50%;
    background-color: var(--ecomColorSwatchHex) !important;
    box-shadow: none !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition:
        transform 140ms var(--ecomEaseOut),
        box-shadow 140ms ease;
}

.ecomColorSwatch::after {
    content: attr(aria-label);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 4px;
    background-color: var(--ecomColorTextStrong);
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    text-transform: none;
    letter-spacing: normal;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 140ms var(--ecomEaseOut);
}

@media (min-width: 1024px) {
    .ecomColorSwatch {
        width: 32px;
        height: 32px;
    }
}

.ecomColorSwatch[aria-checked="true"] {
    box-shadow: 0 0 0 2px var(--ecomColorAccent) !important;
}

@media (hover: hover) and (pointer: fine) {
    .ecomColorSwatch:not([aria-checked="true"]):not([disabled]):hover {
        transform: scale(1.06);
    }

    .ecomColorSwatch:hover::after,
    .ecomColorSwatch:focus-visible::after {
        opacity: 1;
    }
}

.ecomColorSwatch:focus-visible {
    outline: 2px solid var(--ecomColorAccent) !important;
    outline-offset: 3px;
}

.ecomColorSwatch:active {
    transform: scale(0.95);
}

.ecomColorSwatch[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.ecomColorSwatchFallback {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: var(--ecomColorTextStrong);
    text-transform: uppercase;
    letter-spacing: -0.2px;
}
