Added dynamic sizing for preview input