/* V1.135 — a compact, server-backed command receipt with honest RTT proof. */
.battle-command-state-receipt {
  position: absolute;
  z-index: 3;
  top: 9px;
  right: 12px;
  max-width: min(46%, 270px);
  min-height: 28px;
  padding: 5px 8px 5px 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  border: 1px solid rgba(123, 241, 184, 0.62);
  border-radius: 999px;
  color: #eafff4;
  background:
    linear-gradient(90deg, rgba(38, 158, 104, 0.28), rgba(4, 22, 20, 0.88) 58%),
    rgba(3, 13, 20, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 14px rgba(84, 229, 160, 0.08),
    0 0 16px rgba(50, 222, 146, 0.18);
  font-style: normal;
  pointer-events: none;
}

.battle-command-state-receipt[hidden] {
  display: none !important;
}

.battle-command-state-receipt > i {
  position: relative;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border: 1px solid rgba(157, 255, 209, 0.76);
  border-radius: 50%;
  background: rgba(66, 221, 147, 0.16);
  box-shadow: inset 0 0 7px rgba(103, 249, 181, 0.16), 0 0 8px rgba(68, 230, 153, 0.18);
}

.battle-command-state-receipt > i::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 7px;
  height: 4px;
  border: solid #b9ffdb;
  border-width: 0 0 2px 2px;
  transform: rotate(-45deg);
}

.battle-command-state-receipt > b {
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.battle-command-state-receipt > small {
  flex: 0 0 auto;
  padding-left: 6px;
  border-left: 1px solid rgba(183, 255, 219, 0.2);
  color: rgba(217, 255, 237, 0.78);
  font-size: 9px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.battle-command-state-receipt-enter {
  animation: battle-command-receipt-enter 540ms cubic-bezier(0.16, 0.82, 0.24, 1) both;
}

.battle-command-state[data-command-receipt="success"]::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0;
  background: linear-gradient(104deg, transparent 18%, rgba(119, 255, 193, 0.1) 45%, transparent 68%);
  transform: translateX(-100%);
  animation: battle-command-receipt-sweep 620ms ease-out both;
  pointer-events: none;
}

@keyframes battle-command-receipt-enter {
  0% { opacity: 0; transform: translateX(9px) scale(0.94); filter: brightness(1.3); }
  44% { opacity: 1; transform: translateX(0) scale(1.035); }
  100% { opacity: 1; transform: none; filter: none; }
}

@keyframes battle-command-receipt-sweep {
  0% { opacity: 0; transform: translateX(-100%); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateX(100%); }
}

@media (max-width: 720px) {
  .battle-command-state-receipt {
    top: 7px;
    right: 8px;
    max-width: 46%;
    min-height: 25px;
    padding-block: 4px;
  }

  .battle-command-state-receipt > b {
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .battle-command-state-receipt-enter,
  .battle-command-state[data-command-receipt="success"]::after {
    animation: none !important;
  }
}

@media (forced-colors: active) {
  .battle-command-state-receipt {
    border: 2px solid Highlight;
    color: CanvasText;
    background: Canvas;
    box-shadow: none;
  }
}
