/* ==========================================================================
   Channel Sidebar Styles
   ========================================================================== */

.channel-sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background-color: var(--bg-channel-sidebar);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  user-select: none;
  z-index: 5;
  border-top-left-radius: 8px;
}

/* Server Header */
.server-header {
  height: var(--header-height);
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border-bottom: 1px solid var(--bg-divider);
  transition: background-color 0.15s ease;
}

.server-header:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.server-header-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-header-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.server-header-badge {
  color: var(--brand-blurple);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.server-header-chevron {
  margin-left: auto;
  color: var(--interactive-normal);
  transition: transform 0.2s ease;
}

/* Channels Scroll Area */
.channels-container {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Category Section */
.category-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-header {
  height: 28px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  cursor: pointer;
  color: var(--text-muted);
}

.category-chevron {
  font-size: 10px;
  color: var(--interactive-normal);
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
}

.category-section.collapsed .category-chevron {
  transform: rotate(-90deg);
}

.category-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.category-add-btn {
  margin-left: auto;
  color: var(--interactive-normal);
  padding: 2px;
  border-radius: 4px;
}

.category-add-btn:hover {
  color: var(--interactive-active);
}

/* Channel Row */
.category-channels {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.category-section.collapsed .category-channels {
  display: none;
}

.channel-row {
  height: 38px;
  padding: 0 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--interactive-normal);
  background-color: transparent;
  transition: background-color 0.12s ease, color 0.12s ease;
  width: 100%;
  text-align: left;
}

.channel-row:hover {
  background-color: var(--bg-hover-channel);
  color: var(--interactive-hover);
}

.channel-row.active {
  background-color: var(--bg-active-channel);
  color: var(--interactive-active);
}

.channel-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
}

.channel-name {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.channel-row.active .channel-name {
  font-weight: 600;
}

.channel-row.unread .channel-name {
  font-weight: 700;
  color: var(--interactive-active);
}

.channel-unread-pip {
  width: 8px;
  height: 8px;
  background-color: #ffffff;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Voice Participants under Voice Channel */
.voice-participants-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 36px;
}

.voice-participant-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
}

.voice-participant-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 10px;
  border: 1.5px solid var(--brand-green);
  position: relative;
}

.voice-participant-avatar .vamp-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.voice-participant-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-normal);
}

/* User Control Bar */
.user-control-bar {
  height: var(--user-bar-height);
  background-color: var(--bg-user-bar);
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  border-top: 1px solid rgba(0,0,0,0.2);
}

.user-avatar-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
}

.user-avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
}

.user-avatar-circle .vamp-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.user-status-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--bg-user-bar);
}

.user-status-dot.online { background-color: var(--status-online); }
.user-status-dot.idle { background-color: var(--status-idle); }
.user-status-dot.dnd { background-color: var(--status-dnd); }
.user-status-dot.offline { background-color: var(--status-offline); }

.user-info-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
  cursor: pointer;
}

.user-display-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-header-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-custom-status {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-action-buttons {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.user-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  color: var(--interactive-normal);
  transition: all 0.12s ease;
}

.user-action-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--interactive-hover);
}

.user-action-btn.active-red {
  color: var(--brand-red);
}
