/**
 * WC Price Before After Discount - Checkout Styles
 * Version: 1.0.0
 */

/* تنسيق أسعار المنتجات في الجدول */
.woocommerce-checkout-review-order-table .product-price {
    font-weight: bold;
    color: #333;
}

/* تنسيق عام للجدول */
.woocommerce-checkout-review-order-table tbody tr td {
    vertical-align: middle;
}

/* RTL (Right-to-Left) Support */
.rtl .discounted-total-row th {
    text-align: left !important;
}

.rtl .discounted-total-row td {
    text-align: right !important;
}

/* إخفاء المجموع في Order Review */
.woocommerce-checkout-review-order-table .cart-subtotal,
.woocommerce-checkout-review-order-table .order-total {
    display: none !important;
}

/* إخفاء المجموع في سلة المشتريات */
.woocommerce-cart-form .cart-subtotal,
.cart-collaterals .cart-subtotal {
    display: none !important;
}

/* تحسين عرض جدول Order Review */
.woocommerce-checkout-review-order-table {
    margin-bottom: 20px;
}

.woocommerce-checkout-review-order-table td,
.woocommerce-checkout-review-order-table th {
    padding: 15px 12px;
    border-bottom: 1px solid #eee;
}

/* تنسيق صف الخصم */
.discount-badge-row th {
    text-align: end !important;
    padding: 10px !important;
    background: #ffffff00 !important;
    color: black !important;
    font-weight: bold !important;
    border-radius: 5px !important;
    font-size: 1.1em !important;
}

/* تنسيق صف المجموع بعد الخصم */


.discounted-total-row th {
    text-align: right !important;
}

.discounted-total-row td {
    text-align: left !important;
}

/* Theme compatibility */
.woocommerce .wc-price-before-after {
    font-family: inherit;
}

.woocommerce-checkout .wc-price-before-after {
    border: 1px solid #e9ecef !important;
    background: #f8f9fa !important;
}

/* Responsive design */
@media (max-width: 768px) {
    .discount-badge-row th {
        font-size: 1em !important;
        padding: 10px !important;
    }
    
    .discounted-total-row th,
    .discounted-total-row td {
        font-size: 1.1em !important;
        padding: 12px 10px !important;
    }
}

@media (max-width: 480px) {
    .discount-badge-row th {
        font-size: 0.9em !important;
        padding: 8px !important;
    }
    
    .discounted-total-row th,
    .discounted-total-row td {
        font-size: 1em !important;
        padding: 10px 8px !important;
    }
    
    /* تحسينات إضافية للهواتف */
    .woocommerce-checkout-review-order-table td,
    .woocommerce-checkout-review-order-table th {
        padding: 10px 8px;
        font-size: 0.9em;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .discount-badge-row th {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #000 !important;
    }
    
    .discounted-total-row th,
    .discounted-total-row td {
        background: #f0f0f0 !important;
        color: #000 !important;
        border: 2px solid #000 !important;
    }
}

/* Print styles */
@media print {
    .discount-badge-row th {
        background: #666 !important;
        color: #fff !important;
    }
    
    .discounted-total-row th,
    .discounted-total-row td {
        background: #f0f0f0 !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }
} 