/* A fixed console track allows the journal to slide upward without a layout jump. */
#battle-root .spell-panel-battle > .battle-console {
  height:var(--console-height);
  min-height:var(--console-height);
  max-height:none;
  margin-top:0;
  transition:height .28s cubic-bezier(.22,.72,.25,1),margin-top .28s cubic-bezier(.22,.72,.25,1);
}
#battle-root .spell-panel-battle > .battle-console.journal-expanded {
  height:calc(var(--console-height) + var(--journal-growth));
  min-height:calc(var(--console-height) + var(--journal-growth));
  max-height:none;
  margin-top:calc(-1 * var(--journal-growth));
}
#battle-root .spell-panel-battle .combat-action-panel,
#battle-root .spell-panel-battle #battle-actions {
  height:102px;
  min-height:102px;
  max-height:102px;
  transition:height .28s cubic-bezier(.22,.72,.25,1),max-height .28s cubic-bezier(.22,.72,.25,1);
}
#battle-root .spell-panel-battle .battle-console.journal-expanded .combat-action-panel,
#battle-root .spell-panel-battle .battle-console.journal-expanded #battle-actions {
  height:calc(102px + var(--journal-growth));
  min-height:calc(102px + var(--journal-growth));
  max-height:calc(102px + var(--journal-growth));
}
#battle-root .spell-panel-battle .battle-log-content {
  transition:opacity .13s ease;
}
#battle-root .spell-panel-battle .battle-log.log-expanded .battle-log-content {
  transition:opacity .15s ease .07s;
}

/* Single isolated drawings are used for every new hero pose. */
#battle-root .spell-panel-battle .battle-hero-sprite.action-pose {
  top:calc(var(--sprite-top) - var(--sprite-height) * .30);
  left:50%;
  width:calc(var(--sprite-height) * 1.5);
  height:calc(var(--sprite-height) * 1.5);
  margin-left:0;
  aspect-ratio:1;
  background-size:contain;
  background-position:center bottom;
  background-repeat:no-repeat;
  filter:drop-shadow(0 2px 2px #23403334);
}

/* A universal ice enclosure leaves the enemy sprite visible in the middle. */
#battle-root .spell-panel-battle .monster-unit.frozen .monster-sprite::after {
  content:'';
  position:absolute;
  z-index:4;
  inset:-12% -12% -8%;
  width:auto;height:auto;
  -webkit-mask-image:none;
  mask-image:none;
  background:url('art/fx/ice-prison-v0164.png') center/100% 100% no-repeat;
  pointer-events:none;
  animation:valgard-ice-appear .18s ease-out both;
}
@keyframes valgard-ice-appear {from{opacity:0;transform:scale(.77)}to{opacity:.86;transform:scale(1)}}

/* Fade out the rectangular painted borders of older combat effect bitmaps. */
#battle-root .spell-panel-battle .battle-effect .effect-painting {
  -webkit-mask-image:radial-gradient(ellipse 55% 55% at center,#000 32%,#000c 51%,transparent 86%);
  mask-image:radial-gradient(ellipse 55% 55% at center,#000 32%,#000c 51%,transparent 86%);
}

/* Cooldown is a framed burgundy badge, not a tab across the skill icon. */
#battle-root .spell-panel-battle .combat-skill-cooldown.on-cooldown {
  position:absolute;z-index:2;left:50%;bottom:3px;
  width:max-content;max-width:calc(100% - 5px);
  padding:3px 4px;
  transform:translateX(-50%);
  border:1px solid #e8bfc1;
  border-radius:2px 7px 2px 7px;
  background:linear-gradient(135deg,#6c2438,#973e4d);
  box-shadow:0 2px 4px #45202a38,inset 0 1px #ffffff36;
  color:#fff6ee;font:700 9px/1.15 Interface,sans-serif;
  text-align:center;letter-spacing:.02em;
}
@media(prefers-reduced-motion:reduce){
  #battle-root .spell-panel-battle > .battle-console,
  #battle-root .spell-panel-battle .combat-action-panel,
  #battle-root .spell-panel-battle #battle-actions,
  #battle-root .spell-panel-battle .battle-log-content {transition:none;}
  #battle-root .spell-panel-battle .monster-unit.frozen .monster-sprite::after{animation:none;opacity:.86;}
}
