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

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

:root {
  --jp-private-menubar-height: 28px;
  --jp-private-menu-item-height: 24px;
}

/*-----------------------------------------------------------------------------
| MenuBar
|----------------------------------------------------------------------------*/

.p-MenuBar {
  padding-left: 5px;
  background: var(--jp-layout-color1);
  color: var(--jp-ui-font-color1);
  font-size: var(--jp-ui-font-size1);
}

.p-MenuBar-menu {
  transform: translateY(calc(-2 * var(--jp-border-width)));
}

.p-MenuBar-item {
  padding: 0px 8px;
  border-left: var(--jp-border-width) solid transparent;
  border-right: var(--jp-border-width) solid transparent;
  line-height: var(--jp-private-menubar-height);
}

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

.p-MenuBar.p-mod-active .p-MenuBar-item.p-mod-active {
  z-index: 10001;
  background: var(--jp-layout-color0);
  border-left: var(--jp-border-width) solid var(--jp-border-color1);
  border-right: var(--jp-border-width) solid var(--jp-border-color1);
  box-shadow: var(--jp-elevation-z6);
}

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

.p-MenuBar-item.p-type-separator {
  margin: 2px;
  padding: 0;
  border: none;
  border-left: var(--jp-border-width) solid var(--jp-border-color2);
}

.p-MenuBar-itemMnemonic {
  text-decoration: underline;
}

/*-----------------------------------------------------------------------------
| Menu
|----------------------------------------------------------------------------*/

.p-Menu {
  z-index: 10000;
  padding: 4px 0px;
  background: var(--jp-layout-color0);
  color: var(--jp-ui-font-color1);
  border: var(--jp-border-width) solid var(--jp-border-color1);
  font-size: var(--jp-ui-font-size1);
  box-shadow: var(--jp-elevation-z6);
}

.p-Menu-item {
  min-height: var(--jp-private-menu-item-height);
  max-height: var(--jp-private-menu-item-height);
  padding: 0px;
  line-height: var(--jp-private-menu-item-height);
}

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

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

.p-Menu-itemIcon {
  width: 21px;
  padding: 0px 2px 0px 4px;
  margin-top: -2px;
}

.p-Menu-itemLabel {
  padding: 0px 32px 0px 2px;
}

.p-Menu-itemMnemonic {
  text-decoration: underline;
}

.p-Menu-itemShortcut {
  padding: 0px;
}

.p-Menu-itemSubmenuIcon {
  width: 18px;
  padding: 0px 4px 0px 0px;
}

.p-Menu-item[data-type='separator'] > div {
  padding: 0;
  height: 9px;
}

.p-Menu-item[data-type='separator'] > div::after {
  content: '';
  display: block;
  position: relative;
  top: 4px;
  border-top: var(--jp-border-width) solid var(--jp-layout-color2);
}

.p-Menu-itemIcon,
.p-Menu-itemSubmenuIcon {
  background-size: 16px;
  background-repeat: no-repeat;
  background-position: center;
}

.p-Menu-item.p-mod-toggled > .p-Menu-itemIcon {
  background-image: var(--jp-icon-checkmark);
}

.p-Menu-item.p-mod-toggled.p-mod-disabled > .p-Menu-itemIcon {
  background-image: var(--jp-icon-checkmark-disabled);
}

.p-Menu-item[data-type='submenu'] > .p-Menu-itemSubmenuIcon {
  background-image: var(--jp-icon-caretright);
  background-size: 18px;
  background-repeat: no-repeat;
  background-position: left;
}
