Recalculate file input size so it never extends beyond container

but aspect ratio is preserved. Note can also remove some other styles