ا
/**
 * تصميم النوافذ المنبثقة للنشرة البريدية
 * تصميم بسيط باللونين الأزرق والأبيض مع أيقونة قابلة للسحب
 */

/* النافذة المنبثقة الأساسية */
.newsletter-popup {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999999 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.5) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.newsletter-popup.show {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
}

.newsletter-popup.closing {
    opacity: 0;
    visibility: hidden;
}

/* خلفية النافذة */
.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

/* محتوى النافذة - تصميم الأدمين الجميل */
.popup-content {
    background: white !important;
    padding: 0 !important;
    border-radius: 20px !important;
    max-width: 500px !important;
    width: 90% !important;
    position: relative !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2) !important;
    border: none !important;
    animation: slideUp 0.4s ease !important;
    transform: translateY(0) !important;
    overflow: hidden !important;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* رأس النافذة - مضغوط */
.popup-header {
    background: linear-gradient(135deg, #3b82f6, #1e40af) !important;
    color: white !important;
    padding: 20px 25px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 0 !important;
    border: none !important;
}

.popup-header h3 {
    color: white !important;
    font-size: 20px !important;
    margin: 0 !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
}

/* زر الإغلاق - تصميم الأدمين */
.popup-close {
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 20px !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    position: static !important;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: rotate(180deg) !important;
}

/* جسم النافذة - تصميم مضغوط */
.popup-body {
    padding: 25px !important;
    text-align: center !important;
}

.popup-body p {
    color: #374151 !important;
    text-align: center !important;
    margin-bottom: 20px !important;
    line-height: 1.6 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
}

/* نموذج الاشتراك - تصميم مضغوط */
.subscription-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
    margin: 0 0 20px 0 !important;
    background: #f8f9fa !important;
    padding: 20px !important;
    border-radius: 12px !important;
}

.email-input,
.name-input {
    padding: 12px 16px !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 10px !important;
    font-size: 15px !important;
    background: #ffffff !important;
    transition: all 0.3s ease !important;
    color: #1f2937 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    font-weight: 500 !important;
}

.email-input::placeholder,
.name-input::placeholder {
    color: #9ca3af !important;
    font-weight: 400 !important;
}

.email-input:focus,
.name-input:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    background: #ffffff !important;
}

/* ذيل النافذة - محذوف */
.popup-footer {
    display: none;
}

/* الأزرار - تصميم مضغوط */
.btn-subscribe,
.btn-subscribe-visitor {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    text-transform: none;
}

.btn-subscribe,
.btn-subscribe-visitor {
    background: linear-gradient(135deg, #3b82f6, #1e40af) !important;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-subscribe:hover,
.btn-subscribe-visitor:hover {
    background: linear-gradient(135deg, #1e40af, #3b82f6) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-subscribe:disabled,
.btn-subscribe-visitor:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* زر الإغلاق محذوف */

/* رسائل النجاح والخطأ */
.popup-message {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popup-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.popup-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* الأيقونة الجانبية - تظهر خارج الشاشة */
.newsletter-sticky-icon {
    position: fixed;
    top: 50%;
    right: -80px;
    /* خارج حدود الشاشة أكثر للزر الجديد */
    transform: translateY(-50%);
    z-index: 9998;
    /* أقل من النافذة المنبثقة (999999) */
    cursor: pointer;
    /* ماوس عادي بدلاً من move */
    opacity: 0;
    transition: all 0.4s ease;
    user-select: none;
    -webkit-user-select: none;
}

.newsletter-sticky-icon.show {
    opacity: 1;
    right: -50px;
    /* جزء أكبر يظهر برة الصفحة */
}

.newsletter-sticky-icon:hover {
    right: 5px;
    /* تظهر كاملة لكن قريبة من الصفحة - مع "ذيل" */
}

.sticky-icon-content {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
    padding: 12px 25px 12px 15px;
    /* مساحة إضافية لزر X */
    border-radius: 25px 0 0 25px;
    /* دائري من اليسار فقط */
    font-weight: 800;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    position: relative;
    overflow: visible;
    /* لإظهار زر X خارج الحدود */
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
    /* عرض أدنى لضمان ظهور النص */
}

/* hover بسيط جداً */
.newsletter-sticky-icon:hover .sticky-icon-content {
    background: #3b82f6;
    color: white;
}

.sticky-icon-content .text {
    font-size: 14px;
    font-weight: 800;
}

/* زر إغلاق الأيقونة اللاصقة */
.sticky-close-btn {
    position: absolute;
    top: -8px;
    left: -8px;
    /* في المقدمة (اليسار) */
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e74c3c;
    color: white;
    border: none;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(231, 76, 60, 0.4);
    z-index: 2;
    flex-shrink: 0;
    /* لا يتقلص */
}

.sticky-close-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(231, 76, 60, 0.6);
}

/* تصميم خاص للأعضاء */
.member-welcome-popup .popup-content {
    border-top: 3px solid #3498db !important;
}

.member-welcome-popup .popup-header h3 {
    color: #3498db !important;
}

/* تصميم خاص للزوار */
.visitor-popup .popup-content {
    border-top: 3px solid #3498db !important;
}

.visitor-popup .popup-header h3 {
    color: #3498db !important;
}

/* التصميم المتجاوب */
@media (max-width: 768px) {
    .popup-content {
        width: 95%;
        padding: 25px 20px !important;
        max-height: 85vh;
    }

    .popup-header h3 {
        font-size: 18px;
    }

    .popup-body p {
        font-size: 13px;
    }

    .popup-footer {
        flex-direction: column;
    }

    .btn-subscribe,
    .btn-subscribe-visitor {
        width: 100%;
        margin-bottom: 8px;
    }

    .newsletter-sticky-icon {
        right: 10px;
    }

    .sticky-icon-content {
        padding: 10px 14px;
    }

    .sticky-icon-content .text {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .popup-content {
        width: 98%;
        border-radius: 12px;
        padding: 20px 15px !important;
    }

    .popup-header h3 {
        font-size: 16px;
    }

    .email-input,
    .name-input {
        padding: 10px;
        font-size: 13px;
    }

    .btn-subscribe,
    .btn-subscribe-visitor {
        padding: 10px 16px;
        font-size: 13px;
    }
}

/* تحسينات الأداء */
.newsletter-popup {
    will-change: opacity, visibility;
}

.popup-content {
    will-change: transform;
}

.newsletter-sticky-icon {
    will-change: opacity, transform;
}

/* إصلاح إضافي للتأكد من الظهور في المنتصف */
body .newsletter-popup {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 999999 !important;
    display: block !important;
}

body .newsletter-popup .popup-content {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0.9) !important;
    margin: 0 !important;
}

body .newsletter-popup.show .popup-content {
    transform: translate(-50%, -50%) scale(1) !important;
}

/* إصلاح قوي للظهور */
html .newsletter-popup.show,
body .newsletter-popup.show,
.newsletter-popup.show {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    pointer-events: all !important;
}

html .newsletter-popup.show .popup-content,
body .newsletter-popup.show .popup-content,
.newsletter-popup.show .popup-content {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* إشعارات النشرة البريدية */
.newsletter-notification {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}