it is very difficult to predict the time needed thru immigration
If I have 1pm flight at Seattle, I would NOT stay in Vancouver the night before, especially in July.
BTW, we have driven this route over 5 times and the time thru immigration, shortest wait was an hour, longest was ... over 3 hours.
Dont forget you need to factor in the actual driving time too.