/* ============================================================
   glossary.css — Inline term tooltips
   Shared across all subjects (copy to each subject folder)
   ============================================================ */

/* Highlighted term in question/answer text */
.gl-term {
  border-bottom: 2px dotted #e65100;
  cursor: help;
  color: inherit;
  white-space: nowrap;
}
.gl-term:hover {
  background: #fff3e0;
  border-radius: 2px;
}

/* Floating popup */
#gl-popup {
  display: none;
  position: absolute;
  z-index: 9999;
  background: white;
  border: 2px solid #e65100;
  border-radius: 8px;
  padding: 14px 16px;
  max-width: 300px;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
  font-family: Arial, sans-serif;
  font-size: 10.5pt;
  line-height: 1.5;
}
#gl-popup .gl-title {
  font-weight: bold;
  color: #e65100;
  font-size: 11pt;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#gl-popup .gl-def {
  color: #333;
}
#gl-popup .gl-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14pt;
  color: #aaa;
  line-height: 1;
  padding: 0 0 0 8px;
}
#gl-popup .gl-close:hover { color: #e65100; }

/* Glossary badge shown on each question page */
.gl-badge {
  display: inline-block;
  background: #fff3e0;
  border: 1px solid #e65100;
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 9pt;
  color: #e65100;
  margin-bottom: 6px;
  cursor: default;
}

/* Print: hide all glossary decoration */
@media print {
  .gl-term {
    border-bottom: none !important;
    background: none !important;
  }
  #gl-popup, .gl-badge { display: none !important; }
}
