/* ============================================ */
/* GB FLUENT — Chat Sidebar                      */
/* ============================================ */

.chat-sidebar {
  width: 300px;
  height: 100%;
  background: var(--glass-bg, var(--shell-bg, rgba(20,22,35,0.6)));
  backdrop-filter: var(--glass-backdrop, var(--shell-blur, blur(16px) saturate(150%)));
  -webkit-backdrop-filter: var(--glass-backdrop, var(--shell-blur, blur(16px) saturate(150%)));
  border-right: 1px solid var(--shell-border, var(--glass-border-color, rgba(255,255,255,0.12)));
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width 300ms cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
  flex-shrink: 0;
}

.chat-sidebar.collapsed {
  width: 51px;
}

.chat-sidebar-toggle {
  width: 100%;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 180ms;
  border-bottom: 1px solid var(--shell-border, var(--glass-border-color, rgba(255,255,255,0.10)));
  flex-shrink: 0;
}

.chat-sidebar-toggle:hover {
  background: var(--win-caption-hover, rgba(255,255,255,0.06));
}

.chat-sidebar-toggle svg {
  width: 22px;
  height: 22px;
  stroke: var(--text-secondary, #888);
  transition: all 300ms;
}

.chat-sidebar-toggle:hover svg {
  stroke: var(--primary, var(--accent, #84d669));
}

.chat-sidebar-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-sidebar.collapsed .chat-sidebar-content {
  display: none;
}

/* Header */
.chat-sidebar-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--shell-border, var(--glass-border-color, rgba(255,255,255,0.10)));
}

.chat-sidebar-title {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #eee);
  display: flex;
  align-items: center;
  gap: 8px;
}

.glow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary, var(--accent, #84d669));
  box-shadow: 0 0 8px var(--primary, var(--accent, #84d669));
  animation: chatDotPulse 2s ease-in-out infinite;
}

@keyframes chatDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.3); }
}

/* Conversations */
.chat-sidebar-conversations {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.chat-sidebar-conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 150ms;
  margin-bottom: 2px;
  border: 1px solid transparent;
}

.chat-sidebar-conv-item:hover {
  background: var(--win-caption-hover, rgba(255,255,255,0.06));
}

.chat-sidebar-conv-item.active {
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--shell-border, rgba(255,255,255,0.10));
}

.chat-sidebar-conv-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary, var(--accent, #84d669));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-sidebar-conv-icon svg {
  width: 16px;
  height: 16px;
  stroke: #111;
}

.chat-sidebar-conv-info {
  flex: 1;
  min-width: 0;
}

.chat-sidebar-conv-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #eee);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-sidebar-conv-preview {
  font-size: 11px;
  color: var(--text-secondary, #777);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.chat-sidebar-conv-time {
  font-size: 10px;
  color: var(--text-secondary, #666);
  flex-shrink: 0;
}

/* New chat button */
.chat-sidebar-new-chat {
  margin: 8px;
  padding: 10px;
  border-radius: 10px;
  border: 1px dashed var(--shell-border, rgba(255,255,255,0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-secondary, #888);
  font-size: 13px;
  transition: all 180ms;
}

.chat-sidebar-new-chat:hover {
  border-color: var(--primary, var(--accent, #84d669));
  color: var(--primary, var(--accent, #84d669));
  background: var(--win-caption-hover, rgba(255,255,255,0.04));
}

/* Collapsed icons */
.chat-sidebar-collapsed-icons {
  display: none;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
  gap: 4px;
}

.chat-sidebar.collapsed .chat-sidebar-collapsed-icons {
  display: flex;
}

.chat-sidebar-collapsed-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 10px;
  transition: all 150ms;
  color: var(--text-secondary, #888);
}

.chat-sidebar-collapsed-icon:hover {
  background: var(--win-caption-hover, rgba(255,255,255,0.08));
  color: var(--text, #eee);
}

.chat-sidebar-collapsed-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* ── Public mode sidebar hide ── */
body.public-mode .chat-sidebar {
  display: none !important;
}

body.fullscreen .chat-sidebar {
  display: none !important;
}