/**
 * Multilingual Cart & Checkout CSS
 * Supports Persian, Arabic, and English languages
 */

/* General multilingual support */
.wc-block-cart,
.wc-block-checkout,
.woocommerce-cart,
.woocommerce-checkout {
    font-family: 'Tahoma', 'Arial', sans-serif;
    line-height: 1.6;
}

/* Arabic RTL support */
body.rtl,
body[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

body.rtl .wc-block-cart,
body.rtl .wc-block-checkout,
body.rtl .woocommerce-cart-form,
body.rtl .woocommerce-checkout {
    direction: rtl;
    text-align: right;
}

body.rtl .wc-block-cart table,
body.rtl .woocommerce table.shop_table {
    direction: rtl;
}

body.rtl .wc-block-cart th,
body.rtl .wc-block-cart td,
body.rtl .woocommerce table.shop_table th,
body.rtl .woocommerce table.shop_table td {
    text-align: right;
}

/* Keep quantity selectors LTR */
body.rtl .wc-block-components-quantity-selector,
body.rtl .quantity input,
body.rtl input[type="number"] {
    direction: ltr;
    text-align: center;
}

/* Button alignment for RTL */
body.rtl .wc-block-cart__submit-container,
body.rtl .wc-proceed-to-checkout {
    text-align: left;
}

body.rtl .wc-block-components-button,
body.rtl .button,
body.rtl .btn {
    margin-left: 0;
    margin-right: 10px;
}

/* Form fields for RTL */
body.rtl .wc-block-checkout__form,
body.rtl .woocommerce-checkout .form-row {
    direction: rtl;
}

body.rtl .wc-block-checkout__form input,
body.rtl .wc-block-checkout__form select,
body.rtl .wc-block-checkout__form textarea {
    text-align: right;
}

/* English LTR support */
body[lang="en"] .wc-block-cart,
body[lang="en"] .wc-block-checkout,
body.lang-en .wc-block-cart,
body.lang-en .wc-block-checkout {
    direction: ltr;
    text-align: left;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

/* Persian support */
body[lang="fa"] .wc-block-cart,
body[lang="fa"] .wc-block-checkout,
body.lang-fa .wc-block-cart,
body.lang-fa .wc-block-checkout {
    direction: rtl;
    text-align: right;
    font-family: 'Tahoma', 'Arial', sans-serif;
}

/* Cart table improvements */
.wc-block-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.wc-block-cart-table th,
.wc-block-cart-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
}

/* Product names in different languages */
.wc-block-cart-table .wc-block-cart-table__product-name {
    font-weight: bold;
    line-height: 1.4;
}

/* Price formatting */
.wc-block-components-formatted-money-amount {
    font-weight: bold;
    white-space: nowrap;
}

/* Quantity selector improvements */
.wc-block-components-quantity-selector {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.wc-block-components-quantity-selector input {
    border: none;
    text-align: center;
    width: 60px;
    padding: 8px 4px;
    font-size: 14px;
}

.wc-block-components-quantity-selector button {
    border: none;
    background: #f8f8f8;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
}

.wc-block-components-quantity-selector button:hover {
    background: #e8e8e8;
}

/* Cart totals section */
.wc-block-components-totals-wrapper {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
}

.wc-block-components-totals-wrapper h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

/* Checkout button styling */
.wc-block-cart__submit-container {
    margin-top: 20px;
}

.wc-block-cart__submit-button {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    border: none;
    background: #0073aa;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.wc-block-cart__submit-button:hover {
    background: #005177;
}

/* Coupon form styling */
.wc-block-components-panel {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 20px;
}

.wc-block-components-panel__content {
    padding: 15px;
}

.wc-block-components-text-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Remove button styling */
.wc-block-cart-item__remove-link {
    color: #dc3232;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    padding: 5px;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.wc-block-cart-item__remove-link:hover {
    background: #dc3232;
    color: #fff;
}

/* Loading states */
.wc-block-cart.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .wc-block-cart-table {
        font-size: 14px;
    }
    
    .wc-block-cart-table th,
    .wc-block-cart-table td {
        padding: 10px 5px;
    }
    
    .wc-block-components-quantity-selector input {
        width: 50px;
    }
    
    .wc-block-components-totals-wrapper {
        padding: 15px;
    }
}

/* Language-specific font improvements */
body[lang="ar"] .wc-block-cart,
body[lang="ar"] .wc-block-checkout,
body.lang-ar .wc-block-cart,
body.lang-ar .wc-block-checkout {
    font-family: 'Arial', 'Tahoma', 'Helvetica', sans-serif;
    font-size: 14px;
}

body[lang="fa"] .wc-block-cart,
body[lang="fa"] .wc-block-checkout,
body.lang-fa .wc-block-cart,
body.lang-fa .wc-block-checkout {
    font-family: 'Tahoma', 'Arial', 'Helvetica', sans-serif;
    font-size: 13px;
}

body[lang="en"] .wc-block-cart,
body[lang="en"] .wc-block-checkout,
body.lang-en .wc-block-cart,
body.lang-en .wc-block-checkout {
    font-family: 'Arial', 'Helvetica', 'sans-serif';
    font-size: 14px;
} 