Shadow demons shadow blend ability.
During any conditions other than bright light, a shadow demon can disappear into the shadows as a move-equivalent action, effectively becoming invisible. Artificial illumination or light spells of 2nd level or lower do not negate this ability.
How long does it last and does attacking break it's invisibility? It doesn't say how long it lasts or if it follows normal invisible rules. It doesn't actually say it is invisible just "effectively invisible". So as move action it disappears into shadow and as long as it remains in shadow it is invisible even if attacking? Because that makes sense. If caught at night with no light versus a shadow demon there is no hope. But I would think that makes it a lot more powerful then CR of 7. But that power is cut due to it's Sunlight Powerlessness. But it works in any light but bright. Which is almost all the time. In almost any building. Just avoid windows and your "effectively invisible". But it is never truly invisible. Just a ball of really dark darkness. Like that corner of the room is really dark for some reason then AH!!! Shadow demon kills you! It's not invisible it's just really dark. But I honestly can't figure out how it works by the rules.
1. As long as it wants, unless bright light from a 3rd level or higher spell is inflicted upon it.
2. No, attacking does not break it. That's a property of the invisibility spell, not of invisibility in general.
It is effectively invisible in that it is indistinguishable from the dim-or-less light into which it is blending. It gets the full benefits of such invisibility.
CR 7 seems fine. It's not terribly powerful, and invisibility can be foiled by all manner of things by the time you're fighting CR 7 creatures.