/**
 * Smart Variation Swatches — CSS Styles
 */

.ecom-essentials-swatches-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
}

.ecom-essentials-swatch {
    cursor: pointer;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
    position: relative;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
}

/* Base Hover */
.ecom-essentials-swatch:hover {
    border-color: #999;
}

/* Selected State */
.ecom-essentials-swatch.ecom-essentials-swatch-selected {
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
}

/* Disabled/Out of Stock State (WooCommerce marks native options as disabled dynamically) */
.ecom-essentials-swatch.disabled,
.ecom-essentials-swatch.ecom-essentials-swatch-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    position: relative;
}

.ecom-essentials-swatch.disabled::after,
.ecom-essentials-swatch.ecom-essentials-swatch-disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #ff0000;
    transform: translateY(-50%) rotate(-45deg);
}

/* Shapes */
.ecom-essentials-swatch-round {
    border-radius: 50%;
}

.ecom-essentials-swatch-square {
    border-radius: 4px;
}

/* Label / Button Swatches */
.ecom-essentials-swatch-label {
    padding: 8px 16px;
    min-width: 40px;
    font-weight: 500;
}

/* Color Swatches */
.ecom-essentials-swatch-color {
    width: 36px;
    height: 36px;
    padding: 0;
    /* inner shadow to define white colors */
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1); 
    border: 2px solid transparent !important;
}

.ecom-essentials-swatch-color.ecom-essentials-swatch-selected {
    border-color: #000 !important;
    box-shadow: 0 0 0 2px #fff inset, 0 0 0 1px rgba(0,0,0,0.1) inset !important;
}

/* Image Swatches */
.ecom-essentials-swatch-image {
    width: 48px;
    height: 48px;
    padding: 0;
    background-size: cover;
    background-position: center;
    border: 2px solid transparent !important;
}

.ecom-essentials-swatch-image.ecom-essentials-swatch-selected {
    border-color: #000 !important;
}


