/**
 * Price animations for Jewelry Price Calculator
 *
 * @package     Jewelry_Price_Calculator
 */

/* Main price animation effects */
.jpc-price-updated {
    transition: all 0.5s ease-in-out;
    animation: pulse 1s ease-in-out;
}

.jpc-price-increase {
    color: #4CAF50 !important; /* Green for price increase */
}

.jpc-price-decrease {
    color: #F44336 !important; /* Red for price decrease */
}

/* Pulse animation for price updates */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Row animations for price breakdown */
.jpc-price-details tr {
    transition: all 0.3s ease-out;
}

/* Loading spinner for price calculations */
.jpc-loading span {
    display: inline-block;
    vertical-align: middle;
}

/* Main price container animations */
.price {
    position: relative;
    transition: color 0.5s ease-in-out;
}

/* Smooth transitions for all price elements */
.woocommerce-Price-amount {
    transition: all 0.3s ease-in-out;
}

/* Total row highlight effect */
.jpc-price-details tr:last-child {
    transition: background-color 0.5s ease-in-out;
}

/* Hover effects for breakdown rows */
.jpc-price-details tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Flash animation for significant price changes (>10%) */
@keyframes flash {
    0%, 50%, 100% {
        opacity: 1;
    }
    25%, 75% {
        opacity: 0.8;
    }
}

/* Ensure price breakdown never gets hidden */
#custom-price-breakdown,
.jewelry-price-breakdown {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Number counter animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide in animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Price details animation */
.jpc-price-details {
    transition: all 0.3s ease-in-out;
    animation: fadeIn 0.5s ease-in-out;
}

/* Spinner rotation animation */
@keyframes jpc-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}