/* Sidebar column (figma 133:7629): vertical stack, gap 8, padding 16/6,
   sidebar fill + 1px right border painted by the layout column. Header block
   (logo + New Session) and list area (section header + search + cells) carry
   their own inner gaps per the style spec (1.2 / 1.3). */

.root {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  padding: 6px 16px;
  box-sizing: border-box;
  background: var(--dsw-specific-sidebar-fill);
  color: var(--dsw-alias-label-primary);
  font-size: 14px;
}

/* Header block (figma 133:7630): logo row + New Session, gap 16, padBottom 12. */
.headerBlock {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 12px;
}

/* Logo row: 60px, brand mark left, collapse button right.
   figma pad is (l,t,r,b)=(4,8,4,8) — horizontal 4, vertical 8. */
.logoRow {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 60px;
  padding: 8px 4px;
  box-sizing: border-box;
}

/* Brand group (figma I133:7632): fish + wordmark ride the text ink
   (figma-flows ruling: main-screen instance is black; blue is brand
   emphasis only). */
.brand {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
}

.wordmark {
  font-weight: 600;
  white-space: nowrap;
}

/* HARNESS badge (figma 34:10358): 14px tall, mono 11/500 on primary fill. */
.badge {
  flex: none;
  padding: 0 3px;
  border-radius: 2px;
  background: var(--dsw-alias-label-primary);
  color: var(--dsw-alias-label-primary-inverted);
  font-family: var(--ds-font-family-code);
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
}

.iconButton {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  cursor: pointer;
  color: var(--dsw-alias-label-secondary);
}

.iconButton:hover {
  background: var(--dsw-alias-interactive-bg-hover);
}

/* New Session: 38px capsule (figma 133:7634). */
.newSession {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 8px 16px;
  box-sizing: border-box;
  border: 1px solid var(--dsw-alias-border-l2);
  border-radius: 24px;
  background: var(--dsw-alias-button-elevated-fill);
  color: var(--dsw-alias-label-primary);
  font-size: 14px;
  font-weight: 510;
  line-height: 22px;
  cursor: pointer;
}

.newSession:hover {
  background: var(--dsw-alias-button-floating-hover);
}

/* List area (figma 133:7640): section header + search + cells, gap 4.
   Relative for the bottom fade overlay. */
.listArea {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Bottom fade (figma 133:7666): 72px overlay pinned to the visible bottom,
   transparent -> sidebar fill so it tracks the theme. */
.fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(to bottom, transparent, var(--dsw-specific-sidebar-fill));
  pointer-events: none;
}

/* Batch separator (figma 133:7661): 20px spacer after an expanded project's
   session run, before the next project row. */
.batchGap {
  flex: none;
  height: 20px;
}

/* Section header: 36px, "WorkSpace" label + group-by / new-workspace buttons. */
.sectionHeader {
  flex: none;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding-left: 12px;
  box-sizing: border-box;
  border-radius: 12px;
  color: var(--dsw-alias-label-tertiary);
}

.sectionLabel {
  flex: 1;
  min-width: 0;
  line-height: 20px;
}

/* Search input: 38px capsule (figma 133:7649). Upstream binds a dedicated
   design-system variable (light #F1F3F5 / dark #1B1B1C) matching no shipped
   alias — a component token pinned to the static scale mirrors it (ruled
   compliant: indirect via custom property, upstream-variable equivalent). */
.search {
  --dsh-search-input-fill: var(--dsw-static-neutral-bluish-75);
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  margin-bottom: 8px; /* + 4px area gap = 12px to the first cell (spec padB12) */
  padding: 0 14px;
  box-sizing: border-box;
  border: 1px solid var(--dsw-alias-border-l2);
  border-radius: 24px;
  background: var(--dsh-search-input-fill);
  color: var(--dsw-alias-label-caption);
}

:global(body[data-ds-dark-theme]) .search {
  --dsh-search-input-fill: var(--dsw-static-neutral-bluish-900);
}

.searchInput {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  line-height: 20px;
  color: var(--dsw-alias-label-primary);
}

.searchInput::placeholder {
  color: var(--dsw-alias-label-tertiary);
}

.clearButton {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  cursor: pointer;
  color: var(--dsw-alias-label-secondary);
}

/* Tree list: the only scrolling region. */
.list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
}

.empty {
  padding: 16px 12px;
  color: var(--dsw-alias-label-tertiary);
  font-size: 13px;
}

/* Foot: settings entry (figma 133:7668). */
.foot {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 29px;
  margin: 10px 0;
  padding: 0 2px 0 6px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--dsw-alias-label-primary);
}

.foot:hover {
  background: var(--dsw-alias-interactive-bg-hover);
}
