:root {
  --dash-launch-button-height: 28px;
}

/**
 * Rules related to the overall sidebar panel.
 */

.dask-DaskSidebar {
  background: var(--jp-layout-color1);
  color: var(--jp-ui-font-color1);
  font-size: var(--jp-ui-font-size1);
  overflow: auto;
}

/**
 * Rules related to the dashboard launcher.
 */

.dask-DashboardListing-list {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  margin: 8px;
  padding: 0;
  list-style-type: none;
}

.dask-DashboardListing-item {
  margin: 4px;
  white-space: nowrap;
}

.dask-DashboardListing-item button {
  font-size: var(--jp-ui-font-size0);
  line-height: 24px;
  padding: 0px 8px;
}

.dask-DashboardListing-item button.jp-mod-styled.jp-mod-accept {
  height: var(--dask-launch-button-height);
  color: #000000;
  background-color: #ecb172;
  border: 1px solid #ecb172;
  text-transform: uppercase;
}

.dask-DashboardListing-item button:disabled.jp-mod-styled.jp-mod-accept {
  background-color: var(--jp-layout-color3);
  border: 1px solid var(--jp-layout-color3);
}

.dask-URLInput {
  padding: 8px;
  display: flex;
  align-items: center;
  background-color: var(--jp-layout-color1);
  border-bottom: 1px solid var(--jp-border-color2);
  box-shadow: var(--jp-toolbar-box-shadow);
  z-index: 2;
}

.dask-URLInput-wrapper {
  background-color: var(--jp-input-active-background);
  border: var(--jp-border-width) solid var(--jp-border-color2);
  flex: 1 1 auto;
  height: 30px;
  padding: 0px 12px;
  margin: 0 4px 0 0;
}

.dask-URLInput-wrapper:focus-within {
  border: var(--jp-border-width) solid var(--md-blue-500);
  box-shadow: inset 0 0 4px var(--md-blue-300);
}

.dask-URLInput-wrapper input {
  background: transparent;
  float: left;
  border: none;
  outline: none;
  font-size: var(--jp-ui-font-size1);
  color: var(--jp-ui-font-color0);
  width: calc(100% - 18px);
  line-height: 28px;
}

.dask-URLInput-wrapper::placeholder {
  color: var(--jp-ui-font-color3);
  font-size: var(--jp-ui-font-size1);
}

.dask-UrlInput .jp-ToolbarButton {
  flex: 0 0 auto;
  margin: 0 0 0 4px;
  background-color: var(--jp-layout-color2);
  min-width: 16px;
}

/**
 * Rules for the dashboard panels.
 */
.dask-DaskDashboard-inactive {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--jp-ui-font-color3);
  font-size: var(--jp-ui-font-size3);
  background-color: var(--jp-layout-color0);
  z-index: 10;
}

.dask-DaskDashboard-inactive:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url(dask.svg);
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.1;
}

/**
 * Rules related to the cluster manager.
 */

.dask-DaskClusterManager {
  border-top: 6px solid var(--jp-toolbar-border-color);
}

.dask-DaskClusterManager .jp-Toolbar {
  align-items: center;
}

.dask-DaskClusterManager .jp-Toolbar .dask-DaskClusterManager-label {
  flex: 0 0 auto;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: var(--jp-ui-font-size0);
  padding: 8px 8px 8px 12px;
  margin: 0px;
}

.dask-DaskClusterManager button.jp-Button > span {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.dask-ClusterListing ul.dask-ClusterListing-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.dask-ClusterListingItem {
  display: inline-block;
  list-style-type: none;
  padding: 8px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: grab;
}

.dask-ClusterListingItem-drag {
  opacity: 0.7;
  color: var(--jp-ui-font-color1);
  cursor: grabbing;
  max-width: 260px;
  transform: translateX(-50%) translateY(-50%);
}

.dask-ClusterListingItem-title {
  margin: 0px;
  font-size: var(--jp-ui-font-size2);
}

.dask-ClusterListingItem-link a {
  text-decoration: none;
  color: var(--jp-content-link-color);
}

.dask-ClusterListingItem-link a:hover {
  text-decoration: underline;
}

.dask-ClusterListingItem-link a:visited {
  color: var(--jp-content-link-color);
}

.dask-ClusterListingItem:hover {
  background: var(--jp-layout-color2);
}

.dask-ClusterListingItem.jp-mod-active {
  color: white;
  background: var(--jp-brand-color0);
}

.dask-ClusterListingItem.jp-mod-active a,
.dask-ClusterListingItem.jp-mod-active a:visited {
  color: white;
}

.dask-ClusterListingItem button.jp-mod-styled {
  background-color: transparent;
}

.dask-ClusterListingItem button.jp-mod-styled:hover {
  background-color: var(--jp-layout-color3);
}

.dask-ClusterListingItem.jp-mod-active button.jp-mod-styled:hover {
  background-color: var(--jp-brand-color1);
}

.dask-ClusterListingItem-button-panel {
  display: flex;
  align-content: center;
}

button.dask-ClusterListingItem-stop {
  color: var(--jp-warn-color1);
  font-weight: 600;
}

button.dask-ClusterListingItem-scale {
  color: var(--jp-accent-color1);
  font-weight: 600;
}

.dask-ClusterListingItem button.dask-ClusterListingItem-code.jp-mod-styled {
  margin: 0 4px 0 4px;
  background-repeat: no-repeat;
  background-position: center;
}

/**
 * Rules for the scaling dialog.
 */

.dask-ScalingHeader {
  font-size: var(--jp-ui-font-size2);
}

.dask-ScalingSection {
  margin-left: 24px;
}

.dask-ScalingSection-item {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin: 12px 0 12px 0;
}

.dask-ScalingHeader input[type='checkbox'] {
  position: relative;
  top: 4px;
  left: 4px;
  margin: 0 0 0 8px;
}

.dask-ScalingSection input[type='number'] {
  width: 72px;
}

.dask-ScalingSection-label.dask-mod-disabled {
  color: var(--jp-ui-font-color3);
}

.dask-ScalingSection input[type='number']:disabled {
  color: var(--jp-ui-font-color3);
}

/**
 * Rules for the logos.
 */

.dask-SearchIcon {
  background-image: var(--jp-icon-search);
}

[data-jp-theme-light='true'] .dask-CodeIcon {
  background-image: url(code-light.svg);
}

[data-jp-theme-light='false'] .dask-CodeIcon {
  background-image: url(code-dark.svg);
}

.dask-ClusterListingItem.jp-mod-active .dask-CodeIcon {
  background-image: url(code-dark.svg);
}

.dask-DaskLogo {
  background-image: url(dask.svg);
}

#setting-editor .dask-DaskLogo {
  background-repeat: no-repeat;
  background-size: 85%;
  background-position: center;
}
