@use "_theme.scss";

.uedit-tooltip {
  font-size: var(--text-size-regular);
  font-family: var(--font-family);
  color: var(--text-color-dark);
  display: none;
  position: absolute;
  top: 90px;
  z-index: 2;
  padding: 15px;
  background-color: var(--color-fill);
  border-radius: 5px;
  text-align: center;
  border: 1px solid var(--color-line);
  white-space: normal;
  justify-content: center;
  box-shadow: 0px 0px 4px 0px #00000026;

  &:after {
    position: absolute;
    content: "";
    height: 15px;
    width: 15px;
    background: var(--color-fill);
    border-bottom: inherit;
    border-right: inherit;
    transform: rotate(225deg);
    bottom: calc(100% - 7px);
    left: calc(50% - 7px);
    display: inherit;
    box-shadow: 1px 1px 3px -2px #d6d6d6;
    border: solid var(--color-line);
    border-width: 0 1px 1px 0;
    @media (max-width: theme.$md) {
      bottom: initial;
      top: calc(100% - 7px);
      transform: rotate(45deg);
      left: calc(50% - 7px);
    }
  }

  @media (min-width: theme.$xl) {
    top: 110px;
  }
}
.hidden-tools-block {
  .uedit-tooltip {
    display: none;
  }
}
.uedit-preview-tooltip-click-wrapper {
  .uedit-tooltip {
    display: flex;
    left: 145px;
  }
  @media (max-width: theme.$md) {
    position: relative;
    .uedit-tooltip {
      left: -110;
      top: initial;
      bottom: 30px;
    }
  }
}

.text-section, .image-section, .shape-controls {
  .button.truncate, .dropdown-wrapper {
    position: relative;
    overflow: visible;
    .uedit-tooltip {
      top: 50px;
      left: 50%;
      transform: translateX(-50%);
    }
    &:hover {
      @media (min-width: theme.$md) {
        .uedit-tooltip {
          display: flex;
        }
      }
    }
  }
}
.shape-controls {
  .dropdown-wrapper .uedit-tooltip {
    top: -84px;
    &:after {
      bottom: -8px;
      transform: rotate(45deg);
    }
  }
}