/* Inline word and phrase translations */

.word-translation-word {
  position: relative;
  display: inline;
  border-bottom: 2px solid rgba(31, 124, 107, 0.45);
  cursor: help;
  text-decoration: none;
  outline: none;
  background: linear-gradient(180deg, rgba(255,255,255,0) 58%, rgba(70, 201, 174, 0.20) 58%);
  border-radius: 3px;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.word-translation-phrase {
  border-bottom-style: double;
  background: linear-gradient(180deg, rgba(255,255,255,0) 54%, rgba(255, 211, 102, 0.30) 54%);
}

.word-translation-word:hover,
.word-translation-word:focus,
.word-translation-word.active {
  color: #18233f;
  background: linear-gradient(180deg, rgba(255, 249, 224, 0.92), rgba(255, 236, 168, 0.86));
  border-bottom-color: rgba(31, 124, 107, 0.95);
}

.word-translation-popover {
  position: fixed;
  z-index: 12120;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: min(280px, calc(100vw - 16px));
  padding: 7px 10px;
  border: 1px solid rgba(111, 191, 172, 0.26);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(250, 254, 253, 0.99)),
    #ffffff;
  color: #18233f;
  box-shadow: 0 10px 22px rgba(24, 35, 63, 0.10);
  font-size: 0.9rem;
  line-height: 1.25;
  pointer-events: none;
  opacity: 0;
  transform: translateY(5px) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.word-translation-popover.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.word-translation-popover-translation {
  min-width: 0;
  color: #18233f;
  font-size: 0.92rem;
  font-weight: 650;
}
