/* feature:battle-sync-status-menu (Work-ID 20260930-battle-sync-status-menu-7ad9; Trello "batalha", zenux 2026-09-30: "melhore também a
   identificação dos status no personagem, atualmente não dá pra perceber se o personagem está paralisado, confuso, queimando etc").

   The persistent status marks on a battler's sprite (Client/app/battle_status.js): one decorative element per status, laid over the
   sprite's own box, for as long as the battler carries it.
     paralysis  yellow tint flicker, five sparks that blink around it, tag PAR
     burn       red-orange flicker, five flames that rise, tag BRN
     poison     purple pulse, five bubbles that rise, tag PSN (toxic is the same mark)
     sleep      dim blue tint, "Z z Z" drifting up, tag SLP
     freeze     icy tint, an ice block around it and crystals, tag FRZ
     confusion  three stars circling its head, tag CNF (next to the status, on the other side)
   The silhouette tint is the sprite itself used as a mask, so only the Pokémon's pixels are tinted.

   Paint only (AGENTS.md "Absolute UI hover geometry"): every rule here is absolutely positioned, takes no layout space, has
   pointer-events:none and reacts to no pointer or focus state, so nothing it draws can change a control's box. Loaded after
   battle-anim.css and before hover-geometry.css. With the animations off (Settings) or reduced motion the marks stay, still. */

#battle-dialog .battle-stage .battle-status-fx.mark{
 position:absolute;z-index:3;box-sizing:border-box;display:block;pointer-events:none;overflow:visible;
 width:calc(80 * var(--dp,2px));height:calc(80 * var(--dp,2px));margin:0;padding:0;gap:0;
 border:0;background:none;clip-path:none;color:#fff;font:700 10px/1 Arial,sans-serif;text-shadow:none;
 --mk:#f8d030;
}
/* where the sprite stands (the HG/SS scene: Client/app/styles.css .battle-stage.hgss .battle-sprite.*) */
#battle-dialog .battle-stage.hgss .battle-status-fx.mark.enemy{left:calc(50% + 8 * var(--dp,2px));bottom:calc(60 * var(--dp,2px));right:auto;top:auto}
#battle-dialog .battle-stage.hgss .battle-status-fx.mark.you{left:calc(50% - 88 * var(--dp,2px));bottom:calc(8 * var(--dp,2px));right:auto;top:auto}
#battle-dialog .battle-stage:not(.hgss) .battle-status-fx.mark.enemy{right:14%;top:6%;left:auto;bottom:auto;width:26%;height:36%}
#battle-dialog .battle-stage:not(.hgss) .battle-status-fx.mark.you{left:20%;bottom:6%;right:auto;top:auto;width:30%;height:40%}
#battle-dialog .battle-stage .battle-status-fx.mark.mark-held{visibility:hidden}

/* the tinted silhouette */
#battle-dialog .battle-stage .battle-status-fx.mark::before{
 content:"";position:absolute;inset:0;background:var(--mk);opacity:.34;
 -webkit-mask:var(--mark-sprite,none) center / contain no-repeat;mask:var(--mark-sprite,none) center / contain no-repeat;
 image-rendering:pixelated;animation:mark-tint 1.3s steps(6,end) infinite;
}
#battle-dialog .battle-stage .battle-status-fx.mark.mirrored::before{transform:scaleX(-1)}
#battle-dialog .battle-stage .battle-status-fx.mark:not([style*="--mark-sprite"])::before{display:none}
/* the tag that names it */
#battle-dialog .battle-stage .battle-status-fx.mark .mark-tag{
 position:absolute;bottom:0;left:0;padding:1px 5px;border:1px solid rgba(20,27,43,.85);border-radius:3px;
 background:var(--mk);color:#1a2338;font:700 10px/12px Arial,sans-serif;letter-spacing:.04em;white-space:nowrap;
}
#battle-dialog .battle-stage .battle-status-fx.mark.confusion .mark-tag{left:auto;right:0}
#battle-dialog .battle-stage .battle-status-fx.mark i{position:absolute;display:block;pointer-events:none}

