// Load intl-tel-input assets
add_action( 'wp_enqueue_scripts', 'freeio_load_phone_input_assets' );
function freeio_load_phone_input_assets() {
    $ver = '17.0.19';

    // CSS
    wp_enqueue_style(
        'intl-tel-input',
        'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/' . $ver . '/css/intlTelInput.css',
        array(),
        $ver
    );

    // Main JS
    wp_enqueue_script(
        'intl-tel-input',
        'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/' . $ver . '/js/intlTelInput.min.js',
        array('jquery'),
        $ver,
        true
    );

    // Utils (for validation & formatting)
    wp_enqueue_script(
        'intl-tel-input-utils',
        'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/' . $ver . '/js/utils.js',
        array(),
        $ver,
        true
    );
}
