/* v0.0.79 — czytelny HUD genów oraz komunikaty niezależne od przycisków. */
#battle-view .battle-hud > div.enemy-identity:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

#battle-view .enemy-name-and-gene {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

#battle-view .enemy-name-and-gene > #enemy-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#battle-view .enemy-gene-analysis {
  flex: 0 0 auto;
  min-height: 20px;
  margin: 0;
  padding: 2px 6px;
  font-size: .56rem;
}

#battle-view .battle-center-controls {
  position: absolute;
  z-index: 16;
  left: 50%;
  top: 8px;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(720px, 48vw);
  transform: translateX(-50%);
  pointer-events: none;
}

#battle-view .battle-center-controls .battle-log-v2 {
  position: static;
  width: 100%;
  min-height: 44px;
  max-height: 94px;
  margin: 0;
  padding: 10px 14px;
  transform: none;
  overflow-y: auto;
  line-height: 1.3;
  pointer-events: auto;
}

#battle-view .battle-center-controls .battle-utility {
  position: static;
  display: flex;
  justify-content: center;
  width: auto;
  max-width: none;
  margin: 0;
  transform: none;
  gap: 8px;
  pointer-events: auto;
}

#battle-view .battle-center-controls .battle-utility .catch { min-width: 170px; }
#battle-view .battle-center-controls .battle-utility .secondary {
  width: auto;
  min-width: 116px;
  padding: 8px 14px;
  font-size: .92rem;
}

@media (max-width: 720px) {
  #battle-view .battle-hud > div.enemy-identity:first-child { display: grid; gap: 3px; }
  #battle-view .enemy-name-and-gene { gap: 4px; }
  #battle-view .enemy-gene-analysis { min-height: 18px; padding: 2px 5px; font-size: .5rem; }
  #battle-view .gene-analysis-icon { font-size: .62rem; }

  #battle-view .battle-center-controls {
    top: 80px;
    width: calc(100vw - 14px);
    gap: 7px;
  }
  #battle-view .battle-center-controls .battle-log-v2 {
    min-height: 34px;
    max-height: 70px;
    padding: 7px 9px;
    border-radius: 9px;
    font-size: .62rem;
    line-height: 1.2;
  }
  #battle-view .battle-center-controls .battle-utility { width: 100%; }
  #battle-view .battle-center-controls .battle-utility .action {
    min-height: 40px;
    border-radius: 10px;
    font-size: .68rem;
  }
  #battle-view .battle-center-controls .battle-utility .catch {
    flex: 1 1 auto;
    min-width: 0;
  }
  #battle-view .battle-center-controls .battle-utility .secondary {
    flex: 0 0 108px;
    width: 108px;
    min-width: 108px;
    padding: 8px 9px;
    font-size: .68rem;
  }
  #battle-view .battle-team,
  #battle-view .battle-team-toggle { top: 210px; }
}

@media (max-width: 720px) and (max-height: 620px) {
  #battle-view .battle-center-controls { top: 67px; }
  #battle-view .battle-center-controls .battle-log-v2 { max-height: 58px; }
  #battle-view .battle-center-controls .battle-utility .action { min-height: 36px; }
  #battle-view .battle-team,
  #battle-view .battle-team-toggle { top: 180px; }
}
