   }
            })
            .then(response => response.json())
            .then(data => {
                if (data.success) {
                    // Show success state briefly
                    button.querySelector('span').textContent = 'Updated!';
                    icon.classList.remove('fa-spin', 'fa-sync-alt');
                    icon.classList.add('fa-check');

                    // Reload the page after a short delay
                    setTimeout(() => {
                        window.locat