/* Enhanced Variable Product Price Styles */

/* Main price container */
#bzotech-dynamic-price {
    position: relative;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    padding: 10px 15px;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Loading state */
#bzotech-dynamic-price.price-loading {
    opacity: 0.7;
    pointer-events: none;
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
}

#bzotech-dynamic-price.price-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Price update animation */
#bzotech-dynamic-price.price-updated {
    animation: priceUpdate 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #e8f5e8 0%, #f0fff0 100%);
}

@keyframes priceUpdate {
    0% { 
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 4px 16px rgba(0,124,186,0.2);
    }
    100% { 
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
}

/* Price container */
.bzotech-price-single {
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
    width: 100%;
}

.bzotech-price-single .price {
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
}

/* Regular price (crossed out) */
.bzotech-price-single .price del {
    opacity: 0.6;
    transition: opacity 0.3s ease;
    text-decoration: line-through;
    color: #999;
    font-size: 0.9em;
    margin-right: 8px;
}

/* Sale price */
.bzotech-price-single .price ins {
    text-decoration: none;
    font-weight: bold;
    color: #e74c3c;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.1em;
}

/* Price change indicator */
.bzotech-price-single::before {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    box-shadow: 0 3px 6px rgba(39,174,96,0.3);
}

.bzotech-price-single.price-changed::before {
    opacity: 1;
    animation: priceChangePulse 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes priceChangePulse {
    0% { 
        transform: scale(0);
        opacity: 0;
    }
    50% { 
        transform: scale(1.3);
        opacity: 1;
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Variation form enhancements */
.variations_form {
    position: relative;
    background: #fafafa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.variations_form select,
.variations_form input[type="radio"],
.variations_form input[type="checkbox"] {
    transition: all 0.3s ease;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    padding: 8px 12px;
    background: #fff;
}

.variations_form select:focus,
.variations_form input[type="radio"]:focus,
.variations_form input[type="checkbox"]:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0,124,186,0.1);
    outline: none;
}

/* Swatch styles */
.swatch {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid #e1e1e1;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 4px;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.swatch:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #007cba;
}

.swatch.selected {
    border: 2px solid #007cba;
    box-shadow: 0 4px 16px rgba(0,124,186,0.3);
    background: linear-gradient(135deg, #007cba 0%, #005a8b 100%);
    color: #fff;
    transform: translateY(-2px);
}

.swatch.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    font-weight: bold;
    color: #fff;
}

/* Color swatches */
.swatch.swatch-color {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    border: 3px solid #e1e1e1;
}

.swatch.swatch-color:hover {
    border-color: #007cba;
    transform: scale(1.1);
}

.swatch.swatch-color.selected {
    border-color: #007cba;
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(0,124,186,0.3);
}

/* Button states */
.single_add_to_cart_button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.single_add_to_cart_button:not(.disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.single_add_to_cart_button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: linear-gradient(135deg, #ccc 0%, #999 100%) !important;
    transform: none !important;
    box-shadow: none !important;
}

.single_add_to_cart_button.disabled:hover {
    background: linear-gradient(135deg, #ccc 0%, #999 100%) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Price range display */
.price-range {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1em;
    color: #666;
}

.price-range .from {
    font-weight: 600;
    color: #333;
}

.price-range .to {
    font-weight: 600;
    color: #e74c3c;
}

/* Responsive design */
@media (max-width: 768px) {
    #bzotech-dynamic-price {
        min-height: 35px;
        padding: 8px 12px;
        margin: 8px 0;
    }
    
    .bzotech-price-single .price {
        font-size: 1.1em;
    }
    
    .variations_form {
        padding: 15px;
        margin: 15px 0;
    }
    
    .swatch {
        padding: 6px 10px;
        margin: 3px;
        font-size: 0.9em;
    }
    
    .swatch.swatch-color {
        width: 35px;
        height: 35px;
    }
}
