/* S28.2 · WORKSPACE TREE & CONTEXT
 * Add-on CSS for project tree + chat hierarchy
 * Drop-in after contextual_workspace.css
 */

/* ============================================================
 * Project tree (sidebar)
 * ============================================================ */

.lsb-project-tree {
  margin-bottom: 4px;
}

.lsb-project-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 10px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 13px;
  color: var(--tx-1, #e0e0e0);
  cursor: pointer;
  border-radius: 6px;
  transition: background 120ms ease;
}

.lsb-project-row:hover {
  background: var(--bg-hover, #2e3033);
}

.lsb-project-tree.active .lsb-project-row {
  background: rgba(93, 139, 255, 0.08);
  color: var(--ac-blue, #5d8bff);
  font-weight: 500;
}

.lsb-tree-icon {
  font-size: 10px;
  color: var(--tx-3, #7c8089);
  width: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.lsb-project-count {
  font-size: 10.5px;
  color: var(--tx-faint, #5a5d63);
  background: var(--bg-pill, #2a2c2f);
  padding: 1px 7px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}

.lsb-project-tree.active .lsb-project-count {
  background: rgba(93, 139, 255, 0.15);
  color: var(--ac-blue, #5d8bff);
}

/* ============================================================
 * Chat rows nested under project
 * ============================================================ */

.lsb-project-chats {
  margin: 2px 0 6px 22px;
  padding-left: 6px;
  border-left: 1px solid var(--bd-1, #333);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.lsb-chat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 5px 8px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 12.5px;
  color: var(--tx-2, #a5a8ad);
  cursor: pointer;
  border-radius: 5px;
  transition: background 120ms ease, color 120ms ease;
}

.lsb-chat-row:hover {
  background: var(--bg-hover, #2e3033);
  color: var(--tx-1, #e0e0e0);
}

.lsb-chat-row.active {
  background: rgba(93, 139, 255, 0.10);
  color: var(--tx-1, #e0e0e0);
  font-weight: 500;
}

.lsb-chat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tx-faint, #5a5d63);
  flex-shrink: 0;
}

.lsb-chat-dot.active {
  background: var(--ac-blue, #5d8bff);
  animation: lsb-dot-pulse 2s ease-in-out infinite;
}

@keyframes lsb-dot-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

.lsb-project-new-chat {
  display: flex;
  align-items: center;
  gap: 7px;
  width: calc(100% - 6px);
  margin: 3px 0 2px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--tx-3, #7c8089);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.lsb-project-new-chat span:first-child {
  width: 15px;
  height: 15px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(93, 139, 255, 0.10);
  color: var(--ac-blue, #5d8bff);
  font-weight: 600;
}

.lsb-project-new-chat:hover {
  color: var(--tx-1, #e0e0e0);
  background: var(--bg-hover, #2e3033);
  border-color: var(--bd-1, #333);
}

.lsb-new-project {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 7px;
  background: rgba(255,255,255,.035);
  color: var(--tx-2, #b7bbc4);
  cursor: pointer;
}

.lsb-new-project svg {
  width: 17px;
  height: 17px;
  color: var(--ac-blue, #5d8bff);
  stroke-width: 1.9;
}

.lsb-new-project span,
.lsb-new-project strong {
  display: none;
}

.lsb-new-project:hover {
  color: var(--tx-1, #f1f3f7);
  background: rgba(93,139,255,.10);
  border-color: rgba(93,139,255,.25);
}

/* ============================================================
 * Empty state · humano
 * ============================================================ */

.lsb-empty-state {
  padding: 12px 14px;
  font-size: 12px;
  color: var(--tx-faint, #5a5d63);
  font-style: italic;
  text-align: center;
}

/* ============================================================
 * Workspace center cleanup
 * (Hide audit/runtime cards in Founder View)
 * ============================================================ */

body:not(.tech-view) .center .workspace-debug-card,
body:not(.tech-view) .center .workspace-runtime-summary,
body:not(.tech-view) .center #center-audit-card,
body:not(.tech-view) .center #center-runtime-card,
body:not(.tech-view) .center #center-activity-feed {
  display: none !important;
}

body:not(.technical-view) .composer-starters,
body:not(.tech-view) .composer-starters {
  display: none !important;
}
