/* Exit Intent Popup - Frontend Styles */

.bei-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.bei-overlay.bei-show {
    opacity: 1;
}

.bei-popup {
    background: white;
    border-radius: 8px;
    max-width: 440px;
    width: 90%;
    padding: 48px 40px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

.bei-close-popup {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #000;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    opacity: 0.5;
}

.bei-close-popup:hover {
    opacity: 1;
}

.bei-popup-title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin: 0 0 8px 0;
    color: #000;
    line-height: 1.3;
}

.bei-popup-subtitle {
    font-size: 15px;
    text-align: center;
    color: #666;
    margin: 0 0 28px 0;
}

.bei-popup-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.bei-popup-benefits li {
    padding: 10px 0;
    font-size: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bei-popup-benefits li::before {
    content: "✓";
    font-weight: 600;
    color: #000;
}

.bei-popup-form {
    margin-top: 0;
}

.bei-popup-form input[type="email"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    margin-bottom: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background: #fff;
}

.bei-popup-form input[type="email"]:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.bei-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.bei-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    cursor: pointer;
    accent-color: #000;
}

.bei-submit-btn {
    width: 100%;
    padding: 14px 16px;
    background: #000;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.bei-submit-btn:hover {
    background: #222;
}

.bei-submit-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

.bei-form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

.bei-form-message.bei-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bei-form-message.bei-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.bei-popup-note {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin: 16px 0 0 0;
}

.bei-popup-note a {
    color: #666;
    text-decoration: underline;
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    .bei-overlay {
        align-items: flex-end;
    }

    .bei-popup {
        max-width: 100%;
        width: 100%;
        border-radius: 12px 12px 0 0;
        padding: 32px 24px;
        margin: 0;
        transform: translateY(100%);
    }

    .bei-overlay.bei-show .bei-popup {
        transform: translateY(0);
    }

    .bei-popup-title {
        font-size: 20px;
    }

    .bei-popup-subtitle {
        font-size: 14px;
    }

    .bei-popup-benefits li {
        font-size: 14px;
    }

    .bei-popup-form input[type="email"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Animation */
@keyframes bei-slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

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