/*
 * Copyright (c) Jupyter Development Team.
 * Distributed under the terms of the Modified BSD License.
 */

/*-----------------------------------------------------------------------------
| Variables
|----------------------------------------------------------------------------*/

:root {
  --jp-private-running-item-height: 24px;
}

/*-----------------------------------------------------------------------------
| Copyright (c) Jupyter Development Team.
| Distributed under the terms of the Modified BSD License.
|----------------------------------------------------------------------------*/

.jp-RunningSessions {
  display: flex;
  flex-direction: column;
  min-width: var(--jp-sidebar-min-width);
  color: var(--jp-ui-font-color1);
  background: var(--jp-layout-color1);

  /* This is needed so that all font sizing of children done in ems is
   * relative to this base size */
  font-size: var(--jp-ui-font-size1);
}

.jp-RunningSessions > .jp-SidePanel-toolbar {
  justify-content: flex-end;
}

.jp-RunningSessions-section {
  min-height: 50px;
  overflow: auto;
}

.jp-RunningSessions-sectionContainer {
  margin: 0;
  padding: 0;
  overflow: auto;
}

.jp-RunningSessions-sectionList {
  display: block;
  margin: 0;
  padding: 0;
  list-style-type: none;
}

.jp-RunningSessions-item {
  display: flex;
  flex-direction: row;
  color: var(--jp-ui-font-color1);
  height: var(--jp-private-running-item-height);
  line-height: var(--jp-private-running-item-height);
  padding: 0 8px;
}

.jp-RunningSessions-item:hover {
  background-color: var(--jp-layout-color2);
  cursor: pointer;
}

.jp-RunningSessions-item.jp-mod-running-child {
  padding-left: 40px;
}

.jp-RunningSessions-item.jp-mod-kernel:not(.jp-mod-running-child) {
  user-select: none;
}

.jp-RunningSessions-item img {
  height: 16px;
  margin-top: 4px;
}

.jp-RunningSessions-itemLabel {
  font-size: var(--jp-ui-font-size1);
  flex: 1 1 55%;
  padding: 0 4px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.jp-RunningSessions-itemLabel:focus {
  background-color: var(--jp-layout-color2);
}

.jp-RunningSessions-itemDetail {
  font-size: var(--jp-ui-font-size1);
  flex: 1 1 45%;
  padding: 0 4px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.jp-RunningSessions-item .jp-RunningSessions-itemShutdown {
  border-radius: 0;
}

.jp-RunningSessions-item:not(:hover) .jp-RunningSessions-itemShutdown {
  visibility: hidden;
}

.jp-RunningSessions-sectionList
  .jp-RunningSessions-item
  .jp-Button.jp-RunningSessions-itemShutdown:hover {
  background: var(--jp-layout-color3);
}

.jp-RunningSessions-shutdownAll.jp-mod-styled
  > .jp-ToolbarButtonComponent-label {
  color: var(--jp-warn-color1);
  background-color: transparent;
  border-radius: 2px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.jp-RunningSessions-shutdownAll.jp-mod-styled:hover
  > .jp-ToolbarButtonComponent-label {
  background-color: var(--jp-layout-color2);
}

.jp-RunningSessions-shutdownAll.jp-mod-styled:focus
  > .jp-ToolbarButtonComponent-label {
  border: none;
  box-shadow: none;
  background-color: var(--jp-layout-color2);
}

.jp-RunningSessions-shutdownAll.jp-mod-styled.jp-mod-disabled
  > .jp-ToolbarButtonComponent-label {
  color: var(--jp-ui-font-color2);
}

.jp-RunningSessions-shutdownAll.jp-mod-styled.jp-mod-disabled:hover
  > .jp-ToolbarButtonComponent-label {
  background: none;
}
