@use '../../styles/mixins' as *;

// =============================================================================
// StreamList — IPC stream sidebar list
// =============================================================================

.container {
  padding: var(--space-sm) 0;
}

.header {
  @include section-label;
  padding: var(--space-xs) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.refreshButton {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);

  &:hover {
    color: var(--text-primary);
    background: var(--bg-overlay);
  }
}

.streamRow {
  @include hover-accent;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-md);
  cursor: pointer;
  min-height: 32px;
  user-select: none;

  &.selected {
    background: var(--bg-overlay);
  }
}

.systemRow {
  composes: streamRow;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-xs);
  font-weight: 500;
}

.streamIcon {
  flex-shrink: 0;
  color: var(--text-secondary);
}

.streamName {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subscriberBadge {
  @include surface-inset;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  flex-shrink: 0;
}

.emptyState {
  padding: var(--space-md);
  font-size: 12px;
  color: var(--text-disabled);
  text-align: center;
}

.loading {
  padding: var(--space-md);
  font-size: 12px;
  color: var(--text-disabled);
  text-align: center;
}
