/* Tooltip container */
.tooltip-popper {
  position: absolute;
  max-width: 250px;
  padding: 8px 12px;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.80);
  /* almost black but a bit transparent */
  color: #fff;
  font-size: 0.875rem;
  /* about 14px */
  line-height: 1.4;
  font-family: "Noto Sans", Arial, sans-serif;
  /* match menu font if known */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease-out, transform 0.12s ease-out;
  pointer-events: none;
}

/* When visible */
.tooltip-popper.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Arrow */
.tooltip-popper::before {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border: 6px solid transparent;
}

.tooltip-popper[data-placement="top"]::before {
  border-top-color: rgba(0, 0, 0, 0.85);
  bottom: -12px;
  left: 48%;
}

.tooltip-popper[data-placement="bottom"]::before {
  border-bottom-color: rgba(0, 0, 0, 0.85);
  top: -12px;
  left: 48%;
}

/* Responsive / small screens */
@media (max-width: 640px) {
  .tooltip-popper {
    max-width: 90%;
    left: 5% !important;
    right: 5% !important;
    bottom: 10px !important;
    transform: translateY(0);
    position: fixed;
    font-size: 1rem;
    padding: 10px 14px;
    border-radius: 6px;
  }
}

/* Optional, to style the li items similarly */
.custom-graph-header__menu li {
  position: relative;
}

.custom-graph-header__menu li:hover,
.custom-graph-header__menu li:focus {
  cursor: pointer;
  background-color: #f0f0f0;
  /* light grey hover like site menus */
}