/* Deprecation Pop-up Plugin CSS - Arabic RTL Support */

.smart-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999999;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    direction: rtl;
}

.smart-popup-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.smart-popup-container {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    margin: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: visible;
    transform: scale(0.8);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    direction: rtl;
    border: 4px solid transparent;
}

.smart-popup-overlay.show .smart-popup-container {
    transform: scale(1);
}

/* Animated yellow border - only at edges */
.smart-popup-border-animation {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, #ffeb3b, #ffd54f, #ffeb3b, #fff59d);
    background-size: 300% 300%;
    border-radius: 24px;
    z-index: -1;
    animation: borderAnimation 3s ease infinite;
    padding: 4px;
}

.smart-popup-border-animation::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    background: #ffffff;
    border-radius: 20px;
}

@keyframes borderAnimation {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Pulsing border effect - only at edges */
.smart-popup-border-animation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 235, 59, 0.8), transparent);
    border-radius: 24px;
    animation: borderPulse 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes borderPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.01);
    }
}

.smart-popup-close {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(26, 35, 126, 0.1);
    font-size: 28px;
    color: #1a237e;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.smart-popup-close:hover {
    background: rgba(255, 235, 59, 0.9);
    border-color: rgba(255, 235, 59, 0.5);
    color: #1a237e;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 235, 59, 0.3);
}

.smart-popup-content {
    padding: 50px 40px 40px;
    text-align: center;
    background: #ffffff;
    border-radius: 16px;
    position: relative;
    z-index: 10;
}

.smart-popup-logo {
    margin-bottom: 25px;
}

.smart-popup-logo img {
    max-width: 100px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(26, 35, 126, 0.15);
    transition: transform 0.3s ease;
    border: 2px solid rgba(255, 235, 59, 0.3);
}

.smart-popup-logo img:hover {
    transform: scale(1.05);
    border-color: rgba(255, 235, 59, 0.6);
}

.smart-popup-title {
    font-size: 28px;
    font-weight: bold;
    color: #1a237e;
    margin-bottom: 15px;
    line-height: 1.4;
    font-family: 'Arial', 'Tahoma', sans-serif;
    position: relative;
}

.smart-popup-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 50%;
    transform: translateX(50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ffeb3b, #ffc107);
    border-radius: 2px;
}

.smart-popup-subtitle {
    font-size: 16px;
    color: #666666;
    margin-bottom: 30px;
    line-height: 1.6;
    font-family: 'Arial', 'Tahoma', sans-serif;
}

.smart-popup-button {
    display: inline-block;
    background: linear-gradient(135deg, #ffeb3b 0%, #ffc107 100%);
    color: #1a237e;
    padding: 15px 35px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 235, 59, 0.4);
    border: 2px solid transparent;
    font-family: 'Arial', 'Tahoma', sans-serif;
    position: relative;
    overflow: hidden;
}

.smart-popup-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.smart-popup-button:hover::before {
    left: 100%;
}

.smart-popup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 235, 59, 0.6);
    background: linear-gradient(135deg, #fff59d 0%, #ffb300 100%);
}

.smart-popup-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

/* WhatsApp button style */
.smart-popup-button.whatsapp {
    background-image: none; /* Explicitly remove any background image */
    background-color: #25D366; /* Set the background color to WhatsApp Green */
    color: white; /* This is confirmed to be working */
}

.smart-popup-button.whatsapp:hover {
    background-image: none; /* Ensure no image on hover either */
    background-color: #1EBE57; /* Set hover background color */
    /* color: white; is inherited or can be re-stated if needed */
}

.smart-popup-button.whatsapp::before {
    background: none; /* Removes the default shine effect for WhatsApp button */
}

/* Mobile responsive */
@media (max-width: 768px) {
    .smart-popup-container {
        margin: 10px;
        width: 95%;
    }
    
    .smart-popup-content {
        padding: 40px 25px 30px;
    }
    
    .smart-popup-title {
        font-size: 24px;
    }
    
    .smart-popup-subtitle {
        font-size: 14px;
    }
    
    .smart-popup-button {
        padding: 12px 25px;
        font-size: 14px;
    }
    
    .smart-popup-logo img {
        max-width: 80px;
    }
}

/* Remove the blue accent line at top since we want clean white content */
/* .smart-popup-content::before removed */

/* Entrance animation for content elements */
.smart-popup-overlay.show .smart-popup-logo {
    animation: fadeInUp 0.6s ease 0.2s both;
}

.smart-popup-overlay.show .smart-popup-title {
    animation: fadeInUp 0.6s ease 0.4s both;
}

.smart-popup-overlay.show .smart-popup-subtitle {
    animation: fadeInUp 0.6s ease 0.6s both;
}

.smart-popup-overlay.show .smart-popup-button {
    animation: fadeInUp 0.6s ease 0.8s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RTL specific adjustments */
[dir="rtl"] .smart-popup-close {
    left: auto;
    right: 15px;
}

[dir="rtl"] .smart-popup-content {
    text-align: center;
}

/* Loading spinner for button */
.smart-popup-button.loading {
    pointer-events: none;
    position: relative;
}

.smart-popup-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #1a237e;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
