Disclaimer: I'm just a learner with a textbook... Do chime in if I get it wrong!
In Danish a subject complement comes after the linking verb, like in English (though the adverb, where present, falls in a different place, as mentioned previously). The complement here is an adjective. Another example:
English: I am waiting because it is (not) quick.
Danish: Jeg venter fordi det (ikke) er hurtigt.
If not too much info, the general structure of a subordinate clause is:
c n a v V N a
c = subordinate conjunction
n = subject
a = clausal adverbial
v = finite verb
V = non-finite verb
N = object/complement/real subject
A = other adverbial
The subordinate clause "... det ikke er lovligt" fits the above:
c = [at] ("that" - often omitted in similar situations to English)
n = det
a = ikke
v = er
V = (n/a)
N = lovligt (subject complement, predicative adjective)
A = (n/a)
Note: my book notes that in colloquial use, "... det er ikke lovligt" can be encountered, as the omitted conjunction "at" can be considered like a colon introducing direct speech. A previous post mentions this. Of course, you can't tell when you're just listening to someone! You'll have to ask Danes/language teachers for their opinions on this...
Only if you use it as a quotation
- Dommeren siger: "Det er ikke lovligt."