/* Shared hover/focus hint (frontend/ui/tooltip.js) — the Control UI's <openclaw-tooltip> look
   (ui/src/components/solid/tooltip.css, tooltip.tsx; 9.7: ui/src/components/tooltip.ts static styles over Web Awesome's tooltip). */
.cc-tip {
  position: fixed;
  z-index: 100000;
  max-width: min(260px, calc(100vw - 16px));
  padding: 5px 7px;
  border: 1px solid var(--overlay-border, var(--border-strong));
  border-radius: var(--radius-md, 10px);
  background: color-mix(in srgb, var(--bg-elevated) 97%, var(--text) 3%);
  color: var(--text);
  box-shadow: var(--overlay-shadow, var(--shadow-md));
  font-family: var(--font-body, inherit);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: pre-line; /* Control UI tooltip.css: multi-line content keeps its line breaks */
  pointer-events: none;
  animation: cc-tip-in var(--wa-transition-fast, 75ms) ease;
}

/* A command (tool row hover, [data-tooltip-code]): code font, wide, wraps only where it must (not at the
   hyphens in paths), keeps its line breaks, at most 12 lines. Same surface as the row's Input block
   (.activity-detail-pre), so hover and click show the command alike, lifted off the rows it covers. */
.cc-tip.cc-tip--code {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg, 0 12px 28px rgb(0 0 0 / 0.24));
  border-radius: 6px;
  padding: 6px 9px;
  max-width: min(640px, calc(100vw - 16px));
  max-height: calc(12 * 1.4em + 10px);
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Web Awesome's tooltip show: fade + scale from 0.8 toward the trigger */
.cc-tip[data-side="top"] { transform-origin: bottom center; }
.cc-tip[data-side="bottom"] { transform-origin: top center; }

@keyframes cc-tip-in {
  from { opacity: 0; transform: scale(0.8); }
}

@media (prefers-reduced-motion: reduce) {
  .cc-tip { animation: none; }
}
