/* استایل‌های سفارشی صفحه checkout */

/* استایل کلی صفحه */
.alp-checkout-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0;
    font-family: Vazirmatn, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

/* کارت‌های اصلی checkout */
.alp-checkout-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

/* باکس ساده‌شده نهایی */
.alp-checkout-simplified {
    width: 90%;
    max-width: 700px;
}

/* عنوان کارت‌ها */
.alp-checkout-title, .alp-section-title {
    color: #333;
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* خط جداکننده بخش‌ها */
.alp-section-divider {
    height: 1px;
    background-color: #eee;
    margin: 25px 0;
}

/* بخش‌های اطلاعات پرداخت و روش پرداخت */
.alp-billing-section,
.alp-payment-section {
    margin: 25px 0;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* لیست محصولات */
.alp-products-list {
    margin-bottom: 20px;
}

/* هر آیتم محصول */
.alp-product-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.alp-product-item:last-child {
    border-bottom: none;
}

.alp-product-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.alp-product-text {
    flex: 1;
}

.alp-product-title {
    font-size: 16px;
    margin: 0 0 5px 0;
    color: #333;
}

.alp-product-instructor {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.alp-product-price {
    font-weight: bold;
    color: #532e91;
    font-size: 16px;
}

/* بخش‌های کنترل محصول */
.alp-product-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.alp-quantity-control {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 5px;
    padding: 5px;
}

.alp-quantity-btn {
    background: #532e91;
    color: white;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.alp-quantity-input {
    width: 30px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 14px;
    margin: 0 5px;
}

/* خلاصه سفارش */
.alp-order-summary {
    padding: 15px 0;
    margin-bottom: 15px;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.alp-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.alp-summary-label {
    color: #666;
}

.alp-summary-value {
    font-weight: bold;
    color: #333;
}

/* ردیف تخفیف */
.alp-discount-row {
    color: #e64c3c;
}

.alp-discount-value {
    color: #e64c3c;
}

/* ردیف قیمت کل */
.alp-total-row {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 18px;
}

.alp-total-value {
    color: #532e91;
    font-size: 20px;
}

/* بخش کد تخفیف */
.alp-coupon-section {
    margin-bottom: 15px;
}

.alp-coupon-form {
    display: flex;
    margin-bottom: 10px;
}

.alp-coupon-form input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-right: 10px;
}

.alp-coupon-applied {
    margin-top: 10px;
    padding: 8px;
    background-color: #e7f7e7;
    border-radius: 5px;
    color: #2e8b57;
    font-size: 14px;
}

/* دکمه‌ها */
.alp-action-button {
    background-color: #532e91;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.alp-action-button:hover {
    background-color: #6e3ebc;
}

.alp-secondary-button {
    background-color: #f5f5f5;
    color: #333;
}

.alp-secondary-button:hover {
    background-color: #e0e0e0;
}

.alp-payment-button {
    display: block;
    width: 100%;
    background-color: #532e91 !important;
    color: white !important;
    border: none !important;
    padding: 15px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin: 20px 0 15px;
    transition: background-color 0.3s;
    text-align: center;
}

.alp-payment-button:hover {
    background-color: #6e3ebc !important;
}

.alp-back-link {
    display: block;
    text-align: center;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    margin-top: 20px;
}

.alp-back-link:hover {
    color: #532e91;
}

/* مودال خطا */
.alp-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.alp-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 500px;
    position: relative;
}

.alp-modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.alp-modal-header {
    margin-bottom: 15px;
}

.alp-modal-header h3 {
    margin: 0;
    color: #532e91;
}

.alp-modal-body {
    margin-bottom: 20px;
}

.alp-modal-footer {
    text-align: left;
    display: flex;
    justify-content: space-between;
}

.alp-error-fields-container {
    margin-top: 15px;
}

/* استایل برای دستگاه‌های موبایل */
@media (max-width: 768px) {
    .alp-checkout-container {
        flex-direction: column;
    }
    
    .alp-checkout-card {
        flex: 1 1 100%;
    }
    
    .alp-product-info {
        flex-direction: column;
    }
    
    .alp-product-price {
        margin-top: 10px;
    }
    
    .alp-coupon-form {
        flex-direction: column;
    }
    
    .alp-coupon-form input {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

/* پنهان کردن عناصر اضافی ووکامرس */
.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3,
.woocommerce-additional-fields h3 {
    display: none;
}

/* استایل برای فیلدهای فرم */
.form-row {
    margin-bottom: 15px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-row input, 
.form-row select, 
.form-row textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

/* رنگ اصلی برند */
.primary-color {
    color: #532e91;
}

.bg-primary-color {
    background-color: #532e91;
}

/* دکمه بازگشت به صفحه محصول */
.back-to-product-link {
    margin: 20px 0;
    text-align: right;
}

.back-to-product-link a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #f5f5f5;
    color: #333;
    border-radius: 8px;
    padding: 8px 15px;
    text-decoration: none;
    font-family: "Vazirmatn", sans-serif;
    transition: all 0.3s ease;
}

.back-to-product-link a:hover {
    background-color: #eaeaea;
    transform: translateY(-2px);
}

.back-to-product-link svg {
    margin-left: 5px;
}

/* استایل برای تنظیم فرم سفارش استاندارد */
#customer_details {
    margin-bottom: 0;
}

/* مخفی کردن جدول جزئیات سفارش */
.shop_table.woocommerce-checkout-review-order-table {
    display: none;
}

/* اصلاح استایل حق اثرها */
.woocommerce-terms-and-conditions-wrapper {
    display: none;
}

/* استایل روش‌های پرداخت */
#payment {
    background: transparent !important;
    border-radius: 5px;
}

#payment ul.payment_methods {
    padding: 0;
    border-bottom: none;
}

#payment ul.payment_methods li {
    line-height: 2;
    text-align: right;
    margin: 0;
    font-weight: 400;
    border-bottom: 1px solid #f2f2f2;
    padding: 10px 0;
}
.woocommerce-form-coupon-toggle {
    display: none !important;
}
#payment ul.payment_methods li input {
    margin: 0 0 0 1em;
}

#payment div.payment_box {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    padding: 1em;
    margin: 1em 0;
    font-size: .92em;
    border-radius: 5px;
    line-height: 1.5;
    background-color: #f8f8f8;
    color: #515151;
}

.woocommerce-checkout #payment div.payment_box::before {
    content: '';
    display: block;
    border: 1em solid #f8f8f8;
    border-left-color: transparent;
    border-right-color: transparent;
    border-top-color: transparent;
    position: absolute;
    top: -.75em;
    right: 0;
    margin: -1em 2em 0 0;
} 