:root {
  --dask-launch-button-height: 24px;
}

/**
 * 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-inactive {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 600px;
  color: var(--jp-ui-font-color3);
}

.dask-DashboardListing-inactive-title {
  font-size: var(--jp-ui-font-size3);
  padding: 24px;
  text-align: center;
}

.dask-DashboardListing-inactive-detail {
  font-size: var(--jp-ui-font-size4);
  padding: 24px;
}

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

.dask-DashboardListing-list {
  margin: 8px;
  padding: 0;
  list-style-type: none;
}

.dask-DashboardListing-item {
  margin-top: 4px;
  margin-bottom: 4px;
  margin-left: 12px;
  margin-right: 12px;
  white-space: nowrap;
}

.dask-DashboardListing-item button {
  font-size: var(--jp-ui-font-size0);
  border-radius: 2px;
  line-height: 1em;
  padding: 0px 8px;
  width: 100%;
}

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

.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-widget {
  background-color: white;
}

.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;
}
