/*
 * 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.
 */

.topMenuBar .menuBarItemGroup .menuBarItem {
  background: none;
  border: none;
  outline: none !important;
  color: inherit;
  cursor: pointer;

  height: 100%;
  margin-right: 1px;

  &:after {
    position: absolute;
    background: #236ea0 !important;
    height: 32px;
    width: 1px;
    top: 8px;
    right: -1px;
    opacity: 1 !important;
    content: '';
  }

  &:disabled {
    opacity: 1;
  }

  & .menuBarItemIcon {
    width: 32px;
    height: 32px;
  }

  & .loader,
  & .iconOrImage {
    width: 24px;
  }

  & .menuBarItemBox {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 0;
    height: inherit;
    position: relative;
    justify-content: center;
  }

  & .menuBarItemLabel {
    white-space: nowrap;
    max-width: 240px;
    overflow-x: hidden;
    font-size: 14px;
    padding: 0 4px;
    text-overflow: ellipsis;
    font-weight: inherit;
    text-transform: none;
  }

  & .menuBarItemIcon + .menuBarItemLabel {
    padding-left: 4px;
  }

  &:hover,
  &:global([aria-expanded='true']) {
    background: #338ecc;
  }
  &:not(:focus-visible):before {
    display: none;
  }

  & .menuBarItemMark {
    display: flex;

    & .icon {
      margin-right: 4px;
    }
  }
}

.loader {
  composes: secondary from global;
}
