How about an IR transmitter/receiver combo?
Good description here:
http://learn.parallax.com/node/299
You could mount the receiver on the bottom of the box, and flood the box with IR (eg. from an Arduino on its side on the wall or at the back). The sketch could check if the IR gets through (in which case the receiver is not covered). Using encoded IR means that ambient light shouldn't affect it.