/* Glossary term popover — shared module for /learn/ pages.
   Loaded via /_partials/glossary-popover.html. Paired with glossary-popover.js. */

.gloss-term {
  border-bottom: 1px dotted var(--gold, #d4af37);
  cursor: help;
  color: inherit;
  text-decoration: none;
}
.gloss-term:hover,
.gloss-term:focus-visible {
  background: rgba(212, 175, 55, 0.13);
  outline: none;
  border-radius: 2px;
}

.gloss-pop {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: max-content;
  max-width: min(320px, calc(100vw - 24px));
  background: var(--bg-card, #11161f);
  border: 1px solid var(--gold-dim, #c9a24b);
  border-radius: 8px;
  padding: 13px 15px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--text, #e7e6e1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
}
.gloss-pop.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.gloss-pop-term {
  display: block;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gold, #d4af37);
  margin: 0 0 6px;
}
.gloss-pop-def {
  display: block;
  margin: 0 0 10px;
}
.gloss-pop-link {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold, #d4af37);
  text-decoration: none;
  white-space: nowrap;
}
.gloss-pop-link:hover {
  text-decoration: underline;
}

.gloss-pop-arrow {
  position: absolute;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: var(--bg-card, #11161f);
  border-left: 1px solid var(--gold-dim, #c9a24b);
  border-top: 1px solid var(--gold-dim, #c9a24b);
}
.gloss-pop.is-below .gloss-pop-arrow { top: -6px; border-left: 1px solid var(--gold-dim, #c9a24b); border-top: 1px solid var(--gold-dim, #c9a24b); }
.gloss-pop.is-above .gloss-pop-arrow { bottom: -6px; border-left: none; border-top: none; border-right: 1px solid var(--gold-dim, #c9a24b); border-bottom: 1px solid var(--gold-dim, #c9a24b); }

@media (prefers-reduced-motion: reduce) {
  .gloss-pop { transition: none; }
}
@media print {
  .gloss-term { border-bottom: none; }
  .gloss-pop { display: none !important; }
}
