/* smart_popups.css - تنسيق النوافذ المنبثقة الذكية */

/* أنماط النوافذ المنبثقة */
.smart-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    animation: popupFadeIn 0.3s ease;
}

@keyframes popupFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
}

.popup-container {
    position: relative;
    max-width: 500px;
    width: 90%;
    background: linear-gradient(145deg, #1a1a1a, #0f0f0f);
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 28px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    animation: popupSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.popup-close {
    position: absolute;
    top: 15px;
    left: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s;
    z-index: 10;
}

.popup-close:hover {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    transform: rotate(90deg);
}

.popup-content {
    padding: 40px 35px;
    text-align: center;
}

.popup-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.15), rgba(201, 168, 76, 0.05));
    border: 1px solid rgba(201, 168, 76, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--gold);
}

.popup-content h3 {
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff, var(--gold-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.popup-content p {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* نافذة الخروج */
.offer-box {
    background: rgba(201, 168, 76, 0.05);
    border: 1px solid rgba(201, 168, 76, 0.2);
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
}

.offer-badge {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.discount-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 15px;
}

.code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: var(--black);
    border: 1px solid var(--gold);
    border-radius: 12px;
    padding: 12px 18px;
}

.code-text {
    font-size: 18px;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 1px;
}

.copy-btn {
    background: rgba(201, 168, 76, 0.15);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.copy-btn:hover {
    background: rgba(201, 168, 76, 0.3);
}

/* نافذة الاشتراك */
.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
}

.subscribe-form input {
    padding: 14px 18px;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid var(--black-border);
    border-radius: 12px;
    color: white;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
}

.subscribe-form input:focus {
    border-color: var(--gold);
    outline: none;
}

.subscribe-form button {
    padding: 14px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
    border: none;
    border-radius: 12px;
    color: var(--black);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.subscribe-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 168, 76, 0.3);
}

.privacy-note {
    font-size: 11px !important;
    color: var(--text-muted) !important;
    margin-top: 10px !important;
}

.privacy-note i {
    color: var(--gold);
    margin-left: 5px;
}

/* نافذة العرض الخاص */
.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.countdown-timer .timer-box {
    background: var(--black);
    padding: 10px 15px;
    border-radius: 12px;
    min-width: 65px;
    text-align: center;
}

.countdown-timer .timer-box span:first-child {
    font-size: 24px;
    font-weight: 800;
    color: var(--gold);
    display: block;
}

.countdown-timer .timer-box span:last-child {
    font-size: 10px;
    color: var(--text-muted);
}

.offer-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
    color: var(--black);
    border-radius: 40px;
    font-weight: 700;
    transition: all 0.3s;
    margin-top: 10px;
}

.offer-cta:hover {
    transform: translateY(-2px);
    gap: 15px;
    box-shadow: 0 8px 25px rgba(201, 168, 76, 0.3);
}

.popup-btn {
    padding: 12px 24px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-family: 'Cairo', sans-serif;
}

.continue-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    width: 100%;
}

.continue-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Toast notifications */
.smart-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--black-card);
    border-right: 4px solid var(--gold);
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10002;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.smart-toast.show {
    transform: translateX(0);
}

.smart-toast.toast-error {
    border-right-color: #e74c3c;
}

.smart-toast.toast-error i {
    color: #e74c3c;
}

@media (max-width: 600px) {
    .popup-content {
        padding: 30px 20px;
    }
    .popup-content h3 {
        font-size: 20px;
    }
    .code-text {
        font-size: 14px;
    }
    .countdown-timer {
        gap: 8px;
    }
    .countdown-timer .timer-box {
        padding: 6px 10px;
        min-width: 50px;
    }
    .countdown-timer .timer-box span:first-child {
        font-size: 18px;
    }
}