/**
 * AR WooCommerce Discounts - Frontend Styles
 */

/* Price Display */
.arwd-original-price {
    color: #999;
    font-size: 0.9em;
    margin-right: 8px;
}

.arwd-discounted-price {
    color: #e74c3c;
    font-weight: bold;
    text-decoration: none;
    background: none;
}

.arwd-savings {
    display: block;
    font-size: 0.85em;
    color: #27ae60;
    margin-top: 5px;
    font-weight: 500;
}

/* Role Discount Badge */
.arwd-role-discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.arwd-badge-icon {
    font-size: 16px;
}

.arwd-badge-text {
    line-height: 1.4;
}

/* Quantity Discount Table */
.arwd-quantity-discount-table {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.arwd-quantity-discount-table h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.arwd-quantity-discount-table h4:before {
    content: "\1F4B0";
    font-size: 16px;
}

.arwd-quantity-discount-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.arwd-quantity-discount-table th,
.arwd-quantity-discount-table td {
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.arwd-quantity-discount-table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.5px;
}

.arwd-quantity-discount-table tbody tr:last-child td {
    border-bottom: none;
}

.arwd-quantity-discount-table tbody tr:hover {
    background: #f8f9fa;
}

.arwd-quantity-discount-table td:last-child {
    color: #27ae60;
    font-weight: 600;
}

/* Dynamic Price Update */
.arwd-dynamic-price {
    transition: all 0.3s ease;
}

.arwd-dynamic-price.updating {
    opacity: 0.5;
}

.arwd-price-total {
    display: block;
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
}

.arwd-price-total strong {
    color: #333;
}

/* Volume Discount Info on Cart */
.arwd-volume-discount-info {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.arwd-volume-discount-info:before {
    content: "\2728";
    font-size: 20px;
}

/* Sale Badge Override */
.arwd-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .arwd-role-discount-badge {
        font-size: 12px;
        padding: 6px 12px;
    }

    .arwd-quantity-discount-table {
        padding: 10px;
    }

    .arwd-quantity-discount-table th,
    .arwd-quantity-discount-table td {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* Cart Page - Volume Discount */
.woocommerce-cart .cart-collaterals .arwd-volume-info {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.arwd-volume-progress {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.arwd-volume-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Animation for price update */
@keyframes priceUpdate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.arwd-price-updated {
    animation: priceUpdate 0.3s ease;
}
