/* Channels feature styles */

/* Legacy lower composer context badge — intentionally hidden (top hard-context banner is the only source of truth) */
#composeContextBadge,
.compose-context-badge {
  display: none !important;
}
.compose-context-general { border-color: rgba(120,130,150,0.45); }
.compose-context-channel { border-color: rgba(108,92,231,0.55); background: rgba(108,92,231,0.16); }
.compose-context-dm { border-color: rgba(0,190,170,0.55); background: rgba(0,190,170,0.14); }

/* "New chat" button in DM drawer header */
.channel-new-btn {
  background: var(--accent, #6c5ce7);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.15s;
}
.channel-new-btn:hover { background: var(--accent-hover, #5a4bd1); }

/* Channel items in conversation list */
.dm-conv-item.channel-item {
  border-right: 3px solid var(--accent, #6c5ce7);
}
.dm-conv-item.channel-item .dm-conv-avatar {
  background: var(--accent, #6c5ce7);
  color: #fff;
  font-size: 0.8rem;
}

/* Channel section divider */
.channel-section-label {
  padding: 10px 16px 4px;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.channel-section-total {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(167, 139, 250, 0.18);
  color: #ddd6fe;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid rgba(167, 139, 250, 0.28);
}

/* Editable channel name in header */
.chat-header-title[contenteditable="true"] {
  border-bottom: 1px dashed rgba(255,255,255,0.4);
  outline: none;
  cursor: text;
  min-width: 60px;
}
.chat-header-title[contenteditable="true"]:focus {
  border-bottom-color: var(--accent, #6c5ce7);
}

/* Delete channel button */
.channel-delete-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.3);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  margin-inline-start: 8px;
  flex-shrink: 0;
  transition: color 0.15s, background 0.15s;
}
.channel-delete-btn:hover {
  color: #e74c3c;
  background: rgba(231,76,60,0.15);
}

/* Hard context banner (sticky inside chat) */
.hard-context-banner {
  position: sticky;
  top: 0;
  z-index: 520;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(8, 9, 13, 0.9);
  backdrop-filter: blur(6px);
}
.hard-context-banner .hard-context-label {
  opacity: 0.78;
  margin-inline-start: 4px;
}
.hard-context-general { border-right: 3px solid rgba(120,130,150,0.7); }
.hard-context-channel { border-right: 3px solid rgba(108,92,231,0.9); background: rgba(108,92,231,0.13); }
.hard-context-dm { border-right: 3px solid rgba(0,190,170,0.9); background: rgba(0,190,170,0.11); }

/* Reply target chip (above composer) */
.reply-target-chip {
  order: -1;
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 4px;
  border-radius: 8px;
  border: 1px solid rgba(59,130,246,0.35);
  background: rgba(59,130,246,0.12);
  font-size: 12px;
  min-width: 0;
}
.reply-target-chip-label { opacity: 0.8; flex-shrink: 0; }
.reply-target-chip-user { font-weight: 700; flex-shrink: 0; }
.reply-target-chip-text {
  opacity: 0.92;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.reply-target-chip-close {
  margin-inline-start: auto;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  color: #fff;
  cursor: pointer;
}

@media (max-width: 768px) {
  .hard-context-banner {
    font-size: 11px;
    padding: 6px 10px;
  }
  .reply-target-chip {
    font-size: 11px;
    padding: 6px 8px;
    gap: 6px;
  }
}
