A character or creature that is caught unawares or otherwise unprepared is considered to be flat-footed. A flat-footed character loses his dexterity, dodge, and tumble bonuses (but not the penalty for a negative dexterity modifier) to armor class (AC) and cannot make attacks of opportunity, cannot make a defensive roll, and cannot deflect arrows. Furthermore, flat-footed characters are candidates for a sneak attack or death attack. The uncanny dodge and defensive awareness feats allow retention of the dexterity AC bonus when flat-footed, but dodge and tumble bonuses are still lost (as is the ability to make attacks of opportunity, etc.).
A character will be considered flat-footed if attacked by an unseen creature, unless the attacker is heard and the character has the blind fight feat. Being unseen can be the result of blindness, darkness, invisibility, stealth, or (for NPC perceivers) coming around a corner without time for the perception event to fire (a window of at most four seconds). In other circumstances, a character is flat-footed when doing none of the following: attacking (melee or ranged), moving, or casting a spell, feat, or special ability.
In particular, the following conditions preclude those three activities, so effectively cause one to be flat-footed: entangled, stunned, paralyzed, petrified, prone, and sleeping. Furthermore, an empty action queue can cause a character to become flat-footed as soon as they finish moving or casting a spell; after an attack, doing nothing does not cause a character to become flat-footed until a few seconds have passed (indicated visually by equipped weapons returning to their default pose, such as resting on a shoulder for two-handed weapons).
For various reasons, some players think of the AC bonus due to monk levels and the monk AC bonus (due to wisdom) as being similar in some ways to dodge and dexterity bonuses to AC. However, this association is misleading with respect to the flat-footed condition, as neither source of monk AC is lost while flat-footed.