$block = ".klara-ui-tooltip";

{$block} {
  position: absolute;

  &__hoverable {
    {$block} {
      opacity: 0;
      pointer-events: none;
    }

    &:hover {
      {$block} {
        opacity: 1;
      }
    }
  }

  &__inner {
    position: relative;
    padding: 4px 6px 6px 8px;
    background: $c-gray-darkest;
    box-shadow: 1px 1px 1px rgba(0, 0, 0, .4);
  }

  &:before {
    position: absolute;
    margin-top: -5px;
    width: 10px;
    height: 10px;
    background: $c-gray-darkest;
    box-shadow: 1px 1px 1px rgba(0, 0, 0, .4);
    content: "";
    transform: rotate(45deg);
  }

  &__up {
    bottom: 100%;
    left: 50%;
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
    margin-left: -100px;
    width: 200px;

    &:before {
      top: 100%;
      left: 50%;
      margin-left: -5px;
    }
  }

  &__right {
    top: 50%;
    left: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-left: 8px;
    width: 200px;
    height: 0;

    &:before {
      top: 50%;
      right: 100%;
      margin-right: -5px;
    }
  }

  &__down {
    top: 100%;
    left: 50%;
    display: flex;
    justify-content: center;
    margin-top: 8px;
    margin-left: -100px;
    width: 200px;

    &:before {
      bottom: 100%;
      left: 50%;
      margin-bottom: -5px;
      margin-left: -5px;
    }
  }

  &__left {
    top: 50%;
    right: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-right: 8px;
    width: 200px;
    height: 0;

    &:before {
      top: 50%;
      left: 100%;
      margin-left: -5px;
    }
  }

  &__text {
    color: $c-white-base;
    letter-spacing: .5px;
    font-size: $font-size-small;
    line-height: $font-line-height;
  }
}
