.menu-editor-header {
}

.menu-editor-header h2 {
  margin: 0;
}

.menu-editor-header p {
  margin: 0.25rem 0 0;
  color: var(--vscode-descriptionForeground);
}

.menu-editor-tree-wrap {
  border: 1px solid var(--vscode-panel-border);
  border-radius: 6px;
  background: var(--vscode-editor-background);
  padding: 0.5rem;
  min-height: 0;
}

.menu-editor-toolbar {
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--vscode-panel-border);
}

.menu-editor-tool {
  width: 1.8rem;
  height: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--vscode-foreground);
  cursor: pointer;
  padding: 0;
}

.menu-editor-tool:hover:not(:disabled) {
  background: var(--vscode-toolbar-hoverBackground);
  border-color: var(--vscode-panel-border);
}

.menu-editor-tool:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.menu-editor-tree-shell {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.menu-editor-tree-level {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-editor-tree-item {
  margin: 0;
  padding: 0;
}

.menu-editor-row {
  --menu-editor-indent: calc(var(--menu-editor-depth) * 1rem);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.3rem 0.45rem 0.3rem calc(0.4rem + var(--menu-editor-indent));
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}

.menu-editor-row.is-selected {
  background: var(--vscode-list-activeSelectionBackground);
  color: var(--vscode-list-activeSelectionForeground);
}

.menu-editor-row.is-dragging {
  opacity: 0.45;
}

.menu-editor-row.is-drop-before::before,
.menu-editor-row.is-drop-after::after {
  content: "";
  position: absolute;
  left: calc(0.4rem + var(--menu-editor-indent));
  right: 0.45rem;
  height: 2px;
  background: var(--vscode-focusBorder);
}

.menu-editor-row.is-drop-before::before {
  top: 0;
}

.menu-editor-row.is-drop-after::after {
  bottom: 0;
}

.menu-editor-row.is-drop-inside {
  box-shadow: inset 0 0 0 1px var(--vscode-focusBorder);
  background: var(--vscode-list-hoverBackground);
}

.menu-editor-row-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  min-width: 1rem;
  color: var(--vscode-descriptionForeground);
  cursor: grab;
  user-select: none;
}

.menu-editor-row-handle:active {
  cursor: grabbing;
}

.menu-editor-row-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  min-width: 1rem;
  opacity: 0.9;
}

.menu-editor-row-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-editor-row-title.is-editing {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.menu-editor-entry-form {
  display: block;
}

.menu-editor-inline-input {
  width: 100%;
  border: 1px solid var(--vscode-focusBorder);
  border-radius: 4px;
  background: var(--vscode-input-background);
  color: var(--vscode-input-foreground);
  padding: 0.25rem 0.45rem;
  min-height: 1.8rem;
}

.menu-editor-inline-search {
  margin-top: 0.5rem;
  border-top: 1px solid var(--vscode-panel-border);
  padding-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 18rem;
  overflow: hidden;
}

.menu-editor-inline-search-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.menu-editor-inline-search-head strong {
  display: block;
  font-size: 0.8rem;
}

.menu-editor-inline-search-head span {
  color: var(--vscode-descriptionForeground);
  font-size: 0.75rem;
}

.menu-editor-inline-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.menu-editor-inline-action {
  border: 1px solid var(--vscode-button-border, transparent);
  border-radius: 4px;
  background: var(--vscode-button-secondaryBackground);
  color: var(--vscode-button-secondaryForeground);
  padding: 0.2rem 0.5rem;
  cursor: pointer;
}

.menu-editor-inline-action:hover {
  background: var(--vscode-button-secondaryHoverBackground);
}

.menu-editor-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 16rem;
  overflow-y: auto;
}

.menu-editor-picker-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border: 1px solid var(--vscode-panel-border);
  border-radius: 4px;
  background: var(--vscode-input-background);
  color: var(--vscode-input-foreground);
  padding: 0.45rem 0.55rem;
  text-align: left;
  cursor: pointer;
}

.menu-editor-picker-item:hover {
  border-color: var(--vscode-focusBorder);
  background: var(--vscode-list-hoverBackground);
}

.menu-editor-picker-item small,
.menu-editor-picker-state {
  color: var(--vscode-descriptionForeground);
}

.menu-editor-empty {
  color: var(--vscode-descriptionForeground);
  padding: 0.5rem 0.25rem;
}

@media (max-width: 720px) {
  .menu-editor-inline-search-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .menu-editor-inline-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

