/**
 * Frontend styles for WC Quantity Discounts
 */

/* Pricing table on product page */
.wqd-pricing-table {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
}

.wqd-pricing-table h4 {
    margin: 0 0 15px;
    font-size: 1.1em;
    color: #333;
}

.wqd-pricing-table table {
    width: 100%;
    border-collapse: collapse;
}

.wqd-pricing-table th,
.wqd-pricing-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.wqd-pricing-table thead th {
    background: #e9ecef;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
}

.wqd-pricing-table tbody tr:last-child td {
    border-bottom: none;
}

.wqd-pricing-table tbody tr:hover {
    background: #e9ecef;
}

.wqd-pricing-table .wqd-discount-value {
    color: #28a745;
    font-weight: 600;
}

.wqd-pricing-table .wqd-tier-active {
    background: #d4edda;
}

/* Cart price display */
.wqd-original-price,
.wqd-original-subtotal {
    color: #999;
    font-size: 0.9em;
    margin-right: 5px;
}

.wqd-discounted-price,
.wqd-discounted-subtotal {
    color: #28a745;
    font-weight: 600;
    text-decoration: none;
}

.wqd-savings {
    display: block;
    color: #28a745;
    font-size: 0.85em;
    margin-top: 5px;
}

/* Total savings row */
.wqd-total-savings th,
.wqd-total-savings td {
    color: #28a745;
}

.wqd-savings-amount {
    font-size: 1.1em;
}

/* Dynamic price update on product page */
.wqd-dynamic-price {
    margin: 15px 0;
    padding: 10px 15px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    color: #155724;
}

.wqd-dynamic-price .wqd-you-save {
    font-weight: 600;
}

.wqd-dynamic-price .wqd-price-per-unit {
    display: block;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Animation for price changes */
.wqd-price-updated {
    animation: wqd-highlight 0.5s ease-out;
}

@keyframes wqd-highlight {
    0% {
        background-color: #fff3cd;
    }
    100% {
        background-color: transparent;
    }
}
