:host {
  display: inline-block;
}

:host>.sui-tooltip {
  display: block;
  position: relative !important;
}

:host>.sui-tooltip>.sui-tool {
  text-align: inherit;
}

:host>.sui-tooltip .sui-tip {
  min-width: 100%;
  display: none;
  position: absolute;
  box-sizing: border-box;
  bottom: calc(100% + 8px);
  top: unset;
  left: 0;
  right: unset;
}

:host>.sui-tooltip.bottom .sui-tip {
  top: calc(100% + 8px);
  bottom: unset;
}

:host>.sui-tooltip.left .sui-tip {
  left: unset;
  right: 0;
}

:host>.sui-tooltip:hover .sui-tip {
  display: block;
}

:host>.sui-tooltip:hover .tip-arrow {
  display: block;
}

.tip-arrow {
  display: none;
  position: absolute;
  width: 0;
  height: 0;
  left: 50%;
  transform: translateX(-50%);
}

.tip-arrow.bottom {
  z-index: 1;
  top: calc(100% + 5px);
  bottom: unset;
  border: 4px solid transparent;
  border-top-width: 0;
  border-bottom-width: 4px;
  border-bottom-color: var(--tip-background-color);
  ;
}

.tip-arrow.top {
  top: unset;
  bottom: calc(100% + 5px);
  border: 4px solid transparent;
  border-bottom-width: 0;
  border-top-width: 4px;
  border-top-color: var(--tip-background-color);
}

::slotted([slot='tip']) {
  /* slot1 every slotted element - YES */
  white-space: pre;
  overflow: hidden;
}