/* ===== GLOSSARY TOOLTIP SYSTEM ===== */
/* Shared across all kalmydas.com pages */

.g-term {
  color: var(--gold-light, #e8d48b);
  cursor: pointer;
  border-bottom: 1px dotted var(--gold-dark, #9a7a2e);
  position: relative;
  transition: color 0.2s;
}

.g-term:hover {
  color: var(--gold, #c9a84c);
}

.g-term::after {
  content: '*';
  font-size: 0.65em;
  vertical-align: super;
  margin-left: 1px;
  color: var(--gold-dark, #9a7a2e);
  opacity: 0.7;
}

/* Tooltip popup */
.g-tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 340px;
  padding: 14px 18px;
  background: #1a1a28;
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 168, 76, 0.1);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
}

.g-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.g-tooltip-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: #c9a84c;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.g-tooltip-text {
  font-size: 0.85rem;
  color: #b0b0c0;
  line-height: 1.6;
}

.g-tooltip-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: #666;
  font-size: 1rem;
  cursor: pointer;
  padding: 2px 6px;
  line-height: 1;
  transition: color 0.2s;
}

.g-tooltip-close:hover {
  color: #c9a84c;
}

/* Small arrow */
.g-tooltip::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 24px;
  width: 12px;
  height: 12px;
  background: #1a1a28;
  border-top: 1px solid rgba(201, 168, 76, 0.3);
  border-left: 1px solid rgba(201, 168, 76, 0.3);
  transform: rotate(45deg);
}

.g-tooltip.above::before {
  top: auto;
  bottom: -6px;
  border-top: none;
  border-left: none;
  border-bottom: 1px solid rgba(201, 168, 76, 0.3);
  border-right: 1px solid rgba(201, 168, 76, 0.3);
}

/* Mobile */
@media (max-width: 600px) {
  .g-tooltip {
    left: 10px !important;
    right: 10px !important;
    max-width: none;
  }
}
