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

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

:root {
  --jp-private-commandpalette-search-height: 28px;
}

/*-----------------------------------------------------------------------------
| Overall styles
|----------------------------------------------------------------------------*/

.p-CommandPalette {
  padding-bottom: 0px;
  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);
}

/*-----------------------------------------------------------------------------
| Search
|----------------------------------------------------------------------------*/

.p-CommandPalette-search {
  padding: 4px;
  background-color: var(--jp-layout-color1);
  z-index: 2;
}

.p-CommandPalette-wrapper {
  overflow: overlay;
  padding: 0px 9px;
  background-color: var(--jp-input-active-background);
  height: 30px;
  box-shadow: inset 0 0 0 var(--jp-border-width) var(--jp-input-border-color);
}

.p-CommandPalette.p-mod-focused .p-CommandPalette-wrapper {
  box-shadow: inset 0 0 0 1px var(--jp-input-active-box-shadow-color),
    inset 0 0 0 3px var(--jp-input-active-box-shadow-color);
}

.p-CommandPalette-wrapper::after {
  content: ' ';
  color: white;
  background-color: var(--jp-brand-color1);
  position: absolute;
  top: 4px;
  right: 4px;
  height: 30px;
  width: 10px;
  padding: 0px 10px;
  background-image: var(--jp-icon-search-white);
  background-size: 20px;
  background-repeat: no-repeat;
  background-position: center;
}

.p-CommandPalette-input {
  background: transparent;
  width: calc(100% - 18px);
  float: left;
  border: none;
  outline: none;
  font-size: var(--jp-ui-font-size1);
  color: var(--jp-ui-font-color0);
  line-height: var(--jp-private-commandpalette-search-height);
}

.p-CommandPalette-input::-webkit-input-placeholder,
.p-CommandPalette-input::-moz-placeholder,
.p-CommandPalette-input:-ms-input-placeholder {
  color: var(--jp-ui-font-color3);
  font-size: var(--jp-ui-font-size1);
}

/*-----------------------------------------------------------------------------
| Results
|----------------------------------------------------------------------------*/

.p-CommandPalette-header:first-child {
  margin-top: 0px;
}

.p-CommandPalette-header {
  margin-top: 8px;
  padding: 8px 0 8px 12px;
  color: var(--jp-ui-font-color1);
  font-size: var(--jp-ui-font-size0);
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  border-bottom: solid var(--jp-border-width) var(--jp-border-color2);
  letter-spacing: 1px;
}

.p-CommandPalette-header.p-mod-active {
  background: var(--jp-layout-color2);
}

.p-CommandPalette-header:hover::after {
  content: '';
  min-width: 12px;
  min-height: 12px;
  background-size: 14px;
  margin-right: 16px;
  float: right;
  display: inline-block;
  vertical-align: middle;
  background-repeat: no-repeat;
  background-position: center;
  background-image: var(--jp-icon-filter-list);
}

.p-CommandPalette-header > mark {
  background-color: transparent;
  font-weight: bold;
  color: var(--jp-ui-font-color1);
}

.p-CommandPalette-item {
  padding: 4px 12px 4px 4px;
  color: var(--jp-ui-font-color1);
  font-size: var(--jp-ui-font-size1);
  font-weight: 400;
  display: flex;
}

.p-CommandPalette-item.p-mod-disabled {
  color: var(--jp-ui-font-color3);
}

.p-CommandPalette-item.p-mod-active {
  background: var(--jp-layout-color3);
}

.p-CommandPalette-item.p-mod-active:hover:not(.p-mod-disabled) {
  background: var(--jp-layout-color4);
}

.p-CommandPalette-item:hover:not(.p-mod-active):not(.p-mod-disabled) {
  background: var(--jp-layout-color2);
}

.p-CommandPalette-itemContent {
  overflow: hidden;
}

.p-CommandPalette-itemLabel > mark {
  color: var(--jp-ui-font-color0);
  background-color: transparent;
  font-weight: bold;
}

.p-CommandPalette-item.p-mod-disabled mark {
  color: var(--jp-ui-font-color3);
}

.p-CommandPalette-item.p-mod-toggled .p-CommandPalette-itemIcon {
  background-image: var(--jp-icon-checkmark);
  background-size: 16px;
  background-repeat: no-repeat;
}

.p-CommandPalette-item .p-CommandPalette-itemIcon {
  padding: 0px 0px 0px 4px;
  position: relative;
  width: 16px;
  top: 2px;
  flex: 0 0 auto;
}

.p-CommandPalette-item.p-mod-disabled .p-CommandPalette-itemIcon {
  opacity: 0.4;
}

.p-CommandPalette-item .p-CommandPalette-itemShortcut {
  flex: 0 0 auto;
}

.p-CommandPalette-itemCaption {
  display: none;
}

.p-CommandPalette-content {
  background-color: var(--jp-layout-color1);
}

.p-CommandPalette-content:empty:after {
  content: 'No results';
  margin: auto;
  margin-top: 20px;
  width: 100px;
  display: block;
  font-size: var(--jp-ui-font-size2);
  font-family: var(--jp-ui-font-family);
  font-weight: lighter;
}

.p-CommandPalette-emptyMessage {
  text-align: center;
  margin-top: 24px;
  line-height: 1.32;
  padding: 0px 8px;
  color: var(--jp-content-font-color3);
}
