Is a bad bishop a bishop that is trapped by your own pawns? (For example, all your pawns are on dark squares, so the dark squared bishop is bad.) Or is it when your opponent's pawns trap your bishop's mobility? (For example, they control the dark squares which your bishop controls, so the bishop is bad).
What you defined is an "inactive bishop". An inactive bishop can be a bad bishop, but they are technically two different situations.
A "bad bishop" is a bishop that is on the same color as it's own center pawns. An "inactive bishop" is one that is blocked by it's own pawns.
When evaluating a bishop, there are two totally separate things that must be considered. The first is whether a bishop is "good" or "bad". These are very much misnomers because they have nothing to do with the worth of the bishop. The second consideration is whether the bishop is "active" or "inactive". Finally, there may be mitigating factors as well (is the bishop doing something useful?).
Good vs Bad
A good bishop is on the opposite color as its pawns. A bad bishop is on the same color as its pawns. For example if the white pawn structure is c3, d4, e3, f4, then the light squared bishop is the good bishop and the dark squared bishop is the bad bishop.
Active vs Inactive
An active bishop is outside of the friendly pawn chain (in the above example, if the bishop is on e5, then it is clearly both active and bad). An inactive bishop is trapped by pawn chains - either the player's color or the opponent's.
There are two main mitigating factors. The first can be remembered by a common phrase: "bad bishops defend good pawns". This means that a bishop might be very bad (same color as all the friendly pawns) but if it is defending them from attack in the endgame, then it might be enough to hold a draw. Usually it is much harder to win with the bad bishop though.
A "bad" bishop is one that is not performing the normal function of a bishop. That is usually one behind its own pawns. The test is, "if I replaced the bishop with a pawn, would it make any difference?" If the answer is no, then it is a bad bishop.
A Bishop can be behind a wall of pawns and still be very useful. Say there is a bishop on g7 in front of its king on g8, and behind pawns on h6, g5, and f6. As the "linchpin" of the defensive system, the bishop is very useful, even though it has little mobility. (Unless this is a situation where all the action is on the queenside, in which case the bishop would really be "bad.")