/**
 * Glossary Tooltip Styles
 *
 * Glass panel tooltips for technical terms.
 * Matches the site's neon aesthetic.
 */

/* ============================================
   Term Indicators
   ============================================ */

.glossary-term {
  position: relative;
  border-bottom: 1px dotted rgba(0, 229, 255, 0.5);
  cursor: help;
  transition: border-color 200ms ease;
}

.glossary-term:hover,
.glossary-term:focus {
  border-bottom-color: var(--neon-cyan, #00e5ff);
  border-bottom-style: solid;
  outline: none;
}

.glossary-term:focus-visible {
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.25);
  border-radius: 2px;
}

/* ============================================
   Tooltip Container
   ============================================ */

.glossary-tooltip {
  position: fixed;
  z-index: 9999;
  width: min(320px, 90vw);
  padding: 16px 20px;

  /* Glass panel background */
  background: linear-gradient(160deg, rgba(6, 14, 36, 0.94), rgba(12, 18, 42, 0.96));
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);

  /* Border & shadow */
  border: 1px solid rgba(79, 240, 255, 0.3);
  border-radius: 18px;
  box-shadow:
    0 16px 48px rgba(3, 10, 32, 0.55),
    0 0 24px rgba(0, 229, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  /* Typography */
  font-family: var(--font-body, 'Manrope', sans-serif);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-primary, #eaf2ff);
  text-shadow: var(--mcd-text-outline-shadow, none);

  /* Animation */
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
  transition:
    opacity 200ms cubic-bezier(0.25, 0.8, 0.25, 1),
    transform 200ms cubic-bezier(0.25, 0.8, 0.25, 1);
}

.glossary-tooltip.is-visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* ============================================
   Tooltip Content
   ============================================ */

.glossary-tooltip__term {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--neon-cyan, #00e5ff);
  letter-spacing: 0.02em;
}

.glossary-tooltip__definition {
  color: var(--text-secondary, #c5d8f2);
  font-weight: 400;
}

/* ============================================
   Reduced Motion
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  .glossary-term {
    transition: none;
  }

  .glossary-tooltip {
    transition: opacity 0ms;
    transform: none;
  }

  .glossary-tooltip.is-visible {
    transform: none;
  }
}

/* ============================================
   Mobile Adjustments
   ============================================ */

@media (max-width: 600px) {
  .glossary-tooltip {
    width: min(280px, 85vw);
    padding: 14px 16px;
    font-size: 0.85rem;
    border-radius: 14px;
  }

  .glossary-tooltip__term {
    font-size: 0.9rem;
  }
}