/* paralysis: sparks */
#battle-dialog .battle-stage .battle-status-fx.mark.paralysis{--mk:#f8d030}
#battle-dialog .battle-stage .battle-status-fx.mark.paralysis::before{animation:mark-flicker .9s steps(1,end) infinite}
#battle-dialog .battle-stage .battle-status-fx.mark.paralysis i{
 width:calc(7 * var(--dp,2px));height:calc(13 * var(--dp,2px));background:#fff36b;filter:drop-shadow(0 0 3px #f8d030);
 clip-path:polygon(55% 0,0 58%,42% 58%,30% 100%,100% 38%,58% 38%);animation:mark-blink .7s steps(1,end) infinite;animation-delay:calc(var(--i) * -.23s)
}
#battle-dialog .battle-stage .battle-status-fx.mark.paralysis i:nth-of-type(1){left:6%;top:14%}
#battle-dialog .battle-stage .battle-status-fx.mark.paralysis i:nth-of-type(2){right:8%;top:22%}
#battle-dialog .battle-stage .battle-status-fx.mark.paralysis i:nth-of-type(3){left:30%;top:2%}
#battle-dialog .battle-stage .battle-status-fx.mark.paralysis i:nth-of-type(4){left:12%;top:52%}
#battle-dialog .battle-stage .battle-status-fx.mark.paralysis i:nth-of-type(5){right:14%;top:56%}

/* burn: flames */
#battle-dialog .battle-stage .battle-status-fx.mark.burn{--mk:#ff6a3a}
#battle-dialog .battle-stage .battle-status-fx.mark.burn::before{animation:mark-flicker .7s steps(1,end) infinite;opacity:.3}
#battle-dialog .battle-stage .battle-status-fx.mark.burn i{
 width:calc(8 * var(--dp,2px));height:calc(12 * var(--dp,2px));border-radius:50% 50% 50% 50% / 62% 62% 38% 38%;
 background:linear-gradient(#ffe36b,#ff9a3a 55%,#c7574d);animation:mark-rise 1.1s steps(8,end) infinite;animation-delay:calc(var(--i) * -.22s)
}
#battle-dialog .battle-stage .battle-status-fx.mark.burn i:nth-of-type(1){left:14%;bottom:30%}
#battle-dialog .battle-stage .battle-status-fx.mark.burn i:nth-of-type(2){left:34%;bottom:20%}
#battle-dialog .battle-stage .battle-status-fx.mark.burn i:nth-of-type(3){left:54%;bottom:26%}
#battle-dialog .battle-stage .battle-status-fx.mark.burn i:nth-of-type(4){left:72%;bottom:34%}
#battle-dialog .battle-stage .battle-status-fx.mark.burn i:nth-of-type(5){left:44%;bottom:40%}

/* poison: bubbles */
#battle-dialog .battle-stage .battle-status-fx.mark.poison{--mk:#b04cd8}
#battle-dialog .battle-stage .battle-status-fx.mark.poison::before{animation:mark-tint 1.6s steps(8,end) infinite;opacity:.36}
#battle-dialog .battle-stage .battle-status-fx.mark.poison i{
 width:calc(7 * var(--dp,2px));height:calc(7 * var(--dp,2px));border-radius:50%;border:2px solid #d9a0ff;
 background:rgba(176,76,216,.45);animation:mark-rise 1.6s steps(10,end) infinite;animation-delay:calc(var(--i) * -.32s)
}
#battle-dialog .battle-stage .battle-status-fx.mark.poison i:nth-of-type(1){left:16%;bottom:24%}
#battle-dialog .battle-stage .battle-status-fx.mark.poison i:nth-of-type(2){left:38%;bottom:36%}
#battle-dialog .battle-stage .battle-status-fx.mark.poison i:nth-of-type(3){left:58%;bottom:22%}
#battle-dialog .battle-stage .battle-status-fx.mark.poison i:nth-of-type(4){left:74%;bottom:40%}
#battle-dialog .battle-stage .battle-status-fx.mark.poison i:nth-of-type(5){left:48%;bottom:12%}

