:host {
  display: inline-block;
}
:host .tooltip-wrapper {
  width: 100%;
  display: inline-block;
  position: relative;
}
:host .tooltip-wrapper .tooltip {
  display: block;
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 999;
  border-radius: 0.3rem;
  background: var(--main-color, black);
  color: white;
  padding: 1rem 1.5rem;
}
:host .tooltip-wrapper .tooltip::before {
  border: 0.6rem solid transparent;
  content: "";
  position: absolute;
}

:host(.bottom) .tooltip-wrapper .tooltip {
  position: absolute;
  top: calc(100% + 1.2rem);
  left: 50%;
  transform: translateX(-50%);
}
:host(.bottom) .tooltip-wrapper .tooltip::before {
  top: -1.1rem;
  left: calc(50% - .6rem);
  border-bottom-color: var(--main-color, black);
}

:host(.top) .tooltip-wrapper .tooltip {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, calc(-100% - 1.2rem));
  opacity: 1;
}
:host(.top) .tooltip-wrapper .tooltip::before {
  bottom: -1.1rem;
  left: calc(50% - .6rem);
  border-top-color: var(--main-color, black);
}

:host(.left) .tooltip-wrapper .tooltip {
  position: absolute;
  top: 50%;
  left: -1.2rem;
  transform: translate(-100%, -50%);
  opacity: 1;
}
:host(.left) .tooltip-wrapper .tooltip::before {
  right: -1.1rem;
  top: calc(50% - .6rem);
  border-left-color: var(--main-color, black);
}

:host(.right) .tooltip-wrapper .tooltip {
  position: absolute;
  top: 50%;
  left: calc(100% + 1.2rem);
  transform: translate(0, -50%);
  opacity: 1;
}
:host(.right) .tooltip-wrapper .tooltip::before {
  left: -1.1rem;
  top: calc(50% - .6rem);
  border-right-color: var(--main-color, black);
}