/*
 * 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.
 */
.menuPanelItem {
  composes: theme-ripple theme-border-color-background from global;

  flex: 1;
  display: flex;
  position: relative;
  align-items: center;
  height: 28px;
  padding: 0 4px;

  & .menuItemText,
  & .menuItemBinding {
    display: block;
    padding: 0 4px;
  }
  & .menuItemBinding {
    flex: 1;
    text-align: right;
    padding-left: 32px;
    width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  & .menuItemIcon,
  & .menuItemContent {
    width: 24px;
    height: 24px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  & .menuItemContent .icon {
    width: 10px;
    height: 10px;
    opacity: 0.5;
  }
  & .iconOrImage {
    width: 16px;
    height: 16px;
    object-fit: contain;
  }
  & .loader {
    width: 16px;
  }
}

.menuItemBinding {
  composes: theme-typography--caption from global;
}

.menuBox:not([data-s-has-bindings='true']) .menuItemBinding {
  width: 0;
}

.menuBox[dir='rtl'] {
  & .menuItemText {
    text-align: right;
  }
  & .menuItemContent .icon {
    transform: rotate(180deg);
  }
}

.menuItem:hover,
.menuItem:global([aria-expanded='true']) {
  & .menuItemContent .icon {
    opacity: 1;
  }
}
