/* Combat vitals stay on opposite sides, clear of the arena and touch controls. */
.combat-health {
  position: absolute;
  top: max(84px, calc(env(safe-area-inset-top) + 64px));
  width: clamp(215px, 24vw, 340px);
  padding: 14px 16px;
  background: #061510ed;
  border: 1px solid #688c5266;
  border-top: 3px solid var(--lime);
  border-radius: 5px;
  pointer-events: none;
}
.combat-self {
  left: max(18px, env(safe-area-inset-left));
}
.combat-opponent {
  right: max(18px, env(safe-area-inset-right));
  border-top-color: #ff876e;
}
.combat-heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 12px;
}
.combat-heading span {
  font:
    10px Consolas,
    monospace;
  letter-spacing: 1.5px;
  color: var(--muted);
}
.combat-heading strong {
  font-size: 19px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combat-health label {
  display: flex;
  justify-content: space-between;
  margin: 0 0 5px;
  font:
    12px Consolas,
    monospace;
}
.combat-health progress {
  height: 11px;
}
.combat-health small,
.component-status {
  display: block;
  color: var(--muted);
  font:
    10px Consolas,
    monospace;
  margin-top: 9px;
}
#opponentHealth::-webkit-progress-value {
  background: #ff876e;
}
#opponentHealth::-moz-progress-bar {
  background: #ff876e;
}
body .match #trainingBanner {
  top: 60px;
  max-width: 90%;
  white-space: normal;
  text-align: center;
}
body .match .match-bottom .hud-meter {
  width: clamp(140px, 25vw, 260px);
}
body .match .weapon-hud {
  width: auto;
  max-width: 430px;
}
@media (max-width: 700px), (max-height: 500px) {
  .combat-health {
    top: max(80px, calc(env(safe-area-inset-top) + 62px));
    width: calc(50% - 20px);
    max-width: 240px;
    padding: 8px 10px;
  }
  .combat-self {
    left: max(8px, env(safe-area-inset-left));
  }
  .combat-opponent {
    right: max(8px, env(safe-area-inset-right));
  }
  .combat-heading {
    margin-bottom: 6px;
  }
  .combat-heading span {
    font-size: 8px;
    letter-spacing: 0.7px;
  }
  .combat-heading strong {
    font-size: 14px;
  }
  .combat-health label {
    font-size: 10px;
  }
  .combat-health progress {
    height: 8px;
  }
  .combat-health small,
  .component-status {
    font-size: 8px;
    margin-top: 5px;
    line-height: 1.5;
  }
  body .match #trainingBanner {
    top: 50px;
    padding: 4px;
    font-size: 8px;
  }
  body .match .weapon-hud {
    max-width: 52%;
  }
}
@media (max-height: 500px) and (orientation: landscape) {
  .combat-health {
    top: max(58px, env(safe-area-inset-top));
    width: 210px;
  }
  body .match #trainingBanner {
    display: none;
  }
  .combat-heading {
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
  }
  .combat-heading strong {
    font-size: 12px;
  }
}
