/*
 * Tooltips Component
 *
 * Reusable info tooltip with instant hover display.
 * Usage: render 'shared/info_tooltip', text: "Your text", wide: true
 */

.info-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  cursor: help;
  vertical-align: middle;
}

.info-tooltip svg {
  width: 14px;
  height: 14px;
  color: #6b7280; /* Gray-500 */
  transition: color 0.15s ease;
}

.info-tooltip:hover svg {
  color: #374151; /* Gray-700 */
}

.info-tooltip .tooltip-content {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 12px;
  background: #1e3a5f; /* Dark blue */
  color: #ffffff; /* White text */
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  white-space: nowrap;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 9999;
  pointer-events: none;
}

/* Tooltip arrow */
.info-tooltip .tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1e3a5f; /* Match background */
}

/* Show tooltip on hover */
.info-tooltip:hover .tooltip-content {
  opacity: 1;
  visibility: visible;
}

/* Allow wider tooltips for longer text */
.info-tooltip .tooltip-content.wide {
  white-space: normal;
  width: 220px;
  text-align: center;
}
