Delirium is an acute change in cognition that manifests as poor attention and illogical thinking and is associated with longer intensive care unit ( ICU ) and hospital stay , long-lasting cognitive deterioration and increased mortality .