/* Glossar – Link- & Tooltip-Styling (eigene Formatierung, kein title-Tooltip).
   Gehört zu assets/js/glossar.js. Light-Mode-Variablen aus harnorgane.html
   werden mitbenutzt; Fallbacks unten, falls die Seite eigene Werte hat. */

/* Verlinkter Fachbegriff */
.term-link {
  cursor: pointer;
  border-bottom: 1px dotted var(--accent, #b8860b);
  border-radius: 2px;
  transition: background-color .12s, color .12s;
  outline: none;
}
.term-link:hover,
.term-link:focus-visible {
  background: color-mix(in srgb, var(--accent, #b8860b) 14%, transparent);
  color: var(--accent, #b8860b);
}
.term-link:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #b8860b) 45%, transparent);
}
/* Begriff ohne Glossareintrag: still, kein Link */
.term-missing {
  cursor: default;
}

/* Tooltip-Box */
.gloss-tip {
  position: fixed;
  z-index: 300;
  left: 0;
  top: 0;
  max-width: 340px;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid var(--line, #d9e2e6);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 30, 50, .18);
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  transform: translateY(3px);
  transition: opacity .12s ease, transform .12s ease, visibility .12s;
  pointer-events: none;
}
.gloss-tip.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto; /* sichtbare Box ist erreichbar/anklickbar */
}
.gloss-tip .gt-term {
  font-weight: 700;
  color: var(--accent, #b8860b);
  font-size: 14px;
  margin-bottom: 2px;
}
.gloss-tip .gt-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2px;
  color: var(--primary, #0d6b6e);
  background: color-mix(in srgb, var(--primary, #0d6b6e) 10%, transparent);
  border-radius: 999px;
  padding: 1px 8px;
  margin-bottom: 6px;
}
.gloss-tip .gt-kurz {
  color: #374151;
}
.gloss-tip .gt-more {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary, #0d6b6e);
  border-top: 1px solid var(--line, #d9e2e6);
  padding-top: 6px;
  cursor: pointer; /* als Link erkennbar */
  transition: color .12s;
}
.gloss-tip .gt-more:hover {
  color: var(--accent, #b8860b);
  text-decoration: underline;
}

/* kleiner Pfeil */
.gloss-tip::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -6px;
  background: #ffffff;
  border-right: 1px solid var(--line, #d9e2e6);
  border-bottom: 1px solid var(--line, #d9e2e6);
  transform: rotate(45deg);
}
.gloss-tip.below::after {
  bottom: auto;
  top: -6px;
  border: 0;
  border-left: 1px solid var(--line, #d9e2e6);
  border-top: 1px solid var(--line, #d9e2e6);
}

@media print {
  .gloss-tip { display: none !important; }
  .term-link { border-bottom: 0; }
}
