/**
 * Character grid/residents panel styles
 */

#character-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: rgba(20, 20, 35, 0.95);
  border-right: 1px solid #333;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  pointer-events: auto;
  transition: left 0.3s ease;
}

#character-grid.collapsed {
  left: -220px;
}

#character-grid .header {
  padding: 16px;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#character-grid .header .title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}

#character-grid .header .count {
  font-size: 12px;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

#character-grid .search {
  padding: 12px;
  border-bottom: 1px solid #333;
}

#character-grid .search input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #333;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
}

#character-grid .search input::placeholder {
  color: #666;
}

#character-grid .search input:focus {
  outline: none;
  border-color: #4ade80;
}

#character-grid .characters {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

#character-grid .character-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

#character-grid .character-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

#character-grid .character-item.selected {
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.3);
}

#character-grid .character-item .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  flex-shrink: 0;
}

#character-grid .character-item.selected .avatar {
  border-color: #4ade80;
}

#character-grid .character-item .info {
  flex: 1;
  min-width: 0;
}

#character-grid .character-item .name {
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#character-grid .character-item .status {
  font-size: 11px;
  color: #666;
}

#character-grid .character-item .status.talking {
  color: #4ade80;
}

/* Selected character banner */
#selected-banner {
  display: none;
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 35, 0.95);
  border: 1px solid #4ade80;
  border-radius: 30px;
  padding: 8px 16px 8px 12px;
  z-index: 1000;
  align-items: center;
  gap: 10px;
}

#selected-banner.visible {
  display: flex;
}

#selected-banner .avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #4ade80;
}

#selected-banner .name {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

#selected-banner .following {
  color: #4ade80;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#selected-banner .close-btn {
  background: none;
  border: none;
  color: #666;
  font-size: 18px;
  cursor: pointer;
  margin-left: 8px;
}

#selected-banner .close-btn:hover {
  color: #fff;
}

/* Grid toggle button */
#grid-toggle {
  position: fixed;
  top: 20px;
  left: 20px;
  width: 44px;
  height: 44px;
  background: rgba(20, 20, 35, 0.95);
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  z-index: 1001;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

#grid-toggle:hover {
  background: rgba(40, 40, 60, 0.95);
}

#grid-toggle.visible {
  display: flex;
}
