/**
 * CGWay Custom Payment Gateways - Frontend Styles
 * Version: 1.3.4 (Ultra-Clean Mobile & Desktop UX)
 */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

.cpg-gateway-wrapper,
.cpg-gateway-wrapper *,
.cpg-gateway-instructions,
.cpg-fields-container,
.cpg-thankyou-instructions-box {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    box-sizing: border-box !important;
}

/* Container & Wrapper */
.cpg-gateway-wrapper {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
    width: 100% !important;
    max-width: 100% !important;
}

.cpg-gateway-desc {
    margin-bottom: 12px;
    color: #475569;
    font-size: 13.5px;
    line-height: 1.6;
}

/* Benefit Badges (Discount or Fee) */
.cpg-benefit-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
    line-height: 1.4;
}

.cpg-benefit-discount {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.cpg-benefit-fee {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.cpg-badge-icon {
    font-size: 16px;
}

/* ==========================================================================
   إصلاح مظهر خطوات التحويل (إنستاباي / فودافون كاش) - تصميم عصري واسع
   ========================================================================== */
/* إلغاء تداخل الصناديق المتعددة التي تضغط المحتوى في شريط ضيق */
.cpg-gateway-instructions,
.cpg-instructions-box {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 14px !important;
    width: 100% !important;
    box-shadow: none !important;
}

.cpg-instructions-box p {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 0 10px 0 !important;
}

/* تحويل القائمة المرقمة إلى بطاقات خطوات واسعة وأنيقة بدلاً من الأبراج الضيقة */
.cpg-gateway-instructions ol,
.cpg-instructions-box ol {
    list-style: none !important;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 0 12px 0 !important;
    counter-reset: cpg-counter !important;
    width: 100% !important;
}

.cpg-gateway-instructions ol > li,
.cpg-instructions-box ol > li {
    counter-increment: cpg-counter !important;
    position: relative !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    padding: 12px 14px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    margin: 0 0 8px 0 !important;
    font-size: 13.5px !important;
    line-height: 1.6 !important;
    color: #1e293b !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
}

/* الدائرة الرقمية الأنيقة (1, 2, 3...) كعنصر Flex ثابت يمنع التداخل نهائياً في أي اتجاه أو شاشة */
.cpg-gateway-instructions ol > li::before,
.cpg-instructions-box ol > li::before {
    content: counter(cpg-counter) !important;
    position: static !important;
    flex-shrink: 0 !important;
    width: 24px !important;
    height: 24px !important;
    background: #0d9488 !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    text-align: center !important;
    box-shadow: 0 2px 4px rgba(13, 148, 136, 0.25) !important;
    margin-top: 2px !important;
}

/* حاوية محتوى الخطوة على الديسكتوب (ظهور أفقي مدمج وأنيق على سطر واحد) */
.cpg-step-content {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: inline-flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
}

.cpg-step-text {
    display: inline !important;
    width: auto !important;
    color: #1e293b !important;
    font-size: 13.5px !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* ==========================================================================
   إصلاح حجم الباركود QR Code (على الديسكتوب يظل بالحجم المدمج والمتوسط)
   ========================================================================== */
.cpg-qr-code-box {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 16px !important;
    text-align: center !important;
    margin: 15px auto !important;
    max-width: 240px !important;
    width: auto !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

.cpg-qr-caption {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    margin-bottom: 12px !important;
    display: block !important;
}

/* إجبار الصورة على حجم 150px وقابلة للمسح بالكاميرا، والتغلب على !important الثيم */
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method img.cpg-qr-img,
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method .cpg-qr-code-box img,
.cpg-qr-code-box img.cpg-qr-img,
img.cpg-qr-img {
    width: 150px !important;
    height: 150px !important;
    min-width: 150px !important;
    min-height: 150px !important;
    max-width: 150px !important;
    max-height: 150px !important;
    display: block !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 6px !important;
    background: #ffffff !important;
}

/* سطر رقم الهاتف أو عنوان الدفع على الديسكتوب (inline-block لمنع التكسير الرأسي نهائياً) */
.cpg-copy-target {
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace !important;
    font-size: 13px !important;
    background: #e2e8f0 !important;
    color: #0f172a !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    display: inline-block !important;
    direction: ltr !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    margin: 0 !important;
}

/* زر النسخ السريع على الديسكتوب (بجانب الرقم في نفس السطر) */
.cpg-copy-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 4px 10px !important;
    background: #0d9488 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    margin: 0 !important;
    margin-inline-start: 6px !important;
    vertical-align: middle !important;
    transition: background-color 0.2s, transform 0.1s !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
}

.cpg-copy-btn:hover {
    background: #0f766e !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.cpg-copy-btn.copied {
    background: #10b981 !important;
}

.cpg-copy-icon {
    display: inline-block !important;
    vertical-align: middle !important;
}

/* Additional Checkout Fields Container (تصميم منبسط وعصري بدون صناديق متداخلة) */
.cpg-fields-container {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-top: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
}

.cpg-field-row {
    margin-bottom: 14px !important;
}

.cpg-field-row:last-child {
    margin-bottom: 0 !important;
}

.cpg-field-row label {
    display: block !important;
    font-weight: 700 !important;
    margin-bottom: 6px !important;
    color: #334155 !important;
    font-size: 13px !important;
}

.cpg-field-row label .optional {
    font-weight: normal !important;
    color: #64748b !important;
    font-size: 12px !important;
}

.cpg-field-row input.input-text {
    width: 100% !important;
    border-radius: 6px !important;
    padding: 9px 12px !important;
    border: 1.5px solid #cbd5e1 !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
}

/* Custom File Upload Component */
.cpg-file-upload-wrapper {
    display: block !important;
    margin-top: 6px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.cpg-custom-file-trigger {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 14px !important;
    background: #f8fafc !important;
    border: 2px dashed #94a3b8 !important;
    border-radius: 8px !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
    text-align: center !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.cpg-receipt-file-input {
    display: none !important;
}

.cpg-custom-file-trigger:hover {
    background: #f1f5f9 !important;
    border-color: #0d9488 !important;
    color: #0d9488 !important;
}

.cpg-trigger-icon {
    font-size: 16px;
}

.cpg-file-status-box {
    display: none;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    color: #166534 !important;
    padding: 8px 12px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    margin-top: 8px !important;
    word-break: break-all !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
}

.cpg-file-status-box.has-file {
    display: flex !important;
}

.cpg-file-name-text {
    flex: 1 !important;
    font-weight: 500 !important;
}

.cpg-remove-file-btn {
    background: #ef4444 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px !important;
    width: 24px !important;
    height: 24px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    padding: 0 !important;
    transition: background-color 0.2s !important;
}

.cpg-remove-file-btn:hover {
    background: #dc2626 !important;
}

.cpg-file-hint {
    display: block !important;
    margin-top: 6px !important;
    color: #64748b !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
}

/* بطاقة معاينة الإيصال التفاعلية الجديدة (معاينة، تكبير، وحذف) */
.cpg-preview-card {
    display: none !important;
}
.cpg-preview-card.has-file {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 10px 12px !important;
    margin-top: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.cpg-preview-thumb-wrap {
    position: relative !important;
    width: 68px !important;
    height: 68px !important;
    flex-shrink: 0 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
    border: 1px solid #e2e8f0 !important;
    background: #f8fafc !important;
    cursor: pointer !important;
}

.cpg-preview-thumb-wrap img.cpg-preview-thumb,
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method img.cpg-preview-thumb {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
}

.cpg-preview-zoom-badge {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: rgba(15, 23, 42, 0.8) !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    text-align: center !important;
    padding: 2px 0 !important;
    line-height: 1.2 !important;
}

.cpg-preview-info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    text-align: right !important;
    direction: rtl !important;
}

.cpg-preview-filename {
    font-weight: 700 !important;
    font-size: 13px !important;
    color: #0f172a !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.4 !important;
}

.cpg-preview-filesize {
    font-size: 11.5px !important;
    color: #64748b !important;
    margin-top: 2px !important;
}

.cpg-preview-status {
    font-size: 11.5px !important;
    color: #15803d !important;
    font-weight: 600 !important;
    margin-top: 4px !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.cpg-preview-actions {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
}

.cpg-btn-preview-zoom,
.cpg-btn-delete-receipt {
    padding: 5px 12px !important;
    font-size: 11.5px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    text-align: center !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    transition: all 0.2s !important;
}

.cpg-btn-preview-zoom {
    background: #ffffff !important;
    color: #0d9488 !important;
    border: 1px solid #0d9488 !important;
}

.cpg-btn-preview-zoom:hover {
    background: #0d9488 !important;
    color: #ffffff !important;
}

.cpg-btn-delete-receipt {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
}

.cpg-btn-delete-receipt:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #dc2626 !important;
}

/* نافذة المعاينة المكبرة المنبثقة (Lightbox Modal) */
.cpg-lightbox-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 9999999 !important;
    display: none !important;
}
.cpg-lightbox-modal.is-open {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    box-sizing: border-box !important;
}

.cpg-lightbox-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(15, 23, 42, 0.85) !important;
    backdrop-filter: blur(4px) !important;
    cursor: pointer !important;
}

.cpg-lightbox-content {
    position: relative !important;
    z-index: 2 !important;
    max-width: 90vw !important;
    max-height: 90vh !important;
    background: #ffffff !important;
    padding: 12px !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

.cpg-lightbox-close {
    position: absolute !important;
    top: -14px !important;
    left: -14px !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: #dc2626 !important;
    color: #ffffff !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    border: 2px solid #ffffff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    line-height: 1 !important;
    padding: 0 !important;
    transition: transform 0.15s !important;
}

.cpg-lightbox-close:hover {
    transform: scale(1.1) !important;
    background: #b91c1c !important;
}

.cpg-lightbox-img {
    max-width: 85vw !important;
    max-height: 75vh !important;
    object-fit: contain !important;
    border-radius: 6px !important;
    display: block !important;
}

.cpg-lightbox-caption {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    margin-top: 10px !important;
    text-align: center !important;
}

/* Thank You Page */
.cpg-thankyou-instructions-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
}

.cpg-thankyou-instructions-box h3 {
    margin-top: 0;
    color: #1e293b;
    font-size: 18px;
    border-bottom: 2px solid #3b82f6;
    display: inline-block;
    padding-bottom: 4px;
}

.cpg-whatsapp-notice-box {
    margin: 20px 0;
    padding: 16px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    text-align: center;
}

.cpg-whatsapp-notice-box p {
    margin: 0 0 12px 0;
    color: #166534;
    font-weight: 500;
}

.cpg-whatsapp-btn {
    background: #25d366 !important;
    color: #ffffff !important;
    font-weight: bold;
    padding: 10px 20px !important;
    border-radius: 30px !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(37, 211, 102, 0.3);
    transition: transform 0.2s, background-color 0.2s;
}

.cpg-whatsapp-btn:hover {
    background: #1ebc59 !important;
    transform: translateY(-2px);
}

.cpg-receipt-attached-notice {
    margin-top: 15px;
    padding: 12px 16px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 6px;
    color: #065f46;
}

/* ==========================================================================
   ضبط زر إتمام الطلب ليظهر على سطر واحد بخط أنيق ومتناسق
   ========================================================================== */
#place_order,
.woocommerce-checkout #payment #place_order,
button#place_order {
    font-family: 'Tajawal', sans-serif !important;
    white-space: nowrap !important;
    font-size: 15.5px !important;
    font-weight: 700 !important;
    padding: 14px 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    letter-spacing: normal !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 8px !important;
    line-height: 1.3 !important;
}

/* ==========================================================================
   إصلاح تجربة الموبايل الفائقة (Mobile-First Optimization <= 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* استعادة المساحة المهدرة على جانبي الشاشة في الموبايل */
    .woocommerce-checkout,
    .woocommerce-checkout #order_review,
    .woocommerce-checkout #payment,
    .woocommerce-checkout #payment ul.payment_methods {
        padding-left: 2px !important;
        padding-right: 2px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* إلغاء تداخل الصناديق لتوفير أقصى عرض ممكن على شاشات الهواتف */
    .woocommerce-checkout #payment ul.payment_methods li.wc_payment_method {
        padding: 10px 8px !important;
        margin-bottom: 8px !important;
        border-radius: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > div.payment_box {
        padding: 6px 0 !important;
        margin: 6px 0 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .cpg-gateway-wrapper {
        margin-top: 2px !important;
        width: 100% !important;
    }

    .cpg-gateway-instructions,
    .cpg-instructions-box,
    .cpg-fields-container {
        padding: 0 !important;
        margin: 6px 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .cpg-gateway-instructions ol > li,
    .cpg-instructions-box ol > li {
        padding: 8px 10px !important;
        gap: 8px !important;
        font-size: 13px !important;
        margin-bottom: 6px !important;
        background: #f8fafc !important;
        border: 1px solid #f1f5f9 !important;
        border-radius: 8px !important;
    }

    .cpg-gateway-instructions ol > li::before,
    .cpg-instructions-box ol > li::before {
        width: 20px !important;
        height: 20px !important;
        font-size: 11px !important;
        margin-top: 2px !important;
        position: static !important;
        flex-shrink: 0 !important;
    }

    /* ==========================================================================
       تخصيصات الموبايل الحصرية فقط (Mobile-Only UX <= 768px)
       ========================================================================== */
    /* 1. جعل مربع رمز الاستجابة السريعة بعرض 100% ليطابق باقي أقسام الموبايل */
    .cpg-qr-code-box {
        width: 100% !important;
        max-width: 100% !important;
        margin: 10px 0 14px 0 !important;
        padding: 14px 10px !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    }

    .cpg-qr-caption {
        font-size: 13px !important;
        font-weight: 700 !important;
        margin-bottom: 10px !important;
        display: block !important;
    }

    .woocommerce-checkout #payment ul.payment_methods li.wc_payment_method img.cpg-qr-img,
    .woocommerce-checkout #payment ul.payment_methods li.wc_payment_method .cpg-qr-code-box img,
    .cpg-qr-code-box img.cpg-qr-img,
    img.cpg-qr-img {
        width: 160px !important;
        height: 160px !important;
        min-width: 160px !important;
        min-height: 160px !important;
        max-width: 160px !important;
        max-height: 160px !important;
        display: block !important;
        margin: 0 auto !important;
    }

    /* 2. تحويل خطوات التحويل على الموبايل إلى 3 أسطر رأسية مستقلة تماماً */
    .cpg-step-content {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
        gap: 6px !important;
    }

    /* السطر الأول: النص التوضيحي */
    .cpg-step-text {
        display: block !important;
        width: 100% !important;
        font-size: 13px !important;
        line-height: 1.5 !important;
    }

    /* السطر الثاني: رقم الهاتف أو بريد الدفع اللحظي */
    .cpg-copy-target {
        display: inline-block !important;
        width: fit-content !important;
        max-width: 100% !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        background: #f1f5f9 !important;
        border: 1px dashed #cbd5e1 !important;
        padding: 5px 12px !important;
        border-radius: 6px !important;
        white-space: nowrap !important;
        word-break: normal !important;
        overflow-x: auto !important;
        margin: 3px 0 !important;
        direction: ltr !important;
        text-align: left !important;
        box-sizing: border-box !important;
    }

    /* السطر الثالث: زر النسخ السريع في سطر مستقل أسفل الرقم */
    .cpg-copy-btn {
        display: inline-flex !important;
        margin: 2px 0 0 0 !important;
        margin-inline-start: 0 !important;
        padding: 5px 12px !important;
        font-size: 11.5px !important;
        width: auto !important;
    }

    .cpg-field-row {
        margin-bottom: 10px !important;
    }

    .cpg-field-row input.input-text {
        padding: 8px 10px !important;
        font-size: 13px !important;
    }

    .cpg-custom-file-trigger {
        padding: 10px 8px !important;
        font-size: 12px !important;
    }

    .wc_payment_method[class*="cgway_"] label img,
    .wc_payment_method[class*="custom_payment_method"] label img {
        max-height: 22px !important;
        margin: 2px 0 !important;
    }

    /* ضمان بقاء زر إتمام الطلب على سطر واحد على كافة مقاسات الموبايل */
    #place_order,
    .woocommerce-checkout #payment #place_order,
    button#place_order {
        font-size: 14.5px !important;
        padding: 13px 6px !important;
        white-space: nowrap !important;
        letter-spacing: -0.2px !important;
    }
}

@media screen and (max-width: 400px) {
    #place_order,
    .woocommerce-checkout #payment #place_order,
    button#place_order {
        font-size: 13.5px !important;
        padding: 12px 4px !important;
        white-space: nowrap !important;
        letter-spacing: -0.3px !important;
    }
}

/* ضبط موحد ومتناسق لكافة أيقونات بوابات الدفع (Classic & Blocks) */
.cpg-gateway-icon,
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label img,
.wc-block-components-radio-control__option img {
    height: 26px !important;
    width: auto !important;
    max-height: 26px !important;
    max-width: 104px !important;
    object-fit: contain !important;
    vertical-align: middle !important;
    border-radius: 4px !important;
}
@media screen and (max-width: 768px) {
    .cpg-gateway-icon,
    .woocommerce-checkout #payment ul.payment_methods li.wc_payment_method > label img,
    .wc-block-components-radio-control__option img {
        height: 24px !important;
        max-height: 24px !important;
        max-width: 96px !important;
    }
}
