/* Hawaiian Pronunciation — tap-to-hear buttons + voice switcher pill.
   Scoped .hg-pronounce-* so we don't collide with anything else on the site. */

/* The word itself — keep the Hawaiian word looking like a Hawaiian word.
   Subtle accent so readers notice it's interactive, but not loud. */
.hg-pronounce {
  font-style: italic;
  color: #1D9771;           /* Kauai green — Hawaiian language has strong
                               ties to the aina, and green reads "living" */
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: rgba(29,151,113,.4);
  text-underline-offset: 3px;
  cursor: default;
}
.hg-pronounce-missing {
  /* Word is tagged but no audio generated yet — lose the underline so it
     doesn't mislead the reader into expecting a button. */
  text-decoration: none;
  color: inherit;
}

/* The speaker button — small, hugs the word, accessible hit area. */
.hg-pronounce-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(29,151,113,.35);
  color: #1D9771;
  border-radius: 999px;
  padding: 2px 8px;
  margin: 0 2px 0 4px;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  vertical-align: middle;
  transition: background .15s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.hg-pronounce-btn:hover,
.hg-pronounce-btn:focus-visible {
  background: rgba(29,151,113,.12);
  outline: none;
}
.hg-pronounce-btn:active {
  transform: scale(0.95);
}
.hg-pronounce-btn.is-playing {
  background: #1D9771;
  color: #fff;
  animation: hg-pronounce-pulse .6s ease-in-out infinite alternate;
}
.hg-pronounce-btn.is-playing .hg-pronounce-icon {
  color: #fff;
}
.hg-pronounce-btn.is-disabled,
.hg-pronounce-btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  border-style: dashed;
}
.hg-pronounce-btn.is-disabled:hover,
.hg-pronounce-btn[disabled]:hover {
  background: transparent;
}
@keyframes hg-pronounce-pulse {
  from { box-shadow: 0 0 0 0 rgba(29,151,113,.0); }
  to   { box-shadow: 0 0 0 6px rgba(29,151,113,.18); }
}
.hg-pronounce-icon {
  font-size: 14px;
  display: inline-block;
  line-height: 1;
  color: #1D9771;
}

/* Voice switcher pill — floats bottom-right on pages with pronunciation
   markup. Above the Whippoorwill pill would normally sit, so we stack it
   higher but only render on pronunciation-only pages. */
.hg-pronounce-toggle {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  padding: 5px 8px 5px 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 12px;
}
.hg-pronounce-toggle-label {
  color: #555;
  font-weight: 600;
}
.hg-pronounce-voice-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  line-height: 1;
}
.hg-pronounce-voice-btn:hover {
  color: #1D9771;
}
.hg-pronounce-voice-btn.is-active {
  background: #1D9771;
  color: #fff;
  border-color: #1D9771;
}

/* Small (i) info button inside the voice-switcher pill — opens the
   disclaimer modal. Styled as a neutral circle so it doesn't compete
   visually with the voice toggle. */
.hg-pronounce-info-btn {
  background: transparent;
  border: 1px solid #bbb;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  padding: 0;
  margin-left: 4px;
  font: inherit;
  font-size: 12px;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  color: #555;
  cursor: pointer;
}
.hg-pronounce-info-btn:hover {
  color: #1D9771;
  border-color: #1D9771;
}

/* Disclaimer modal — simple centered card with a scrim. Opened from the
   info button in the voice-switcher pill. */
.hg-pronounce-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.hg-pronounce-modal.is-open {
  display: flex;
}
.hg-pronounce-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.55);
}
.hg-pronounce-modal-card {
  position: relative;
  background: #fff;
  color: #222;
  max-width: 480px;
  width: 100%;
  border-radius: 16px;
  padding: 28px 28px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  line-height: 1.5;
  font-size: 16px;
}
.hg-pronounce-modal-card h3 {
  margin: 0 0 12px;
  font-size: 22px;
  color: #1D9771;
}
.hg-pronounce-modal-card p {
  margin: 0 0 12px;
  font-size: 16px;
}
.hg-pronounce-modal-card a {
  color: #1D9771;
  text-decoration: underline;
}
.hg-pronounce-modal-credit {
  margin-top: 16px !important;
  padding-top: 12px;
  border-top: 1px solid #eee;
  font-size: 13px !important;
  color: #666;
}
.hg-pronounce-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: #888;
  cursor: pointer;
  padding: 0;
}
.hg-pronounce-modal-close:hover {
  color: #1D9771;
}

/* Hide the floating switcher when printing — the audio is irrelevant on paper
   and the fixed position bleeds into page margins. */
@media print {
  .hg-pronounce-toggle,
  .hg-pronounce-btn,
  .hg-pronounce-modal {
    display: none !important;
  }
}
