﻿ 
/* کانتینر اصلی کنترل‌ها (کاملاً وسط‌چین با عرض واحد) */
.order-action-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 140px !important;
    margin: 0 auto !important;
}

/* باکس کنترل تعداد: - | عدد | + */
.quantity-box {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    direction: ltr !important;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #ffffff;
    overflow: hidden;
    width: 100% !important;
    height: 36px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s;
}

    .quantity-box:focus-within {
        border-color: #dc3545; /* هماهنگ با تم قرمز آلتین‌بافت هنگام کار با عدد */
        box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.12);
    }

/* دکمه‌های + و - */
.btn-qty {
    background-color: #f9fafb;
    border: none;
    color: #374151;
    width: 38px;
    height: 36px;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

    .btn-qty:hover {
        background-color: #f3f4f6;
        color: #111827;
    }

    .btn-qty:active {
        background-color: #e5e7eb;
    }

/* ورودی تعداد/متراژ در وسط */
.qty-input {
    flex-grow: 1 !important;
    width: auto !important;
    height: 36px !important;
    text-align: center !important;
    border: none !important;
    border-left: 1px solid #e5e7eb !important;
    border-right: 1px solid #e5e7eb !important;
    font-size: 15px !important;
    font-weight: bold !important;
    color: #1f2937 !important;
    outline: none !important;
    background-color: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
}

    .qty-input:focus {
        background-color: #fffdf5;
    }

/* دکمه ثبت (سبز تایید استاندارد و خوانا) */
.btn-submit-qty {
    background: linear-gradient(135deg, #28a745, #218838) !important;
    border: none !important;
    color: #ffffff !important;
    width: 100% !important;
    height: 32px !important;
    border-radius: 7px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.25) !important;
    transition: all 0.2s ease-in-out !important;
    padding: 0 !important;
    margin: 0 !important;
}

    .btn-submit-qty:hover {
        background: linear-gradient(135deg, #218838, #1e7e34) !important;
        box-shadow: 0 4px 7px rgba(40, 167, 69, 0.35) !important;
        transform: translateY(-1px);
    }

    .btn-submit-qty:active {
        transform: translateY(0);
        box-shadow: 0 1px 2px rgba(40, 167, 69, 0.2) !important;
    }





/* کانتینر اصلی قیمت (کادر ویرایشگر قیمت) */
.price-input-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #fdf2f2; /* زرشکی ملایم و هماهنگ با تم آلتین‌بافت */
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 4px 10px;
    margin-top: 8px;
    width: 140px; /* متناسب با عرض باکس بالا */
    transition: all 0.2s ease;
}

    /* حالت فوکوس برای زمان ویرایش قیمت */
    .price-input-wrapper:focus-within {
        background-color: #ffffff;
        border-color: #dc3545;
        box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.12);
    }

/* اینپوت قیمت */
.price-editable-input {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #b91c1c !important; /* قرمز زرشکی تیره */
    text-align: center !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* واحد تومان در کنار فیلد */
.price-unit-label {
    font-size: 11px;
    font-weight: 600;
    color: #7f1d1d;
    white-space: nowrap;
    user-select: none;
}




/* کانتینر محاسبه جمع ردیف */
.subtotal-calc-box {
    margin-top: 6px;
    font-size: 12px;
    color: #4b5563;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 22px; /* برای جلوگیری از پرش ارتفاع کارت‌ها */
    direction: rtl;
}

/* فرمول محاسبه به صورت خوانا و هماهنگ */
.calc-formula {
    color: #6b7280;
    font-size: 11px;
}

/* جمع نهایی برجسته */
.calc-total {
    font-weight: 800;
    color: #991b1b; /* زرشکی شیک و هماهنگ */
    font-size: 13px;
}

    .calc-total span {
        font-size: 10px;
        font-weight: normal;
        color: #6b7280;
        margin-right: 2px;
    }



