/**
 * Single Product Size Swatches Stock Display Styling
 * Brand Palette: #0b2545 (Deep Navy), #fe6500 (Brand Orange)
 */

/* Container & Wrapper */
.woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    margin: 6px 0 14px 0 !important;
    padding: 0 !important;
}

/* Individual Button Item */
.woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .variable-item.button-variable-item {
    width: auto !important;
    min-width: 56px !important;
    height: 38px !important;
    padding: 0 12px !important;
    margin: 0 !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease-in-out !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    cursor: pointer;
    outline: none !important;
    position: relative !important;
}

/* Hover State */
.woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .variable-item.button-variable-item:not(.selected):not(.wvs-stock-out):hover {
    border-color: #fe6500 !important;
    color: #fe6500 !important;
    background-color: #fff9f5 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(254, 101, 0, 0.15) !important;
}

/* Selected State */
.woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .variable-item.button-variable-item.selected {
    border-color: #0b2545 !important;
    background-color: #0b2545 !important;
    color: #ffffff !important;
    box-shadow: 0 3px 8px rgba(11, 37, 69, 0.28) !important;
}

/* Contents & Typography */
.woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .variable-item.button-variable-item .variable-item-contents {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
}

.woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .variable-item.button-variable-item .variable-item-span-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .wvs-size-name {
    font-weight: 700;
    font-size: 13.5px;
    letter-spacing: 0.3px;
}

/* Stock Pill Badge */
.woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .wvs-stock-badge {
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #f1f5f9;
    color: #475569;
    line-height: 1.1;
    display: inline-block;
    transition: all 0.2s ease;
}

/* Selected Badge */
.woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .variable-item.button-variable-item.selected .wvs-stock-badge {
    background-color: rgba(255, 255, 255, 0.24) !important;
    color: #ffffff !important;
}

/* Hover Badge */
.woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .variable-item.button-variable-item:not(.selected):not(.wvs-stock-out):hover .wvs-stock-badge {
    background-color: #feede0;
    color: #c04900;
}

/* Out of Stock Styling */
.woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .variable-item.button-variable-item.wvs-stock-out,
.woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .variable-item.button-variable-item.disabled {
    background-color: #fafafa !important;
    border-color: #cbd5e1 !important;
    border-style: dashed !important;
    color: #94a3b8 !important;
    opacity: 0.8 !important;
}

.woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .variable-item.button-variable-item.wvs-stock-out .wvs-stock-badge,
.woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .variable-item.button-variable-item.disabled .wvs-stock-badge {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
    font-weight: 600;
}

/* Hide WVS diagonal strike line so text stays 100% clean and readable */
.woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .variable-item.button-variable-item.disabled .variable-item-contents::before,
.woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .variable-item.button-variable-item.no-stock .variable-item-contents::before {
    display: none !important;
}

/* Mobile Responsiveness */
@media (max-width: 550px) {
    .woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] {
        gap: 6px !important;
    }
    .woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .variable-item.button-variable-item {
        min-width: 50px !important;
        height: 36px !important;
        padding: 0 8px !important;
    }
    .woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .wvs-size-name {
        font-size: 12.5px;
    }
    .woo-variation-swatches .variable-items-wrapper[data-attribute_name*="size"] .wvs-stock-badge {
        font-size: 11px;
        padding: 2px 4px;
    }
}
