.upc-calc-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    direction: rtl;
    box-sizing: border-box;
    max-width: 1000px;
    margin: 0 auto;
}

.upc-sidebar-box {
    flex: 1 1 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.upc-notes {
    list-style: disc inside;
    color: #64748b;
    font-size: 13px;
    line-height: 1.8;
    margin: 0 0 20px 0;
    padding: 0;
}

.upc-result-box {
    background: #eff6ff;
    border: 1.5px dashed #3b82f6;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    margin-bottom: 16px;
}

.upc-res-title {
    display: block;
    font-size: 13px;
    color: #475569;
    margin-bottom: 6px;
}

.upc-res-val {
    font-size: 22px;
    font-weight: 700;
    color: #2563eb;
}

.upc-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.upc-btn-action {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    transition: all 0.2s ease;
}

.upc-btn-action:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.upc-form-box {
    flex: 2 1 450px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.upc-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upc-label {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
}

.upc-select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 14px;
    outline: none;
}

.upc-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

.upc-chk-label {
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #e2e8f0;
}

.upc-row-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upc-badge-val {
    background: #2563eb;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.upc-range-slider {
    width: 100%;
    accent-color: #2563eb;
    cursor: pointer;
}

.upc-slider-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #94a3b8;
}

.upc-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.upc-item-title {
    font-size: 13px;
    color: #334155;
}

.upc-radio-pills {
    display: flex;
    gap: 12px;
}

.upc-radio-pills label {
    cursor: pointer;
    font-size: 13px;
    color: #475569;
}

.upc-submit-btn {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 8px;
}

.upc-submit-btn:hover {
    background: #1d4ed8;
}

@media print {
    .upc-actions, .upc-submit-btn { display: none !important; }
    .upc-calc-wrapper { box-shadow: none; border: 1px solid #ccc; }
}







/* موبایل: فرم بالای صفحه، باکس قیمت و نکات پایین صفحه */
@media screen and (max-width: 768px) {
    .upc-calc-wrapper {
        display: flex;
        flex-direction: column;
    }

    /* فرم اصلی برود بالا */
    .upc-form-box {
        order: 1;
    }

    /* نکات، باکس قیمت و دکمه‌ها بروند پایین */
    .upc-sidebar-box {
        order: 2;
        margin-top: 24px;
    }
}

