/* Shared tooltip style (portal-wide) */
.tooltip-pop{
  position: absolute;
  z-index: 99999;
  padding: 2px 8px 3px;
  font-size: 11px;
  line-height: 16px;
  font-weight: 400;
  background: rgba(0,0,0,.9);
  color: #fff;
  opacity: 0;
  transition: margin .3s, opacity .3s;
  -o-transition: margin .3s, opacity .3s;
  -ms-transition: margin .3s, opacity .3s;
  -moz-transition: margin .3s, opacity .3s;
  -webkit-transition: margin .3s, opacity .3s;
  border-radius: 4px;
  box-shadow: 0 8px 20px rgba(0,0,0,1);
  max-width: min(320px, calc(100vw - 16px));
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.tooltip-pop.show{ opacity: 1; }
.tooltip-pop::after{
  content:"";
  position:absolute;
  width:6px;
  height:6px;
  background: rgba(0,0,0,.9);
  transform: rotate(45deg);
}
.tooltip-pop[x-placement^="top"]::after{
  left: calc(50% - 3px);
  bottom: -5px;
}
.tooltip-pop[x-placement^="bottom"]::after{
  left: calc(50% - 3px);
  top: -5px;
}
.tooltip-pop[x-placement^="left"]::after{
  right: -5px;
  top: calc(50% - 3px);
}
.tooltip-pop[x-placement^="right"]::after{
  left: -5px;
  top: calc(50% - 3px);
}

@media (max-width: 576px){
  .tooltip-pop{
    max-width: calc(100vw - 12px);
    font-size: 12px;
    line-height: 17px;
    padding: 4px 9px;
  }
}

/* Small help marker used near metric labels/titles */
.hint-q{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  color: #d8ecff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  margin-left: 6px;
  vertical-align: middle;
  cursor: help;
  user-select: none;
  background: rgba(120,169,255,.12);
}
