/*
 * CloudBeaver - Cloud Database Manager
 * Copyright (C) 2020-2024 DBeaver Corp and others
 *
 * Licensed under the Apache License, Version 2.0.
 * you may not use this file except in compliance with the License.
 */

.menuBox {
  composes: theme-background-surface theme-text-on-surface from global;
}

.menuItem,
.menuItemCheckbox,
.menuItemRadio {
  composes: theme-ripple from global;
}
.menuItemElement {
  composes: theme-ripple from global;
}
.menuPanelItem {
  composes: theme-border-color-background from global;
}
.box {
  display: flex;
  align-items: center;
  flex: 1;
  height: inherit;
}

.menuButton {
  background: none;
  border: none;
  outline: none !important;
  color: inherit;
  cursor: pointer;
}
.menu {
  outline: none;
  z-index: 999;
}

.menuBox {
  composes: theme-typography--body2 theme-elevation-z5 from global;
  min-width: 140px;
  padding: 12px 0;
  & .menuBox {
    margin-top: -12px;
  }
}
.menuBox,
.menuPanelButtonWrapper {
  display: flex;
  flex-direction: column;
}
.menuItem,
.menuItemCheckbox,
.menuItemRadio {
  display: flex;
  align-items: center;
  border: none;
  padding: 0;
  background: none;
  text-align: left;
  outline: none;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
  &.use,
  &.hidden {
    display: none;
  }
  &:hover,
  &:global([aria-expanded='true']) {
    & .icon {
      opacity: 1;
    }
  }
}
.menuPanelItem {
  flex: 1;
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 4px;
  &.separator {
    border-bottom: 1px solid;
  }
  & .menuItemText {
    display: block;
    padding: 0 4px;
    flex: 1;
  }
  & .menuItemContent {
    width: 24px;
    height: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  & .icon {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    transform: rotate(-90deg);
  }
  & .iconOrImage {
    width: 16px;
    height: 16px;
    object-fit: contain;
  }
  & .loader {
    width: 16px;
  }
}
.menuTrigger {
}
