diff --git a/ui/global.css b/ui/global.css index 3f00b22..79acbab 100644 --- a/ui/global.css +++ b/ui/global.css @@ -864,3 +864,92 @@ body { .form-input:focus, .form-select:focus, .form-textarea:focus { box-shadow: 0 0 0 3px var(--accent-dim), inset 0 1px 3px rgba(0,0,0,0.1); } + + +/* ══════════════════════════════════════════════════════════════ + Tooltip System (.tip-icon + data-tip) + Shared across all pages — do not duplicate in page-specific CSS + ══════════════════════════════════════════════════════════════ */ + +.tip-icon { + display: inline-flex; + align-items: center; + justify-content: center; + width: 15px; + height: 15px; + border-radius: 50%; + background: var(--surface-3); + color: var(--text-secondary); + font-size: 10px; + font-weight: 700; + font-style: normal; + cursor: default; + position: relative; + vertical-align: middle; + margin-left: 4px; + flex-shrink: 0; + transition: background 0.15s, color 0.15s; + user-select: none; +} + +.tip-icon:hover { + background: var(--accent-dim); + color: var(--accent); +} + +.tip-icon::after { + content: attr(data-tip); + position: absolute; + bottom: calc(100% + 8px); + left: 50%; + transform: translateX(-50%); + background: var(--surface-0, #1a1a2e); + color: var(--text, #e0e0e0); + border: 1px solid var(--border, #333); + border-radius: var(--radius-md, 6px); + padding: 8px 12px; + font-size: 12px; + font-weight: 400; + line-height: 1.5; + white-space: normal; + width: 240px; + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4); + pointer-events: none; + opacity: 0; + transition: opacity 0.15s ease; + z-index: 1000; + text-align: left; + text-transform: none; + letter-spacing: 0; +} + +.tip-icon::before { + content: ''; + position: absolute; + bottom: calc(100% + 3px); + left: 50%; + transform: translateX(-50%); + border: 5px solid transparent; + border-top-color: var(--border, #333); + pointer-events: none; + opacity: 0; + transition: opacity 0.15s ease; + z-index: 1001; +} + +.tip-icon:hover::after, +.tip-icon:hover::before { + opacity: 1; +} + +.tip-icon.tip-below::after { + bottom: auto; + top: calc(100% + 8px); +} + +.tip-icon.tip-below::before { + bottom: auto; + top: calc(100% + 3px); + border-top-color: transparent; + border-bottom-color: var(--border, #333); +}