@import "../../scss/variables/colors";

.tooltip {
  position: relative;

  &--inline {
    display: inline-block;
  }

  &__content {
    box-shadow: 0 5px 10px 0px rgba(0, 0, 0, 0.3);
    margin: 4px;
    font-size: 14px;
    border-radius: 4px;
    padding: 8px 10px;
    max-width: 260px;
    background-color: $ui-tooltip-color;
    border-color: $ui-tooltip-color;
    color: #fff;
    line-height: 18px;
  }

  &__arrow {
    content: " ";
    position: absolute;
    border-width: 4px;
    border-style: solid;
    border-color: transparent;
    top: 50%;
    transform: translateY(-50%);

    &--left {
      border-right-color: inherit;
      left: -4px;
    }

    &--right {
      border-left-color: inherit;
      right: -4px;
    }

    &--top {
      border-bottom-color: inherit;
      top: -4px;
      left: calc(50% - 4px);
    }

    &--bottom {
      border-top-color: inherit;
      bottom: -12px;
      top: auto;
      left: calc(50% - 4px);
    }
  }

  &__box {
    position: fixed;
    visibility: hidden;
    opacity: 0;

    &--visible {
      visibility: visible;
      opacity: 1;
    }

    &-content {
      position: relative;
    }
  }
}
