/* WoodMart-compatible disabled state. Original .wd-swatch DOM is untouched. */
.variations_form .wd-swatch.wcpvai-disabled {
    opacity: .30 !important;
    cursor: not-allowed !important;
    filter: grayscale(1) !important;
}

/* A disabled variation must never keep WoodMart's selected/check-mark visual. */
.variations_form .wd-swatch.wcpvai-disabled .wd-swatch-bg::before,
.variations_form .wd-swatch.wcpvai-disabled .wd-swatch-bg::after,
.variations_form .wd-swatch.wcpvai-disabled::before {
    opacity: 0 !important;
    visibility: hidden !important;
}

.variations_form .wd-swatch.wcpvai-disabled::after {
    pointer-events: none;
}

.variations_form select option.wcpvai-option-disabled {
    color: #999;
}

/* Keep WoodMart's DOM order untouched. Visual active-first sorting uses flex order. */
.variations_form .wd-swatches-product > .wd-swatch {
    order: 0;
}

.variations_form .wd-swatches-product > .wd-swatch.wcpvai-disabled {
    order: 20;
}

.variations_form .wd-swatches-product > .wvg-view-more-btn {
    order: 100;
}

/* v1.6.1: View More/View Less logical limit.
 * WVG may hide the first DOM nodes before CSS order is applied. This class lets
 * the availability plugin choose the first visible items logically, while
 * leaving WoodMart's actual swatch DOM order untouched. */
.variations_form .wd-swatches-product > .wd-swatch.wcpvai-limit-hidden {
    display: none !important;
}
