/* Shared tooltip (TASK-170, SPEC §3.6, T8). Position is set through CSSOM only (T12). */
#xp-tip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1100; /* above #xp-help */
  box-sizing: border-box;
  max-width: min(280px, 90vw);
  padding: 8px 12px;
  border-radius: var(--sc-radius-sm);
  background: var(--sc-color-tooltip-bg);
  color: var(--sc-color-tooltip-text);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  box-shadow: var(--sc-shadow-1);
  border: 1px solid var(--sc-color-border);
}
#xp-tip[hidden] { display: none; }
/* Invisible bridge so the pointer can travel from the target onto the tooltip (WCAG 1.4.13). */
#xp-tip::before { content: ""; position: absolute; inset: -6px; z-index: -1; }

[data-tip] { -webkit-touch-callout: none; touch-action: manipulation; }
button[data-tip] { -webkit-user-select: none; user-select: none; }

.xp-tip-info {
  min-width: 24px;
  min-height: 24px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: help;
}
.xp-tip-info:focus-visible, .xp-tip-wrap:focus-visible { outline: var(--sc-focus-width) solid var(--sc-color-focus-ring); outline-offset: 2px; }
.xp-tip-wrap { display: inline-block; }
.xp-tip-wrap > :disabled { pointer-events: none; }
@media (pointer: coarse) {
  .xp-tip-info { min-width: 44px; min-height: 44px; }
}
