/* ==========================================================================
   Exit Intent Modal - Modern Redesign
   ========================================================================== */

.csp-exit-intent-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.csp-exit-intent-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

.csp-exit-intent-modal {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
    padding: 30px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    text-align: center;
    overflow: hidden;
    animation: modalEntrance 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.csp-exit-intent-backdrop.is-visible .csp-exit-intent-modal {
    transform: translateY(0);
}

.csp-exit-intent-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 5px;
    z-index: 1;
}

.csp-exit-intent-close:hover {
    color: #333;
}

.csp-exit-intent-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: white;
}

.csp-exit-intent-icon svg {
    width: 28px;
    height: 28px;
}

.csp-exit-intent-heading {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px;
    color: #2d3748;
    line-height: 1.3;
}

.csp-exit-intent-text {
    font-size: 16px;
    color: #4a5568;
    margin: 0 0 25px;
    line-height: 1.5;
}

.csp-exit-intent-text .highlight {
    color: #dd6b20;
    font-weight: 600;
}

.csp-exit-intent-coupon {
    background: #f7fafc;
    border: 1px dashed #cbd5e0;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.csp-exit-intent-coupon span {
    display: block;
    font-size: 14px;
    color: #718096;
    margin-bottom: 5px;
}

.csp-exit-intent-coupon strong {
    font-size: 24px;
    color: #2b6cb0;
    letter-spacing: 1px;
}

.csp-exit-intent-cta {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.csp-exit-intent-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
	color: #e2e8f0;
}

.csp-exit-intent-footer {
    font-size: 13px;
    color: #718096;
    margin-top: 20px;
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.secure-badge svg {
    width: 14px;
    height: 14px;
    color: #48bb78;
}

.csp-exit-intent-timer {
    margin-bottom: 20px;
}

.timer-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    margin-bottom: 8px;
    overflow: hidden;
}

.timer-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #f56565, #dd6b20);
    animation: timerCountdown 120s linear forwards;
}



.csp-exit-intent-timer span {
    font-size: 14px;
    color: #718096;
}

.csp-exit-intent-timer strong {
    color: #dd6b20;
}

/* Animations */
@keyframes modalEntrance {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes timerCountdown {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .csp-exit-intent-modal {
        padding: 25px 20px;
        margin: 0 15px;
    }
    
    .csp-exit-intent-heading {
        font-size: 22px;
    }
    
    .csp-exit-intent-text {
        font-size: 15px;
    }
    
    .csp-exit-intent-coupon strong {
        font-size: 20px;
    }
    
    .csp-exit-intent-cta {
        padding: 14px;
        font-size: 15px;
    }
}

/* Accessibility focus styles */
.csp-exit-intent-close:focus,
.csp-exit-intent-cta:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Coupon Copied Notice Styles */
.csp-coupon-copied-notice {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    animation: slideIn 0.3s ease-out forwards;
}

.csp-coupon-copied-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    position: relative;
    max-width: 350px;
}

.csp-coupon-copied-content svg {
    width: 24px;
    height: 24px;
    color: #48bb78;
    flex-shrink: 0;
    margin-top: 2px;
}

.csp-coupon-copied-content h4 {
    margin: 0 0 5px 0;
    color: #2d3748;
    font-size: 16px;
}

.csp-coupon-copied-content p {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #4a5568;
}

.csp-coupon-copied-content p strong {
    color: #2b6cb0;
}

.csp-coupon-notice-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
