/* Test-room controls, lobby state and combatant variants. */
/* Isolated normal-room test controls. */
.test-room-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: rgba(9,15,25,.34); }
.test-room-copy { min-width: 0; display: grid; gap: 2px; }
.test-room-copy .eyebrow { margin: 0; }
.test-room-copy strong { font-size: 13px; }
.test-room-state { color: var(--muted); font-size: 10px; }
.test-room-state.active { color: var(--warn); }
.test-room-state.error { color: var(--bad); }
.test-room-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.test-room-button { border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; color: var(--text); background: var(--panel-2); cursor: pointer; font-size: 11px; font-weight: 750; }
.test-room-button:hover:not(:disabled) { border-color: var(--accent); background: rgba(105,213,255,.08); }
.test-room-button.challenge { border-color: rgba(255,199,106,.36); }
.test-room-button.free { border-color: rgba(92,227,164,.34); }
.test-room-button.leave { border-color: rgba(255,113,113,.42); color: #ffb1b1; }
.test-room-button.leave:hover:not(:disabled) { border-color: var(--bad); background: rgba(255,113,113,.08); }
.test-room-button[hidden] { display: none; }
.test-room-button:disabled { opacity: .46; cursor: not-allowed; }
.test-room-feedback { grid-column: 1 / -1; min-height: 0; color: var(--muted); font-size: 10px; }
.test-room-feedback:empty { display: none; }
.test-room-feedback.pending { color: var(--warn); }
.test-room-feedback.success { color: var(--good); }
.test-room-feedback.error { color: var(--bad); }
@media (max-width: 720px) {
  .test-room-toolbar { grid-template-columns: 1fr; }
  .test-room-actions { justify-content: flex-start; }
}

/* Test-room lobby details. */
.test-room-lobby { grid-column: 1 / -1; display: grid; gap: 8px; padding-top: 2px; }
.test-room-lobby[hidden] { display: none; }
.test-room-lobby-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.test-room-lobby-head strong { color: var(--text); font-size: 13px; }
.test-room-ready-summary.ready { color: var(--good); }
.test-room-ready-summary.waiting { color: var(--warn); }
.test-room-members { display: grid; gap: 6px; }
.test-room-member { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 34px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: rgba(9,15,25,.34); }
.test-room-member.self { border-color: rgba(105,213,255,.32); }
.test-room-member.ready { background: rgba(92,227,164,.05); }
.test-room-member-slot { color: var(--muted); font-size: 10px; }
.test-room-member-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.test-room-member-status { justify-self: end; border: 1px solid var(--line); border-radius: 999px; padding: 3px 7px; color: var(--muted); font-size: 9px; font-weight: 750; }
.test-room-member-status.host { color: var(--accent); border-color: rgba(105,213,255,.34); }
.test-room-member-status.ready { color: var(--good); border-color: rgba(92,227,164,.34); }
.test-room-member-status.waiting { color: var(--warn); border-color: rgba(255,199,106,.34); }
@media (max-width: 560px) {
  .test-room-lobby-head { align-items: flex-start; flex-direction: column; gap: 3px; }
  .test-room-member { grid-template-columns: 58px minmax(0, 1fr); }
  .test-room-member-status { grid-column: 2; justify-self: start; }
}

/* Distinct non-local combatants: never render PvP opponents as World Boss. */
.battle-map-combatants { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.battle-map-marker.enemy .battle-map-dot { width: 16px; height: 16px; background: var(--warn); box-shadow: 0 0 16px rgba(255,199,106,.72); }
.battle-map-marker.ally .battle-map-dot { width: 15px; height: 15px; background: var(--accent); box-shadow: 0 0 15px rgba(105,213,255,.68); }
.legend-dot.enemy { background: var(--warn); }
.legend-dot.ally { background: var(--accent); }
.battle-map-marker.enemy.turn-active { color: var(--warn); }
.battle-map-marker.ally.turn-active { color: var(--accent); }

/* Dead entities remain at their last server position as a muted hollow dot. */
.battle-map-marker.dead { opacity: .52; filter: grayscale(.85); }
.battle-map-marker.dead .battle-map-dot,
.battle-map-marker.boss.dead .battle-map-dot,
.battle-map-marker.enemy.dead .battle-map-dot,
.battle-map-marker.ally.dead .battle-map-dot {
  width: 14px;
  height: 14px;
  background: rgba(176, 185, 198, .2);
  border-color: rgba(214, 220, 230, .72);
  box-shadow: none;
}
.battle-map-marker.dead .battle-map-symbol::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 23px;
  height: 23px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(214, 220, 230, .42);
  border-radius: 50%;
}
.battle-map-marker.dead .battle-map-arrow { opacity: 0; }
.battle-map-marker.dead .battle-map-label {
  color: var(--muted);
  border-style: dashed;
  background: rgba(7, 13, 23, .72);
}
.legend-dot.dead {
  background: rgba(176, 185, 198, .18);
  border: 1px solid rgba(214, 220, 230, .72);
}
