/* Tooltip wrapper container */
.tooltip-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: help;
  flex-shrink: 0;
}

/* Tooltip box — appears below the icon */
.tooltip-wrapper::before {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 10px);
  bottom: auto;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);

  background-color: #111827;
  color: #f9fafb;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
  min-width: 200px;
  max-width: 280px;
  white-space: normal;
  word-wrap: break-word;
  text-align: left;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22), 0 2px 6px rgba(0, 0, 0, 0.12);
  letter-spacing: 0.01em;

  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

/* Arrow — sits above the box, points up toward the icon */
.tooltip-wrapper::after {
  content: '';
  position: absolute;
  top: 100%;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);

  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid #111827;
  border-top: none;

  z-index: 200;
  opacity: 0;
  transition: opacity 180ms ease;
}

/* Show on hover */
.tooltip-wrapper:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.tooltip-wrapper:hover::after {
  opacity: 1;
}

/* Icon color transitions */
.tooltip-wrapper svg {
  display: block;
  color: #9ca3af;
  transition: color 150ms ease;
}
.tooltip-wrapper:hover svg {
  color: #4b5563;
}
