/**
 * Product Variations - Icon-based Selection Styles
 * Similar to merch creation page styling
 */

/* Hide the default dropdown selects */
.splot-variations-wrapper .splot-hidden-select {
    display: none !important;
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}

/* Options header */
.splot-options-header {
    font-size: 1.2em;
    font-weight: bold;
    margin: 0 0 15px 0;
    padding: 0;
    color: #333;
}

/* Variation wrapper */
.splot-variations-wrapper {
    margin-bottom: 30px;
}

.splot-variation-attribute {
    margin-bottom: 25px;
}

.splot-variation-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 14px;
    color: #333;
}

/* Option icons container */
.splot-option-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Color button styles */
.splot-color-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: #aaa;
    flex-shrink: 0;
}

.splot-color-btn:hover {
    transform: scale(1.1);
    border-color: #333;
    z-index: 1;
}

.splot-color-btn.active {
	border-color: #000 !important;
	border-width: 3px !important;
}

/* Checkmark for color buttons */
.splot-color-btn .splot-checkmark {
    display: none;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    pointer-events: none;
    line-height: 1;
}

.splot-color-btn.active .splot-checkmark {
    display: block;
}

/* Black checkmark for light colors */
.splot-color-btn[style*="background:#ffffff"] .splot-checkmark,
.splot-color-btn[style*="background:#fff"] .splot-checkmark,
.splot-color-btn[style*="background: #ffffff"] .splot-checkmark,
.splot-color-btn[style*="background: #fff"] .splot-checkmark {
    color: #000;
}

/* Size button styles */
.splot-size-btn {
    border: 1px solid #ddd;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    background: #fff;
    color: #333;
    min-width: 40px;
    text-align: center;
}

.splot-size-btn:hover {
    border-color: #333;
    background: #f5f5f5;
}

.splot-size-btn.active {
	border-color: #000 !important;
	background: #f0f0f0 !important;
	font-weight: 600 !important;
	border-width: 2px !important;
}

/* Reset variations link */
.splot-variations-wrapper .reset_variations,
.variations_form .reset_variations {
    display: inline-block;
    margin-top: 15px;
    color: #666;
    text-decoration: none;
    font-size: 13px;
}

.splot-variations-wrapper .reset_variations:hover,
.variations_form .reset_variations:hover {
    color: #000;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .splot-color-btn {
        width: 36px;
        height: 36px;
    }
    
    .splot-size-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .splot-option-icons {
        gap: 10px;
    }
}

/* Ensure compatibility with WooCommerce variation table (if still present) */
.variations table.variations {
    display: none !important;
}

.variations .splot-variations-wrapper {
    display: block;
}

/* Hide default variation table rows if they exist */
.variations tbody tr {
    display: none;
}

/* Show our custom wrapper */
.splot-variations-wrapper {
    display: block !important;
}

