/* V1.141 — contextual command receipts keep one grammar while preserving action identity. */
.battle-command-state-receipt[data-outcome="success"][data-command-kind] {
  --command-signature-rgb: 103, 225, 175;
  border-color: rgba(var(--command-signature-rgb), 0.7);
  background:
    linear-gradient(90deg, rgba(var(--command-signature-rgb), 0.26), 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(var(--command-signature-rgb), 0.09),
    0 0 16px rgba(var(--command-signature-rgb), 0.2);
}

.battle-command-state-receipt[data-outcome="success"][data-command-kind="attack"] { --command-signature-rgb: 255, 112, 96; }
.battle-command-state-receipt[data-outcome="success"][data-command-kind="defend"] { --command-signature-rgb: 90, 201, 255; }
.battle-command-state-receipt[data-outcome="success"][data-command-kind="charge"] { --command-signature-rgb: 255, 201, 84; }
.battle-command-state-receipt[data-outcome="success"][data-command-kind="skill"] { --command-signature-rgb: 193, 134, 255; }
.battle-command-state-receipt[data-outcome="success"][data-command-kind="artifact"] { --command-signature-rgb: 88, 231, 201; }
.battle-command-state-receipt[data-outcome="success"][data-command-kind="utility"] { --command-signature-rgb: 128, 218, 138; }
.battle-command-state-receipt[data-outcome="success"][data-command-kind="tactical"] { --command-signature-rgb: 154, 178, 255; }

.battle-command-state-receipt[data-outcome="success"][data-command-kind] > i {
  border-color: rgba(var(--command-signature-rgb), 0.84);
  background: rgba(var(--command-signature-rgb), 0.18);
  box-shadow:
    inset 0 0 7px rgba(var(--command-signature-rgb), 0.18),
    0 0 9px rgba(var(--command-signature-rgb), 0.24);
}

.battle-command-state-receipt[data-outcome="success"][data-command-kind] > i::after {
  border-color: rgb(var(--command-signature-rgb));
  border-width: 0 0 2px 2px;
  filter: brightness(1.28);
}

.battle-command-state-receipt[data-outcome="success"][data-command-kind]::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 2px;
  width: 38%;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(var(--command-signature-rgb), 0.82));
  transform-origin: right center;
  animation: battle-command-signature-confirm 560ms cubic-bezier(0.18, 0.78, 0.24, 1) both;
}

@keyframes battle-command-signature-confirm {
  from { opacity: 0; transform: scaleX(0.08); }
  48% { opacity: 1; }
  to { opacity: 0.58; transform: scaleX(1); }
}

body[data-vfx-quality="low"] .battle-command-state-receipt[data-outcome="success"][data-command-kind]::after {
  animation: none !important;
}

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

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

  .battle-command-state-receipt[data-outcome="success"][data-command-kind]::after {
    background: Highlight;
  }
}
