/* Tooltip icon and bubble styles */
.tooltip-container {
    display: inline-block;
    position: relative; /* only for stacking context */
  }
  
  .tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: .9rem;
    height: .9rem;
    line-height: 1rem;     /* make the text sit in the vertical middle */
    vertical-align: middle;  /* align the whole circle to the middle of the text line */
    justify-content: center;
    align-items: center;
    background: #535353;
    color: #eee;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
  }
  
  /* Tooltip bubble styling */
  .tooltip-bubble {
    position: fixed;
    max-width: 150px;
    padding: 0.5rem;
    background: #252525;
    color: #eee;
    border-radius: 5px;
    font-size: 12px;
    line-height: 12px;
    word-wrap: break-word;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    white-space: pre-line;

    /* arrow offset from JS via --arrow-left */
    --arrow-left: 50%;       /* fallback center */
  }
  
  .tooltip-container:hover .tooltip-bubble {
    opacity: 1;
    pointer-events: auto;
  }
  
  /* Speech bubble arrow */
  .tooltip-bubble::after {
    content: '';
    position: absolute;
    top: 100%;               /* place it just below the bubble */
    left: var(--arrow-left); /* use the computed offset */
    transform: translateX(-50%);
    border-width: 6px;       /* size of the arrow */
    border-style: solid;
    border-color: 
      #252525    /* arrow fill color */
      transparent transparent transparent;
  }
  
/* show on hover, focus, or when JS adds `.show` */
.tooltip-container:hover .tooltip-bubble,
.tooltip-container:focus-within .tooltip-bubble,
.tooltip-container.show .tooltip-bubble {
  opacity: 1;
  pointer-events: auto;
}

