// Function to handle loginBtn click
document.getElementById('loginBtn').addEventListener('click', function() {
    var popupLogin = document.getElementById('popupLogin');
    popupLogin.style.display = 'flex';
    document.body.style.overflow = 'hidden'; // Disable scroll
});

// Function to handle popupMainInsideWrapperBoxTopBtn click
document.addEventListener('click', function(event) {
    var clickedElement = event.target;
    var popupMainInsideWrapperBoxTopBtn = document.querySelector('.popupMainInsideWrapperBoxTopBtn');

    // Check if the clicked element or its parent elements match the target
    if (popupMainInsideWrapperBoxTopBtn.contains(clickedElement)) {
        var popupLogin = document.getElementById('popupLogin');
        popupLogin.style.display = 'none';
        document.body.style.overflow = ''; // Re-enable scroll
    }
});
