/* [text]{.hover-img src="..."}: a photo that pops up over the words.
   assets/hover-img.lua puts the photo inside the span as img.hover-img-pic.
   It shows while the pointer is over the words, or after a tap or Tab
   (the span is focusable). The PDF prints the words only. */

.hover-img {
  position: relative;
  border-bottom: 1px dotted var(--uw-purple, #32006e);
  cursor: help;
}
.hover-img:focus { outline: none; }
.hover-img:focus-visible {
  outline: 2px solid var(--uw-purple, #32006e);
  outline-offset: 2px;
}

.hover-img .hover-img-pic {
  display: none;
  position: absolute;
  left: 0;
  top: 1.7em;
  width: 240px;
  max-width: 70vw;   /* the span is the containing block: no % widths here */
  height: auto;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  z-index: 1050;
  pointer-events: none;
}
.hover-img:hover .hover-img-pic,
.hover-img:focus .hover-img-pic { display: block; }
