/**
 * Size Swatches Styling
 * Styles for the Elementor Size Swatches widget
 */

/* Widget Container */
.roxyrich-size-swatches-widget {
    margin: 20px 0;
}

/* Label */
.size-swatches-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-transform: capitalize;
}

/* Swatches Container */
.size-swatches-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Individual Size Swatch */
.size-swatch {
    min-width: 60px;
    height: 35px !important;
    padding: 0 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    background-color: #ffffff;
    color: #333;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

/* Hover State */
.size-swatch:hover {
    border-color: #999;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Selected State */
.size-swatch.selected {
    border-color: #000;
    border-width: 2px;
    color: #000;
    background-color: #ffffff;
    font-weight: 600;
}

/* Disabled/Out of Stock State */
.size-swatch.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    position: relative;
}

.size-swatch.disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #999;
    transform: translateY(-50%) rotate(-10deg);
}

.size-swatch.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Hide WooCommerce default variation select when using swatches */
body.single-product .variations select[name*="size"],
body.single-product .variations select[name*="taille"],
body.single-product .variations select[name*="format"] {
    display: none !important;
}

/* Hide the entire table row for size attribute */
body.single-product .variations tr:has(select[name*="size"]),
body.single-product .variations tr:has(select[name*="taille"]),
body.single-product .variations tr:has(select[name*="format"]) {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .size-swatch {
        min-width: 50px;
        height: 40px;
        font-size: 13px;
        padding: 0 12px;
    }

    .size-swatches-container {
        gap: 8px;
    }
}
