/*
 * Scripture popup, shared by every Tsunami Unleashed site. Neutral on
 * purpose: a theme recolours it by setting the --scripture-* variables.
 * Linked only on pages that have scripture references; never printed.
 */

.scripture-ref {
  text-decoration-style: dotted;
  text-underline-offset: 0.15em;
}

.scripture-popup {
  position: absolute;
  z-index: 50;
  box-sizing: border-box;
  width: max-content;
  max-width: min(22rem, calc(100vw - 32px));
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--scripture-popup-bg, #fff);
  color: var(--scripture-popup-fg, #222);
  border: 1px solid var(--scripture-popup-border, #ccc);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgb(0 0 0 / 15%);
  font-size: 0.9375rem;
  line-height: 1.55;
  text-align: left;
}

.scripture-popup p {
  margin: 0 0 0.5rem;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.scripture-popup-ref {
  font-weight: 700;
}

.scripture-popup-version {
  font-weight: 400;
  font-size: 0.8em;
  opacity: 0.7;
}

.scripture-popup sup {
  font-size: 0.7em;
  margin-right: 0.15em;
  opacity: 0.7;
}

.scripture-popup-link {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
  color: var(--scripture-popup-link, inherit);
}

@media (prefers-color-scheme: dark) {
  .scripture-popup {
    background: var(--scripture-popup-bg, #1f1f1f);
    color: var(--scripture-popup-fg, #eee);
    border-color: var(--scripture-popup-border, #444);
  }
}

@media print {
  .scripture-popup {
    display: none !important;
  }
}
