/* =========================================================
   GLOSSARY TOOLTIP & NEON HIGHLIGHT SYSTEM
   Portofolio Digital Guru — Diah Pitaloka, S.Pd.I
   ========================================================= */

/* ── Interactive Glossary Term (Neon Glow on Hover) ── */
.glossary-term {
  position: relative;
  display: inline;
  cursor: pointer !important;
  color: #5eead4;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1.5px dashed rgba(45, 212, 191, 0.7);
  padding: 1px 4px;
  border-radius: 4px;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: text;
}

.glossary-term:hover,
.glossary-term.active-hover {
  color: #ffffff;
  background: rgba(13, 148, 136, 0.28);
  border-bottom-color: #2dd4bf;
  text-shadow: 0 0 10px rgba(45, 212, 191, 0.9), 0 0 20px rgba(13, 148, 136, 0.6);
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.45);
  transform: translateY(-1px);
}

.glossary-term:active {
  transform: scale(0.98);
}

/* Subtle glowing pulse badge for high-priority terms */
.glossary-term--mumtaz {
  color: #fbbf24;
  border-bottom-color: rgba(251, 191, 36, 0.7);
}

.glossary-term--mumtaz:hover {
  color: #fff;
  background: rgba(245, 158, 11, 0.28);
  border-bottom-color: #f59e0b;
  text-shadow: 0 0 10px rgba(245, 158, 11, 0.9);
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
}

/* ── Floating Smart Tooltip Card ── */
.glossary-tooltip-card {
  position: fixed;
  z-index: 99999;
  width: 330px;
  max-width: calc(100vw - 32px);
  background: rgba(11, 18, 33, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(45, 212, 191, 0.45);
  border-radius: 14px;
  padding: 14px 16px;
  color: #f1f5f9;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 25px rgba(13, 148, 136, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.97);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.45;
}

/* Invisible hover bridge to eliminate gap between word and card */
.glossary-tooltip-card::before {
  content: '';
  position: absolute;
  inset: -14px;
  z-index: -1;
  pointer-events: auto;
}

.glossary-tooltip-card.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header badge & title */
.glossary-tooltip-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.glossary-tooltip-title-wrap {
  display: flex;
  flex-direction: column;
}

.glossary-tooltip-word {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.glossary-tooltip-origin {
  font-size: 0.72rem;
  color: #2dd4bf;
  font-style: italic;
  margin-top: 1px;
}

.glossary-tooltip-category {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.2);
  color: #5eead4;
  border: 1px solid rgba(45, 212, 191, 0.35);
  white-space: nowrap;
}

/* Body explanation */
.glossary-tooltip-body {
  font-size: 0.82rem;
  color: #cbd5e1;
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Action button to full guide */
.glossary-tooltip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  gap: 8px;
}

.glossary-tooltip-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ffffff !important;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.9), rgba(20, 184, 166, 0.95));
  border: 1px solid #2dd4bf;
  padding: 6px 14px;
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.45);
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.glossary-tooltip-link:hover {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  border-color: #5eead4;
  box-shadow: 0 0 18px rgba(45, 212, 191, 0.75);
  transform: translateY(-1px);
}

.glossary-tooltip-tip {
  font-size: 0.68rem;
  color: #94a3b8;
  line-height: 1.3;
}

/* Arrow pointer */
.glossary-tooltip-arrow {
  position: absolute;
  width: 10px;
  height: 10px;
  background: rgba(11, 18, 33, 0.96);
  border-left: 1px solid rgba(45, 212, 191, 0.45);
  border-top: 1px solid rgba(45, 212, 191, 0.45);
  transform: rotate(45deg);
  pointer-events: none;
}