/* sleep: Z z Z (the letters are spans; Client/app/styles.css status-zzz drifts them) */
#battle-dialog .battle-stage .battle-status-fx.mark.sleep{--mk:#6d86e8}
#battle-dialog .battle-stage .battle-status-fx.mark.sleep::before{opacity:.42;animation:mark-tint 2.4s steps(8,end) infinite}
#battle-dialog .battle-stage .battle-status-fx.mark.sleep span{
 position:absolute;left:62%;top:10%;color:#e8eeff;font:900 calc(9 * var(--dp,2px))/1 Arial,sans-serif;
 -webkit-text-stroke:2px #2e3a56;paint-order:stroke fill;animation:mark-zzz 2.4s steps(8,end) infinite
}
#battle-dialog .battle-stage .battle-status-fx.mark.sleep span:nth-child(2){animation-delay:.8s;font-size:calc(11 * var(--dp,2px));left:70%}
#battle-dialog .battle-stage .battle-status-fx.mark.sleep span:nth-child(3){animation-delay:1.6s;font-size:calc(13 * var(--dp,2px));left:78%}

/* freeze: an ice block and crystals */
#battle-dialog .battle-stage .battle-status-fx.mark.freeze{--mk:#7fd4f0}
#battle-dialog .battle-stage .battle-status-fx.mark.freeze::before{opacity:.5;animation:mark-tint 2s steps(6,end) infinite}
#battle-dialog .battle-stage .battle-status-fx.mark.freeze::after{
 content:"";position:absolute;inset:6% 10%;border:2px solid rgba(235,250,255,.85);background:rgba(152,216,216,.22);
 clip-path:polygon(14% 0,86% 0,100% 22%,100% 86%,82% 100%,10% 100%,0 76%,0 14%);box-shadow:inset 0 0 12px rgba(255,255,255,.5)
}
#battle-dialog .battle-stage .battle-status-fx.mark.freeze i{
 width:calc(6 * var(--dp,2px));height:calc(14 * var(--dp,2px));background:linear-gradient(#ffffff,#9ee4ff);
 clip-path:polygon(50% 0,100% 100%,0 100%);animation:mark-blink 1.6s steps(1,end) infinite;animation-delay:calc(var(--i) * -.4s)
}
#battle-dialog .battle-stage .battle-status-fx.mark.freeze i:nth-of-type(1){left:2%;bottom:18%}
#battle-dialog .battle-stage .battle-status-fx.mark.freeze i:nth-of-type(2){right:2%;bottom:30%;transform:rotate(14deg)}
#battle-dialog .battle-stage .battle-status-fx.mark.freeze i:nth-of-type(3){left:26%;top:-2%;transform:rotate(-12deg)}
#battle-dialog .battle-stage .battle-status-fx.mark.freeze i:nth-of-type(4){right:24%;top:0;transform:rotate(10deg)}

/* confusion: stars circling the head */
#battle-dialog .battle-stage .battle-status-fx.mark.confusion{--mk:#ffd84d}
#battle-dialog .battle-stage .battle-status-fx.mark.confusion::before{display:none}
#battle-dialog .battle-stage .battle-status-fx.mark.confusion i{
 left:calc(50% - 5 * var(--dp,2px));top:calc(6 * var(--dp,2px));width:calc(10 * var(--dp,2px));height:calc(10 * var(--dp,2px));background:#ffe066;
 filter:drop-shadow(0 0 2px #b8860b);
 clip-path:polygon(50% 0,62% 36%,98% 38%,69% 60%,80% 96%,50% 74%,20% 96%,31% 60%,2% 38%,38% 36%);
 animation:mark-orbit 1.8s linear infinite;animation-delay:calc(var(--i) * -.6s)
}

