.mpu_popup {
    position: fixed;
    z-index: 9999;
    display: none;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
    width: 90%; /* عرض انعطاف پذیر به جای مقدار ثابت */
    box-sizing: border-box; /* برای محاسبه صحیح عرض و padding */
}

/* تنظیم اندازه تصویر در دسکتاپ */
@media (min-width: 768px) {
    .mpu_popup_img[data-size-desktop="small"] {
        max-width: 300px;
    }
    .mpu_popup_img[data-size-desktop="medium"] {
        max-width: 450px;
    }
    .mpu_popup_img[data-size-desktop="large"] {
        max-width: 600px;
    }
}

/* =================================== */
/* ===== کدهای اضافه شده برای موبایل ===== */
/* =================================== */
@media (max-width: 767px) {
    .mpu_popup {
        width: 90% !important; /* عرض پاپ آپ در موبایل */
        left: 5% !important; /* فاصله از چپ */
        right: 5% !important; /* فاصله از راست */
        margin: 0 auto;
        /* بازنویسی موقعیت برای قرارگیری صحیح در موبایل */
        transform: none !important; 
    }
    /* تنظیم موقعیت عمودی در موبایل */
    .mpu-popup-top-left,
    .mpu-popup-top-center,
    .mpu-popup-top-right {
        top: 20px;
        left: 5%;
    }
    .mpu-popup-center-left,
    .mpu-popup-center,
    .mpu-popup-center-right {
        top: 50%;
        left: 5%;
        transform: translateY(-50%) !important;
    }
    .mpu-popup-bottom-left,
    .mpu-popup-bottom-center,
    .mpu-popup-bottom-right {
        bottom: 20px;
        top: auto;
        left: 5%;
    }
    /* تنظیم اندازه تصویر در موبایل */
    .mpu_popup_img[data-size-mobile="small"] {
        max-width: 150px;
    }
    .mpu_popup_img[data-size-mobile="medium"] {
        max-width: 200px;
    }
    .mpu_popup_img[data-size-mobile="large"] {
        max-width: 100%;
    }
}

.mpu_popup_img {
    max-width: 100%;
    height: auto; /* برای حفظ نسبت ابعاد تصویر */
}

.mpu_popup_content {
    margin-top: 10px;
}

.mpu_popup_form {
    margin-top: 10px;
}

.mpu_form input[type="text"],
.mpu_form input[type="tel"],
.mpu_form input[type="email"] {
    width: 100%;
    padding: 5px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.mpu_form button {
    padding: 8px 15px;
    width: 100%;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.mpu_form button:hover {
    background-color: #005d87;
}

.mpu_confirm_label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.mpu_confirm_label input[type="checkbox"] {
    display: none;
}

.mpu_confirm_label input[type="checkbox"] + span {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    line-height: 20px;
}

.mpu_confirm_label input[type="checkbox"] + span:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #0073aa;
    background: #fff;
    border-radius: 4px;
}

.mpu_confirm_label input[type="checkbox"]:checked + span:after {
    content: '\2713';
    position: absolute;
    top: 2px;
    left: 6px;
    font-size: 14px;
    color: #0073aa;
}

.mpu_confirm_label input[type="checkbox"]:checked + span:before {
    background: #e6f0fa;
}

.mpu-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    padding: 5px;
}

.mpu-popup-top-left { top: 10px; left: 10px; }
.mpu-popup-top-center { top: 10px; left: 50%; transform: translateX(-50%); }
.mpu-popup-top-right { top: 10px; right: 10px; }
.mpu-popup-center-left { top: 50%; left: 10px; transform: translateY(-50%); }
.mpu-popup-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.mpu-popup-center-right { top: 50%; right: 10px; transform: translateY(-50%); }
.mpu-popup-bottom-left { bottom: 10px; left: 10px; }
.mpu-popup-bottom-center { bottom: 10px; left: 50%; transform: translateX(-50%); }
.mpu-popup-bottom-right { bottom: 10px; right: 10px; }