/* Variation Colors: progressive-enhancement swatches for WooCommerce. */

.hob-variation-swatches {
    display: none;
}

.woocommerce div.product .variations_form.hob-variation-swatches--ready .hob-variation-native-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.woocommerce div.product .variations_form.hob-variation-swatches--ready .hob-variation-swatches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    padding: 2px;
}

.woocommerce div.product .variations_form.hob-variation-swatches--ready .variations tr + tr {
    margin-top: 22px;
}

.hob-variation-swatch {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 32px;
    height: 32px;
    padding: 0 7px;
    border: 1px solid var(--hob-primary-color);
    border-radius: 0;
    background: transparent;
    color: var(--hob-primary-color);
    font-family: var(--hob-heading-font);
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition:
        background-color 200ms ease,
        color 200ms ease,
        opacity 200ms ease,
        outline-color 200ms ease,
        transform 200ms ease;
}

.hob-variation-swatch--color {
    width: 26px;
    min-width: 26px;
    height: 26px;
    padding: 0;
    border-color: rgba(12, 32, 48, 0.2);
    background-color: var(--hob-swatch-color);
}

.hob-variation-swatch--label.is-selected {
    background: var(--hob-primary-color);
    color: var(--hob-background-color);
}

.hob-variation-swatch--color.is-selected {
    outline: 1px solid var(--hob-primary-color);
    outline-offset: 2px;
}

.hob-variation-swatch:focus-visible {
    outline: 2px solid var(--hob-primary-color);
    outline-offset: 4px;
}

.hob-variation-swatch:disabled,
.hob-variation-swatch.is-disabled {
    opacity: 0.32;
    cursor: not-allowed;
    transform: none;
}

@media (hover: hover) and (pointer: fine) {
    .hob-variation-swatch:not(:disabled):hover {
        transform: scale(1.04);
    }
}

.hob-product-card__variation-colors {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.hob-product-card__color-swatch {
    display: block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    box-sizing: border-box;
    border: 1px solid rgba(12, 32, 48, 0.2);
    border-radius: 0;
    background-color: var(--hob-swatch-color);
}

@media (max-width: 560px) {
    .woocommerce div.product .variations_form.hob-variation-swatches--ready .hob-variation-swatches {
        gap: 8px;
    }

    .hob-variation-swatch {
        min-width: 30px;
        height: 30px;
        padding-inline: 6px;
        font-size: 0.7rem;
    }

    .hob-variation-swatch--color {
        width: 24px;
        min-width: 24px;
        height: 24px;
        padding: 0;
    }

    .hob-product-card__variation-colors {
        gap: 6px;
    }

    .hob-product-card__color-swatch {
        flex-basis: 16px;
        width: 16px;
        height: 16px;
    }
}
