/**
 * Out of Stock Variant Module - Styles
 */

/* Style for out of stock options in select dropdowns */
.product-variants select option.out-of-stock-option {
    color: #ff9447;
    font-style: normal;
    font-weight: 500;
}

/* Style for out of stock variant containers */
.product-variants li.out-of-stock-variant {
    position: relative;
    opacity: 0.6;
}

/* Out of stock tag/label - matching catalog page style */
.out-of-stock-tag {
    display: inline-block;
    padding: 3px 8px;
    background-color: #ff9447;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    border-radius: 3px;
    margin-left: 5px;
    line-height: 1.2;
}

/* For color swatches - position tag as overlay */
.product-variants .input-container.out-of-stock-variant .out-of-stock-tag {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    margin: 0;
    font-size: 9px;
    padding: 2px 5px;
    white-space: nowrap;
}

/* Add a strike-through effect for out of stock color swatches */
.product-variants .input-container.out-of-stock-variant::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    pointer-events: none;
}

/* Disable interaction with out of stock variants */
.product-variants li.out-of-stock-variant input {
    cursor: not-allowed;
}

/* For radio button labels */
.product-variants .input-container.out-of-stock-variant .radio-label {
    text-decoration: line-through;
    color: #999;
}

/* Adjust for color-margin class used in theme */
.product-variants .color-margin.out-of-stock-variant {
    pointer-events: auto; /* Allow clicking to see it's disabled */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .out-of-stock-tag {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .product-variants .input-container.out-of-stock-variant .out-of-stock-tag {
        font-size: 8px;
        padding: 2px 4px;
    }
}
