/* Paragraph read-aloud: play control + highlight (preserves inline course markup) */

p.nexus-readaloud-p {
  position: relative;
  padding-left: 2.75rem;
}

.nexus-readaloud-btn {
  position: absolute;
  left: 0;
  top: 0.15em;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: #0d9488;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  transition: background 0.15s ease, transform 0.1s ease;
}

.nexus-readaloud-btn:hover {
  background: #0f766e;
}

.nexus-readaloud-btn:active {
  transform: scale(0.96);
}

.nexus-readaloud-btn:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
}

.nexus-readaloud-btn svg {
  width: 0.85rem;
  height: 0.85rem;
}

p.nexus-readaloud-p.nexus-readaloud-playing {
  background: rgba(13, 148, 136, 0.12);
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.28);
  border-radius: 0.35rem;
  transition: background-color 0.12s ease, box-shadow 0.12s ease;
}

article.dark p.nexus-readaloud-p.nexus-readaloud-playing {
  background: rgba(45, 212, 191, 0.16);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.32);
}

/* Keep bio / gloss / blank targets clickable above the highlight */
p.nexus-readaloud-p x-bio,
p.nexus-readaloud-p x-gloss,
p.nexus-readaloud-p x-blank,
p.nexus-readaloud-p x-blank-mc {
  position: relative;
  z-index: 1;
}
