.hsw-swatches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
}

.hsw-swatch {
    position: relative;
    display: inline-block;
    flex: none;
    width: var(--hsw-size, 24px);
    height: var(--hsw-size, 24px);
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--hsw-radius, 50%);
    background: transparent;
    box-sizing: border-box;
    line-height: 0;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.hsw-swatch::before {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: var(--hsw-radius, 50%);
    background: var(--hsw-swatch, #d4d4d4);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.hsw-swatch.is-light::before {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.hsw-swatch:hover {
    border-color: #8a8a8a;
}

.hsw-swatch[aria-pressed="true"] {
    border-color: #111111;
}

.hsw-swatch.is-out::before {
    opacity: 0.45;
}

.hsw-swatch.is-out::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 1px;
    right: 1px;
    height: 1px;
    background: #111111;
    transform: rotate(-45deg);
}

.hsw-swatch__tip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 2px;
    background: #111111;
    color: #ffffff;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity 0.15s ease;
}

.hsw-swatch:first-child .hsw-swatch__tip {
    left: 0;
    transform: none;
}

.hsw-swatch:hover .hsw-swatch__tip,
.hsw-swatch:focus-visible .hsw-swatch__tip {
    opacity: 1;
}

.hsw-swatches--single .hsw-swatch {
    width: var(--hsw-size-single, 36px);
    height: var(--hsw-size-single, 36px);
}

.hsw-swatches--single .hsw-swatch::before {
    inset: 3px;
}

.hsw-swatch:disabled {
    cursor: not-allowed;
    opacity: 0.3;
}

.hsw-label {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    min-width: var(--hsw-size-single, 36px);
    height: var(--hsw-size-single, 36px);
    margin: 0;
    padding: 0 12px;
    border: 1px solid #d0d5dd;
    border-radius: 2px;
    background: #ffffff;
    box-sizing: border-box;
    color: #111111;
    font: inherit;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.hsw-label:hover {
    border-color: #8a8a8a;
}

.hsw-label[aria-pressed="true"] {
    border-color: #111111;
    background: #111111;
    color: #ffffff;
}

.hsw-label.is-out {
    color: #8a8a8a;
    text-decoration: line-through;
}

.hsw-label:disabled {
    cursor: not-allowed;
    opacity: 0.3;
}

select.hsw-select {
    display: none !important;
}

.hsw-current {
    font-size: 14px;
    line-height: 1.3;
}

.hsw-current:empty {
    display: none;
}

.hsw-more {
    font-size: 12px;
    line-height: 24px;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.hsw-more:hover {
    text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
    .hsw-swatch,
    .hsw-label,
    .hsw-swatch__tip {
        transition: none;
    }
}
