@import 'assets/scss/fonts.scss';
@import 'assets/scss/colors.scss';

.tooltipContainer.top {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  width: 100%;
}

.tooltipContainer.right {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
}

.tooltipContainer.bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.tooltipContainer.left {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  width: 100%;
}

.tooltipContainer.topLeft {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  width: 100%;
}

.tooltipContainer.topRight {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
}

.tooltipContainer.bottomLeft {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  width: 100%;
}

.tooltipContainer.bottomRight {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
}

.tooltipContent {
  @include font-s-bold;
  display: flex;
  background: var(--color-tooltip-gray);
  border-radius: 4px;
  padding: 4px 6px;
  color: var(--color-tooltip-text-gray);
  position: relative;
  z-index: 4;
  opacity: 0;
  visibility: hidden;
}

.hoverElement:hover ~ .tooltipContent.top {
  display: flex;
  flex-direction: column;
  line-height: 14px;
  white-space: nowrap;
  margin-bottom: 12px;
  opacity: 1;
  transition: opacity 150ms ease-in 150ms;
  visibility: visible;
}

.hoverElement:hover ~ .tooltipContent.right {
  display: flex;
  line-height: 14px;
  white-space: nowrap;
  margin-left: 12px;
  opacity: 1;
  transition: opacity 150ms ease-in 150ms;
  visibility: visible;
}

.hoverElement:hover ~ .tooltipContent.bottom {
  display: flex;
  line-height: 14px;
  white-space: nowrap;
  margin-top: 12px;
  opacity: 1;
  transition: opacity 150ms ease-in 150ms;
  visibility: visible;
}

.hoverElement:hover ~ .tooltipContent.left {
  display: flex;
  line-height: 14px;
  white-space: nowrap;
  margin-right: 12px;
  opacity: 1;
  transition: opacity 150ms ease-in 150ms;
  visibility: visible;
}

.hoverElement:hover ~ .tooltipContent.topLeft {
  display: flex;
  line-height: 14px;
  white-space: nowrap;
  bottom: 38px;
  opacity: 1;
  transition: opacity 150ms ease-in 150ms;
  visibility: visible;
}

.hoverElement:hover ~ .tooltipContent.topRight {
  display: flex;
  line-height: 14px;
  white-space: nowrap;
  bottom: 38px;
  opacity: 1;
  transition: opacity 150ms ease-in 150ms;
  visibility: visible;
}

.hoverElement:hover ~ .tooltipContent.bottomLeft {
  display: flex;
  line-height: 14px;
  white-space: nowrap;
  top: 38px;
  opacity: 1;
  transition: opacity 150ms ease-in 150ms;
  visibility: visible;
}

.hoverElement:hover ~ .tooltipContent.bottomRight {
  display: flex;
  line-height: 14px;
  white-space: nowrap;
  top: 38px;
  opacity: 1;
  transition: opacity 150ms ease-in 200ms;
  visibility: visible;
}

.hoverElement ~ .tooltipContent.top::after {
  content: '';
  position: absolute;
  top: 100%;
  right: calc(50% - 5px);
  border-width: 5px;
  border-style: solid;
  border-color: var(--color-tooltip-gray) transparent transparent transparent;
}

.hoverElement ~ .tooltipContent.right::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 100%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent var(--color-tooltip-gray) transparent transparent;
}

.hoverElement ~ .tooltipContent.bottom::after {
  content: '';
  position: absolute;
  bottom: 100%;
  right: calc(50% - 5px);
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent var(--color-tooltip-gray) transparent;
}

.hoverElement ~ .tooltipContent.left::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 100%;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent transparent var(--color-tooltip-gray);
}

.hoverElement ~ .tooltipContent.topLeft::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 10px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--color-tooltip-gray) transparent transparent transparent;
}

.hoverElement ~ .tooltipContent.topRight::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 10px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--color-tooltip-gray) transparent transparent transparent;
}

.hoverElement ~ .tooltipContent.bottomLeft::after {
  content: '';
  position: absolute;
  bottom: 100%;
  right: 10px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent var(--color-tooltip-gray) transparent;
}

.hoverElement ~ .tooltipContent.bottomRight::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 10px;
  margin-top: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: transparent transparent var(--color-tooltip-gray) transparent;
}
