/* Wolve Loyalty Product Points Display Styles */

/* CSS Variables for customization */
:root {
    --wolve-points-bg-color: #f5f5f5;
    --wolve-points-text-color: #2c3e50;
    --wolve-points-border-color: #e0e0e0;
}

/* Default style */
.wolve-loyalty-product-points {
    display: inline-block;
    margin: 10px 0;
    padding: 12px 15px;
    background: var(--wolve-points-bg-color);
    border: 1px solid var(--wolve-points-border-color);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--wolve-points-text-color);
    transition: all 0.3s ease;
}

.wolve-loyalty-product-points:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.wolve-loyalty-points-text {
    font-weight: 500;
    color: var(--wolve-points-text-color);
}

/* Minimal style variation */
.wolve-loyalty-product-points.style-minimal {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--wolve-points-border-color);
    border-radius: 0;
    padding: 8px 0;
}

.wolve-loyalty-product-points.style-minimal:hover {
    box-shadow: none;
    transform: none;
    border-bottom-color: var(--wolve-points-text-color);
}

/* Accent style variation */
.wolve-loyalty-product-points.style-accent {
    background: linear-gradient(135deg, var(--wolve-points-bg-color) 0%, var(--wolve-points-bg-color) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
}

.wolve-loyalty-product-points.style-accent:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Alternative style with accent color */
.wolve-loyalty-product-points.accent {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-color: #ffcc80;
}

.wolve-loyalty-product-points.accent .wolve-loyalty-points-text {
    color: #e65100;
}

/* Compact style for product listings */
.woocommerce ul.products li.product .wolve-loyalty-product-points,
.products .product .wolve-loyalty-product-points {
    margin: 5px 0;
    padding: 8px 10px;
    font-size: 12px;
}

/* Variable product price change animation */
.wolve-loyalty-product-points.updating {
    opacity: 0.5;
    pointer-events: none;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .wolve-loyalty-product-points {
        font-size: 13px;
        padding: 10px 12px;
    }
}

/* Integration with common WooCommerce themes */
.single-product .wolve-loyalty-product-points {
    clear: both;
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Style for when there are no points */
.wolve-loyalty-product-points.no-points {
    background: #f9f9f9;
    border-color: #ddd;
}

.wolve-loyalty-product-points.no-points .wolve-loyalty-points-text {
    color: #999;
    font-weight: 400;
}

/* Loading state */
.wolve-loyalty-product-points.loading {
    position: relative;
}

.wolve-loyalty-product-points.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: wolve-loyalty-spin 1s linear infinite;
}

@keyframes wolve-loyalty-spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Success/highlight animation */
@keyframes wolve-loyalty-highlight {
    0% {
        background-color: #fff3cd;
    }
    100% {
        background-color: transparent;
    }
}

.wolve-loyalty-product-points.highlight {
    animation: wolve-loyalty-highlight 0.5s ease;
}

/* Dark mode support (if theme supports it) */
@media (prefers-color-scheme: dark) {
    .wolve-loyalty-product-points {
        background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
        border-color: #444;
        color: #ddd;
    }

    .wolve-loyalty-points-text {
        color: #fff;
    }

    .wolve-loyalty-points-percentage {
        background: rgba(255, 255, 255, 0.1);
        color: #aaa;
    }

    .wolve-loyalty-product-points:hover {
        background: linear-gradient(135deg, #333 0%, #222 100%);
    }
}