/* a status tick ("X is paralyzed! It can't move!", burn or poison damage): the mark flares for a moment */
#battle-dialog .battle-stage .battle-status-fx.mark.tick{filter:brightness(1.5) saturate(1.4);animation:mark-tick .9s steps(6,end)}
#battle-dialog .battle-stage .battle-status-fx.mark.tick::before{opacity:.8}

@keyframes mark-tint{0%,100%{opacity:.26}50%{opacity:.5}}
@keyframes mark-flicker{0%{opacity:.5}25%{opacity:.12}50%{opacity:.45}75%{opacity:.2}100%{opacity:.5}}
@keyframes mark-blink{0%{opacity:1}55%{opacity:0}100%{opacity:1}}
@keyframes mark-rise{0%{transform:translateY(0) scale(1);opacity:1}100%{transform:translateY(calc(-26 * var(--dp,2px))) scale(.6);opacity:0}}
@keyframes mark-zzz{0%{transform:translate(0,0) scale(.7);opacity:0}25%{opacity:1}100%{transform:translate(calc(6 * var(--dp,2px)),calc(-18 * var(--dp,2px))) scale(1.15);opacity:0}}
@keyframes mark-orbit{
 from{transform:rotate(0turn) translateX(calc(24 * var(--dp,2px))) rotate(0turn) scaleY(.45)}
 to{transform:rotate(1turn) translateX(calc(24 * var(--dp,2px))) rotate(-1turn) scaleY(.45)}
}
@keyframes mark-tick{0%{transform:scale(1)}30%{transform:scale(1.06)}60%{transform:scale(.98)}100%{transform:scale(1)}}

/* The sleeping sprite and the paralysed one move a little (individual transform properties, so the idle bob and the
   mirrored back sprite keep their own transform). The twitch is a short rotation every couple of seconds. */
#battle-dialog.battle-window-solid .battle-stage.idle .battle-sprite.you.st-paralysis:not(.fainted-out){
 animation:battle-responsive-bob 1.2s steps(2,end) infinite,mark-twitch 2.6s steps(1,end) infinite!important
}
#battle-dialog.battle-window-solid .battle-stage.idle .battle-sprite.enemy.st-paralysis:not(.fainted-out){
 animation:battle-responsive-breathe 3s ease-in-out infinite,mark-twitch 2.6s steps(1,end) infinite!important
}
@keyframes mark-twitch{0%,82%,100%{rotate:0deg}84%{rotate:-4deg}88%{rotate:4deg}92%{rotate:-3deg}96%{rotate:2deg}}

/* animations off / reduced motion: the marks stay, perfectly still */
html.battle-anim-off #battle-dialog .battle-stage .battle-status-fx.mark,
html.battle-anim-off #battle-dialog .battle-stage .battle-status-fx.mark *,
html.battle-anim-off #battle-dialog .battle-stage .battle-status-fx.mark::before{animation:none!important}
html.battle-anim-off #battle-dialog .battle-stage .battle-status-fx.mark.sleep span{opacity:.95}
@media(prefers-reduced-motion:reduce){
 #battle-dialog .battle-stage .battle-status-fx.mark,
 #battle-dialog .battle-stage .battle-status-fx.mark *,
 #battle-dialog .battle-stage .battle-status-fx.mark::before{animation:none!important}
 #battle-dialog .battle-stage .battle-status-fx.mark.sleep span{opacity:.95}
}
/* phones: the same sprite box, smaller particles */
body.mobile-web #battle-dialog .battle-stage .battle-status-fx.mark .mark-tag{font-size:9px;line-height:10px;padding:0 3px}
#battle-dialog .battle-stage.trainer-outro .battle-status-fx.mark.enemy{visibility:hidden}
