/* AgentWorld HUD — overlays on top of Bevy canvas */

#hud-root {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  color: #c0c0d8;
  z-index: 10;
}

/* Panel containers positioned at edges */
.hud-left {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 100%;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

.hud-right {
  position: absolute;
  top: 0;
  right: 0;
  width: 260px;
  height: 100%;
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}

.hud-bottom {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  max-height: 220px;
  pointer-events: auto;
}

/* Shared panel style */
.panel {
  background: rgba(12, 12, 26, 0.90);
  border: 1px solid rgba(80, 80, 140, 0.3);
}

.panel-title {
  font-size: 11px;
  font-weight: 600;
  color: #8888cc;
  letter-spacing: 1.5px;
  padding: 10px 12px 6px;
  border-bottom: 1px solid rgba(80, 80, 140, 0.15);
}

.empty-state {
  padding: 12px;
  color: #555570;
  font-style: italic;
  font-size: 11px;
}

/* Status bar */
.status-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(12, 12, 26, 0.92);
  border-bottom: 1px solid rgba(80, 80, 140, 0.2);
}

.status-dot-bar {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-text {
  font-size: 10px;
  color: #8888aa;
}

/* Roster */
.roster {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.roster-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.roster-list::-webkit-scrollbar {
  width: 4px;
}

.roster-list::-webkit-scrollbar-thumb {
  background: rgba(100, 100, 160, 0.3);
  border-radius: 2px;
}

.team-group {
  margin-bottom: 4px;
}

.team-header {
  font-size: 9px;
  color: #5577cc;
  padding: 4px 12px 2px;
  letter-spacing: 1px;
}

.roster-entry {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 4px 12px;
  border: none;
  background: transparent;
  color: #c0c0d8;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  text-align: left;
}

.roster-entry:hover {
  background: rgba(60, 60, 120, 0.3);
}

.roster-entry.selected {
  background: rgba(50, 50, 100, 0.5);
  border-left: 2px solid #6688ee;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.agent-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agent-role {
  font-size: 9px;
  color: #666680;
  flex-shrink: 0;
}

/* Event Log */
.event-log {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.event-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.event-list::-webkit-scrollbar {
  width: 4px;
}

.event-list::-webkit-scrollbar-thumb {
  background: rgba(100, 100, 160, 0.3);
  border-radius: 2px;
}

.event-entry {
  padding: 2px 12px;
  font-size: 10px;
  line-height: 1.5;
  display: flex;
  gap: 6px;
}

.event-time {
  color: #444460;
  flex-shrink: 0;
  font-size: 9px;
}

.event-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Inspector */
.inspector {
  padding: 10px 14px;
  border-radius: 4px;
}

.inspector-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(80, 80, 140, 0.2);
}

.inspector-name {
  font-size: 14px;
  font-weight: 600;
  color: #d0d0ee;
}

.inspector-role {
  font-size: 10px;
  color: #6666aa;
  flex: 1;
}

.inspector-close {
  background: none;
  border: none;
  color: #666680;
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  font-family: inherit;
}

.inspector-close:hover {
  color: #aaa;
}

.inspector-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  font-size: 11px;
}

.inspector-label {
  color: #6666aa;
  flex-shrink: 0;
  margin-right: 12px;
}

.inspector-thought {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(80, 80, 140, 0.15);
}

.thought-text {
  margin-top: 4px;
  font-size: 11px;
  color: #9090c0;
  line-height: 1.4;
  max-height: 60px;
  overflow-y: auto;
  word-wrap: break-word;
}

/* Inventory */
.inspector-inventory {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(80, 80, 140, 0.15);
}

.inventory-grid {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.inventory-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  background: rgba(40, 40, 80, 0.3);
  border-radius: 3px;
  position: relative;
  overflow: hidden;
}

.item-icon {
  font-size: 12px;
  flex-shrink: 0;
}

.item-name {
  font-size: 10px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-quality {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: rgba(100, 200, 100, 0.4);
  border-radius: 0 1px 1px 0;
}
