/**
 * Floating help tooltips (data-ui-tooltip). Theme-aware, replaces native title bubbles.
 */
[data-ui-tooltip] {
  cursor: help;
}

.ui-tooltip {
  position: fixed;
  z-index: 10050;
  max-width: 20rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.45;
  font-weight: 400;
  pointer-events: none;
  color: var(--color-base-50, #f8fafc);
  background: var(--color-base-900, #0f172a);
  border: 1px solid var(--color-base-700, #334155);
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.12),
    0 10px 20px -4px rgb(0 0 0 / 0.18);
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.12s ease,
    transform 0.12s ease;
}

.ui-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ui-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  transform: rotate(45deg);
  background: inherit;
  border-right: 1px solid var(--color-base-700, #334155);
  border-bottom: 1px solid var(--color-base-700, #334155);
}

.ui-tooltip--below::after {
  bottom: auto;
  top: -5px;
  border-right: none;
  border-bottom: none;
  border-left: 1px solid var(--color-base-700, #334155);
  border-top: 1px solid var(--color-base-700, #334155);
}

html.theme-recon-light .ui-tooltip,
html.light .ui-tooltip {
  color: var(--color-base-900, #0f172a);
  background: var(--color-base-50, #f8fafc);
  border-color: var(--color-base-300, #cbd5e1);
  box-shadow:
    0 4px 6px -1px rgb(15 23 42 / 0.08),
    0 10px 20px -4px rgb(15 23 42 / 0.12);
}
