.tooltip-message {
  position: absolute;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.6875rem;
  max-width: 450px;
  z-index: 10000;
  color: $black;
  padding-right: 20px;

  .tooltip-close-icon {
    cursor: pointer;
    position: absolute;
    margin: 100px;
    background-color: $white;
  }

  &.default {
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  }

  &.custom-class {
    border-right: 12px;
    padding: 8px;
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  }

  &.on-top {
    transform: translateX(-50%);
    margin-top: 8px;
    background-color: var(--background-color);

    &.is-indicator {
      &::after {
        content: '';
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 8px solid var(--background-color);
        position: absolute;
        bottom: -12px;
        right: 50%;
        transform: translate(50%, -50%);
      }
    }
  }

  &.on-right {
    transform: translateY(-50%);
    margin-left: -3px;
    background-color: var(--background-color);

    &.is-indicator {
      &::after {
        content: '';
        border-top: 5px solid transparent;
        border-right: 8px solid var(--background-color);
        border-bottom: 5px solid transparent;
        position: absolute;
        top: 50%;
        left: -8px;
        transform: translateY(-50%);
      }
    }
  }

  &.on-bottom {
    transform: translateX(-50%);
    margin-top: -4px;
    background-color: var(--background-color);

    &.is-indicator {
      &::after {
        content: '';
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-bottom: 8px solid var(--background-color);
        position: absolute;
        top: -8px;
        right: 50%;
        transform: translate(50%, 0%);
      }
    }
  }

  &.on-left {
    transform: translateY(-50%);
    background-color: var(--background-color);
    margin-right: -3px;

    &.is-indicator {
      &::after {
        content: '';
        border-bottom: 5px solid transparent;
        border-top: 5px solid transparent;
        border-left: 8px solid var(--background-color);
        position: absolute;
        top: 50%;
        right: -7px;
        transform: translateY(-50%);
      }
    }
  }
}

*,
*::after,
*::before {
  box-sizing: border-box;
}

.tooltip {
  cursor: pointer;
  user-select: none;
  position: relative;

  &.is-disabled {
    cursor: initial;
  }
}

.tooltip-buffer {
  position: absolute;
  &--top {
    left: 0;
    top: 20px;
  }

  &--right {
    left: -20px;
    top: 0;
  }

  &--bottom {
    left: 0;
    top: -20px;
  }

  &--left {
    right: -20px;
    top: 0;
  }

  height: 100%;
  width: 100%;
  z-index: -10;
}

.demo {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 5px;

  .demo-label {
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 600;
    margin: 0;
    padding: 10px 0;
  }
}
