/**
 * Exit Intent Popup Styles
 * Modern, mobile-friendly, high-converting design
 */

/* Popup Container */
#exit-intent-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#exit-intent-popup.active {
    opacity: 1;
    pointer-events: all;
}

/* Overlay */
.exit-intent-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

/* Modal */
.exit-intent-modal {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 540px;
    width: 90%;
    box-shadow: 0 24px 80px rgba(59, 130, 246, 0.4);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close Button */
.exit-intent-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.exit-intent-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Content */
.exit-intent-content {
    text-align: center;
}

.exit-intent-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: bounce 1s ease infinite;
}

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

.exit-intent-title {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px 0;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.exit-intent-subtitle {
    font-size: 18px;
    color: #e5e7eb;
    margin: 0 0 32px 0;
    line-height: 1.5;
}

.exit-intent-subtitle strong {
    color: #3b82f6;
    font-weight: 700;
}

/* Form */
.exit-intent-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.exit-intent-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 16px;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transition: all 0.3s;
    font-family: inherit;
}

.exit-intent-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.exit-intent-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Checkbox */
.exit-intent-checkbox {
    display: flex;
    align-items: flex-start;
    text-align: left;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    cursor: pointer;
    gap: 10px;
}

.exit-intent-checkbox input[type="checkbox"] {
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
}

.exit-intent-checkbox a {
    color: #3b82f6;
    text-decoration: underline;
}

.exit-intent-checkbox a:hover {
    color: #60a5fa;
}

/* Submit Button */
.exit-intent-button {
    width: 100%;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.exit-intent-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.4);
}

.exit-intent-button:active {
    transform: translateY(0);
}

.exit-intent-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Decline Button */
.exit-intent-decline {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: underline;
}

.exit-intent-decline:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* Footer */
.exit-intent-footer {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

/* Success Message */
.exit-intent-success {
    padding: 20px 0;
}

.exit-intent-success-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.exit-intent-success h2 {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 12px 0;
}

.exit-intent-success p {
    font-size: 16px;
    color: #e5e7eb;
    margin: 0 0 8px 0;
    line-height: 1.6;
}

.exit-intent-success .text-sm {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .exit-intent-modal {
        padding: 36px 24px;
        max-width: 95%;
        border-radius: 20px;
    }

    .exit-intent-icon {
        font-size: 48px;
    }

    .exit-intent-title {
        font-size: 28px;
    }

    .exit-intent-subtitle {
        font-size: 16px;
    }

    .exit-intent-button {
        font-size: 16px;
        padding: 14px 24px;
    }

    .exit-intent-close {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 20px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    #exit-intent-popup,
    .exit-intent-overlay,
    .exit-intent-modal,
    .exit-intent-icon,
    .exit-intent-success-icon {
        animation: none !important;
        transition: none !important;
    }
}

/* Dark mode support (already dark, but just in case) */
@media (prefers-color-scheme: light) {
    .exit-intent-modal {
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
        border: 1px solid rgba(59, 130, 246, 0.2);
    }

    .exit-intent-title,
    .exit-intent-subtitle,
    .exit-intent-success h2,
    .exit-intent-success p {
        color: #1a1a2e;
    }

    .exit-intent-input {
        color: #1a1a2e;
        background: rgba(0, 0, 0, 0.05);
        border-color: rgba(59, 130, 246, 0.2);
    }

    .exit-intent-checkbox {
        color: rgba(0, 0, 0, 0.7);
    }

    .exit-intent-close {
        color: #1a1a2e;
    }
}
