/* V1.137 — error and game-blocked receipts share the same calm command language. */
.battle-command-state[data-command-receipt] .battle-command-state-readiness {
  opacity: 0;
}

.battle-command-state-receipt[data-outcome="error"] {
  border-color: rgba(255, 128, 117, 0.72);
  color: #fff0ed;
  background:
    linear-gradient(90deg, rgba(190, 58, 49, 0.3), rgba(31, 8, 13, 0.9) 58%),
    rgba(17, 4, 9, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 14px rgba(255, 89, 76, 0.08),
    0 0 16px rgba(242, 72, 62, 0.18);
}

.battle-command-state-receipt[data-outcome="blocked"] {
  border-color: rgba(255, 203, 104, 0.72);
  color: #fff5d8;
  background:
    linear-gradient(90deg, rgba(184, 118, 24, 0.32), rgba(31, 21, 6, 0.9) 58%),
    rgba(17, 12, 3, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0 14px rgba(255, 194, 75, 0.08),
    0 0 16px rgba(238, 165, 45, 0.16);
}

.battle-command-state-receipt[data-outcome="error"] > i {
  border-color: rgba(255, 162, 152, 0.78);
  background: rgba(236, 69, 60, 0.18);
  box-shadow: inset 0 0 7px rgba(255, 112, 101, 0.16), 0 0 8px rgba(238, 76, 64, 0.18);
}

.battle-command-state-receipt[data-outcome="blocked"] > i {
  border-color: rgba(255, 218, 139, 0.82);
  background: rgba(230, 157, 43, 0.18);
  box-shadow: inset 0 0 7px rgba(255, 198, 91, 0.16), 0 0 8px rgba(231, 161, 49, 0.18);
}

.battle-command-state-receipt[data-outcome="error"] > i::after,
.battle-command-state-receipt[data-outcome="blocked"] > i::after {
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  border: 0;
  color: currentColor;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.battle-command-state-receipt[data-outcome="error"] > i::after {
  content: "×";
  color: #ffd4cf;
}

.battle-command-state-receipt[data-outcome="blocked"] > i::after {
  content: "!";
  color: #ffe5a8;
}

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

.battle-command-state[data-command-receipt="error"] { --command-response-rgb: 255, 105, 92; }
.battle-command-state[data-command-receipt="blocked"] { --command-response-rgb: 255, 193, 80; }

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

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

@media (forced-colors: active) {
  .battle-command-state-receipt[data-outcome="error"],
  .battle-command-state-receipt[data-outcome="blocked"] {
    border: 2px solid Highlight;
    color: CanvasText;
    background: Canvas;
    box-shadow: none;
  }
}
