/* Exit Intent Popup - CSS */

.eip-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
}

.eip-popup.active {
    display: block !important;
}

.eip-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: eipFadeIn 0.3s;
}

/* Background Styles */
.eip-bg-gradient .eip-overlay {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
}

.eip-bg-solid .eip-overlay {
    background: rgba(0, 0, 0, 0.85);
}

.eip-bg-dark .eip-overlay {
    background: rgba(26, 26, 26, 0.95);
}

.eip-bg-light .eip-overlay {
    background: rgba(255, 255, 255, 0.95);
}

.eip-container {
    background: white;
    border-radius: 24px;
    padding: 50px 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    text-align: center;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    animation: eipSlideUp 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.eip-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: all 0.3s;
    color: #666;
}

.eip-close:hover {
    background: rgba(0, 0, 0, 0.15);
    transform: rotate(90deg) scale(1.1);
}

.eip-icon {
    font-size: 70px;
    margin-bottom: 20px;
    animation: eipBounce 1.5s infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.eip-container h2 {
    font-size: 32px;
    margin: 0 0 15px;
    font-weight: 800;
    line-height: 1.2;
}

.eip-subtitle {
    font-size: 18px;
    color: #666;
    margin: 0 0 30px;
    line-height: 1.5;
}

.eip-error {
    background: #fee;
    color: #c33;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    font-size: 14px;
    border-left: 4px solid #c33;
}

.eip-error.show {
    display: block;
}

#eip-form {
    margin-bottom: 25px;
}

#eip-email {
    width: 100%;
    padding: 18px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 17px;
    margin-bottom: 15px;
    box-sizing: border-box;
    transition: all 0.3s;
    font-family: inherit;
}

#eip-email:focus {
    outline: none;
    border-color: var(--eip-primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

#eip-submit {
    width: 100%;
    padding: 18px;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#eip-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

#eip-submit:active {
    transform: translateY(-1px);
}

#eip-submit:disabled {
    background: #ccc !important;
    cursor: not-allowed;
    transform: none;
}

.eip-privacy {
    font-size: 13px;
    color: #999;
    margin: 0;
}

/* Success View */
.eip-success {
    display: none;
}

.eip-success.active {
    display: block !important;
}

.eip-success-icon {
    font-size: 80px;
    margin-bottom: 25px;
    animation: eipScaleIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.eip-code-box {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 30px;
    border-radius: 16px;
    margin: 25px 0;
    border: 4px dashed var(--eip-primary);
}

.eip-code {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 4px;
    font-family: 'Courier New', monospace;
    margin: 20px 0;
    word-break: break-all;
}

.eip-copy {
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s;
}

.eip-copy:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.eip-email-sent {
    font-size: 14px;
    color: #666;
    margin-top: 20px;
    font-weight: 500;
}

/* Loading Spinner */
.eip-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: eipSpin 0.7s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

/* Animations */
@keyframes eipFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes eipSlideUp {
    0% { 
        transform: translateY(100px) scale(0.8);
        opacity: 0;
    }
    100% { 
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes eipBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes eipScaleIn {
    0% { 
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    100% { 
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

@keyframes eipSpin {
    to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .eip-container {
        padding: 40px 25px;
        width: 95%;
        border-radius: 20px;
    }
    
    .eip-icon {
        font-size: 60px;
    }
    
    .eip-container h2 {
        font-size: 26px;
    }
    
    .eip-subtitle {
        font-size: 16px;
    }
    
    .eip-code {
        font-size: 28px;
        letter-spacing: 2px;
    }
    
    #eip-email {
        font-size: 16px;
        padding: 16px;
    }
    
    #eip-submit {
        font-size: 17px;
        padding: 16px;
    }
}

/* Dark mode background adjustments */
.eip-bg-dark .eip-container {
    background: #2a2a2a;
    color: #fff;
}

.eip-bg-dark .eip-subtitle,
.eip-bg-dark .eip-email-sent {
    color: #bbb;
}

.eip-bg-dark #eip-email {
    background: #1a1a1a;
    border-color: #444;
    color: #fff;
}

.eip-bg-dark .eip-close {
    color: #ccc;
}

/* Light background adjustments */
.eip-bg-light .eip-overlay {
    backdrop-filter: blur(10px);
}

.eip-bg-light .eip-container {
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
}
