/**
 * ADWC Dynamic Discount - Public Styles
 * 
 * Minimal styling that integrates with WooCommerce native design
 */

/* =========================================
   Price Display Enhancements
   ========================================= */

/* Loading state */
.adwc-dd-loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.adwc-dd-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -25px;
    width: 16px;
    height: 16px;
    border: 2px solid #333;
    border-top-color: transparent;
    border-radius: 50%;
    animation: adwc-dd-spin 0.6s linear infinite;
}

@keyframes adwc-dd-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Discounted price styling */
.adwc-dd-has-discount del {
    color: #999;
    font-size: 0.9em;
    margin-right: 8px;
}

.adwc-dd-has-discount ins {
    text-decoration: none;
    background: none;
}

.adwc-dd-discounted {
    color: var(--theme-palette-color-1) !important;
    font-weight: 700;
}

/* =========================================
   Total Display
   ========================================= */
.adwc-dd-total-display {
    border-radius: 6px;
    font-size: 0.95em;
}

.adwc-dd-total-display .label {
    color: #666;
    margin-right: 5px;
}

.adwc-dd-total-display del {
    color: #999;
    margin-right: 8px;
}

.adwc-dd-total-display .adwc-dd-discounted {
    color: var(--theme-palette-color-1);
}

/* =========================================
   Animations
   ========================================= */
/* Price change highlight */
.adwc-dd-has-discount ins {
    animation: adwc-dd-highlight 0.5s ease;
}

@keyframes adwc-dd-highlight {
    0% {
        background-color: transparent;
    }

    30% {
        background-color: #ebebeb;
    }

    100% {
        background-color: transparent;
    }
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 768px) {
    .adwc-dd-total-display {
        font-size: 0.9em;
    }
}