/* Wikipedia tooltip shared styles */
.wiki-term {
  border-bottom: 1px dashed #94a3b8; /* slate-400 */
  cursor: help;
}

.wiki-tip {
  position: fixed;
  max-width: 420px;
  background: #ffffff;
  color: #1f2937; /* stone-800 */
  border: 2px solid #94a3b8; /* slate-400 */
  border-radius: 0.75rem;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.14);
  padding: 12px 14px 10px;
  z-index: 9999;
  font-size: 14px;
  line-height: 1.6;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .14s ease, transform .14s ease;
  pointer-events: auto;
}
.wiki-tip.show { opacity: 1; transform: translateY(0); }

/* arrow */
.wiki-tip::after {
  content: '';
  position: absolute;
  width: 10px; height: 10px;
  background: #ffffff;
  border-left: 2px solid #94a3b8; /* slate-400 */
  border-top: 2px solid #94a3b8; /* slate-400 */
  transform: rotate(45deg);
  left: calc(50% - 6px);
}
.wiki-tip.below::after { top: -6px; }
.wiki-tip.above::after { bottom: -6px; }

/* sections (optional) */
.wiki-tip .wiki-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.wiki-tip .wiki-title { font-weight: 800; font-size: 15px; color: #0f766e; /* teal-800 */ }
.wiki-tip .wiki-desc { color: #334155; /* slate-700 */ }
.wiki-tip .wiki-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.wiki-tip .wiki-link { font-size: 12px; color: #0ea5e9; text-decoration: underline; }
.wiki-tip .wiki-close { appearance: none; border: 1px solid #e5e7eb; background: #f8fafc; color: #334155; border-radius: 6px; padding: 2px 6px; font-size: 12px; line-height: 1; cursor: pointer; }
.wiki-tip .wiki-close:hover { background: #eef2f7; }

/* footer (source at bottom-right) */
.wiki-tip .wiki-footer { display: flex; justify-content: flex-end; margin-top: 8px; }
.wiki-tip .wiki-source { font-size: 12px; color: #64748b; text-decoration: none; border-bottom: 1px dotted #94a3b8; }
.wiki-tip .wiki-source:hover { color: #334155; text-decoration: underline; }
