/* tooltip.css */

.tooltip-bubble {
  display: none;
  position: fixed;
  max-width: 80vw;
  word-wrap: break-word;
  z-index: 9999;
  background-color: #333;
  color: #fff;
  padding: 6px 10px;
  font-size: 0.75rem;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  transition: opacity 0.15s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(2px);
}

.tooltip-bubble.is-measuring {
  display: block;
  opacity: 0;
  visibility: hidden;
}

.tooltip-bubble.is-visible {
  display: block;
  opacity: 0.95;
  visibility: visible;
  transform: translateY(0);
}

.tooltip-bubble.bottom-edge {
  top: auto !important;
  bottom: 10px !important;
}

.tooltip-bubble.right-edge {
  left: auto !important;
  right: 10px !important;
}

/* Tooltip wrapper ensures layout stability */
.tooltip-wrapper {
  display: inline-block;
  position: relative;
}

/* Allow tooltips to show on disabled buttons */
.tooltip-wrapper .has-tooltip[disabled] {
  pointer-events: auto;
  opacity: 0.5;
  cursor: not-allowed;
}

.has-tooltip::after {
  content: none !important;
  display: none !important;
  white-space: nowrap;
}
