/* The log's Show button for a hand I saw */
.EventLog .showHands {
  margin-left: 6px;
  padding: 2px 10px;
  font-size: 14px;
}

.EventLog {
  position: relative;
  z-index: 1; /* its shadow over the map */
  grid-area: log;
  width: 450px;
  background: black;
  overflow-y: auto;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
  color: white;
  font-size: 14px;
}

.EventLog .Event {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2px;
  margin: 10px;
  margin-bottom: 0px;
  backdrop-filter: blur(5px);
  border-left: 3px solid #667eea;
  transition: all 0.2s ease;
}

.EventLog .Event .CharacterIcon {
  height: 50px;
  width: 50px;
  vertical-align: top;
}

.EventLog .Event:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(-3px);
}

.EventLog .EventTime {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
  margin-bottom: 6px;
}

.EventLog .text {
  display: inline-block;
  vertical-align: top;
  padding: 10px;

}

.EventLog .nickname {
  color: #9370db;
  font-weight: bold;
  margin-right: 4px;
}

.EventLog .Event div {
  display: inline-block;
}

/* Attacker, red attack badge, ✕, blue defense badge (empty when not defended), defender */
.EventLog .Event .ResolvedAttack {
  padding: 6px 10px;
}

.EventLog .ResolvedAttack .attackRow {
  display: flex;
  align-items: center;
  gap: 8px;
}

.EventLog .ResolvedAttack .badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  font-size: 20px;
  font-weight: bold;
}

.EventLog .ResolvedAttack .badge.attack {
  background: #b3261e;
}

.EventLog .ResolvedAttack .badge.defense {
  background: #1f5fbf;
}

.EventLog .ResolvedAttack .badge.empty {
  background: rgba(255, 255, 255, 0.05);
}

.EventLog .ResolvedAttack .versus {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
}

/* Each player's roll side by side, wrapping: their nickname, then the movement die's face */
.EventLog .StartedNewTurn .playerRolls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 6px;
}

.EventLog .StartedNewTurn .playerRoll {
  display: flex;
  align-items: center;
  gap: 8px;
}

.EventLog .StartedNewTurn .MovementDie {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.EventLog .StartedNewTurn .MovementDie .amount {
  font-size: 15px;
}

.EventLog .StartedNewTurn .MovementDie .allLabel {
  margin-top: 1px;
  font-size: 8px;
}

.EventLog .StartedNewTurn .roll {
  position: relative;
  margin-right: 4px;
}

.EventLog .StartedNewTurn .movementRoll {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.7);
  font-weight: bold;
}

/* Nickname on the left; roster, then the alliance button, pushed to the right */
.PlayerStatus {
  display: flex;
  align-items: center;
  margin:5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.PlayerStatus .status-bubble {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 4px;
  border: 2px solid rgba(0,0,0,0.15);
  background: #dc3545; /* default red */
  transition: background 0.2s;
  vertical-align: middle;
}
.PlayerStatus .status-bubble.active {
  background: #28a745;
}
.PlayerStatus .status-bubble.inactive {
  background: #dc3545;
}
.PlayerStatus .status-bubble.takingTurn {
  background: #1f5fbf;
}

.PlayerStatus .nickname {
  display:inline-block;
  margin-right: auto; /* pushes the roster and the alliance button right, even with no roster yet */
  padding: 17px 10px;
}

/* Same size for every label, one word per line: the word spacing is wider than the button, so each space wraps */
.PlayerStatus .alliance {
  flex: 0 0 auto;
  margin: 0 5px 0 0;
  width: 80px;
  height: 40px;
  padding: 0 4px;
  border-radius: 12px;
  white-space: normal;
  word-spacing: 80px;
  font-size: 12px;
  line-height: 1.2;
}

/* Locked alliances: same footprint as the button */
.PlayerStatus .allianceBadge {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 40px;
  margin: 0 5px 0 0;
  border-radius: 12px;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

.PlayerStatus .allianceBadge.ally {
  background: #28a745;
}

.PlayerStatus .allianceBadge.enemy {
  background: #dc3545;
}

.PlayerStatus .alliance.invited {
  background: #28a745;
  color: white;
}

.PlayerStatus .alliance.allied {
  background: #1f5fbf;
  color: white;
}
