jQuery(document).ready(function($) {
    // Initialize Select2 on country field
    $('.country_select').select2({
        width: '100%'
    });
    
    // Add autofocus functionality
    $('.country_select').on('select2:open', function() {
        setTimeout(function() {
            $('.select2-search__field').focus();
        }, 0);
    });
});