.tooltip-trigger {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  text-decoration: underline dotted var(--text-muted);
  text-underline-offset: 3px;
  cursor: help;
}

.tooltip-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.tooltip-content {
  margin: auto;
  width: max-content;
  max-width: min(24rem, calc(100vw - 16px));
  max-height: calc(100vh - 16px);
  padding: 10px 12px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

@supports (position-area: bottom span-right) {
  .tooltip-content {
    inset: auto;
    margin: 0;
    position-area: bottom span-right;
    position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
  }
}
