/* Hover-glossary trigger + popover. No color/geometry change on hover per
   the site's state-never-changes-geometry rule — only the dotted underline
   marks a term as interactive; the popover itself uses a hairline border,
   not a shadow, to stay consistent with the rest of the theme. */

.glossary-term {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-decoration: underline dotted currentColor 1px;
  text-underline-offset: 2px;
}

.glossary-term:focus-visible {
  outline: 2px solid #12a594;
  outline-offset: 2px;
  border-radius: 2px;
}

.glossary-popover {
  position: fixed;
  z-index: 1000;
  width: 300px;
  max-width: calc(100vw - 16px);
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  font-size: 0.72rem;
  line-height: 1.45;
}

.glossary-popover__label {
  font-size: 1.05em;
  font-weight: 600;
  margin-bottom: 0.3rem;
  padding-right: 1.2rem;
}

.glossary-popover__body {
  color: var(--md-default-fg-color--light, currentColor);
}

.glossary-popover code {
  font-family: var(--md-code-font, monospace);
  font-size: 0.92em;
  background-color: var(--md-code-bg-color);
  color: var(--md-code-fg-color);
  border-radius: 2px;
  padding: 0 0.25em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.glossary-popover__close {
  position: absolute;
  top: 0.4rem;
  right: 0.5rem;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  background: none;
  border: none;
  color: var(--md-default-fg-color);
  opacity: 0.55;
  cursor: pointer;
  padding: 0.15rem;
}

.glossary-popover__close:hover {
  opacity: 1;
}
