:root {
  --tool-menu-background: #fff;
  --tool-menu-color: #fff;
}

.custom-toolbar {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 40px;
  height: 40px;
}

.toolbar-item {
  position: relative;
  width: 40px;
  height: 40px;
  background-color: var(--tool-menu-background);
  border-radius: 50%;
  text-align: center;
  font-size: 20px;
  line-height: 40px;
  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.toolbar-item.toolbar-item-toggle {
  position: absolute;
  bottom: 0;
}

.toolbar-item i {
  display: flex;
  justify-content: center;
  font-style: normal;
  outline: none;
}

.toolbar-item i::before {
  margin-right: 0;
}

.toolbar-item i::selection {
  background: none;
}

.toolbar-item .tooltip {
  position: absolute;
  top: 50%;
  right: calc(100% + 8px);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  height: 24px;
  padding: 0 8px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 2px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.2s;
  z-index: 9;
}

.toolbar-item .tooltip:after {
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  content: '';
  width: 0;
  height: 0;
  margin: 0;
  border-bottom: 6px solid transparent;
  border-top: 6px solid transparent;
  border-left: 6px solid #333;
}

.toolbar-item:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

.toolbar-item:active {
  filter: brightness(0.8);
  transition: filter 0.2s;
}

@media screen and (max-width: 1366px) {
  .menu-item-tooltip {
    display: none;
  }
}

@media screen and (max-width: 1024px) {
  .toolbar-item:hover .tooltip {
    visibility: hidden;
  }
}

@media screen and (max-width: 767px) {
  .custom-tools-menu .menu-item:not(:last-child):hover {
    transform: none;
  }
  .custom-tools-menu {
    right: 20px;
    bottom: 20px;
  }
}
