/* ==========================================
   Scripture References & Popovers
   v=2026.11.14a
   ========================================== */

/* ---------- Reference ---------- */

.scripture-pop {
  position: relative;
  display: inline-block;

  color: var(--accent-strong);
  cursor: pointer;

  font-weight: inherit;
  text-decoration: none;
}

/* ---------- Popup ---------- */

.scripture-box {
  position: absolute;

  left: 0;
  bottom: 1.75em;

  width: min(320px, 90vw);
  max-height: 260px;

  padding: 1rem 1.25rem;

  background: #000;
  color: var(--article-color);

  border: 2px solid var(--accent-strong);
  border-radius: 12px;

  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.45),
    inset 0 0 12px rgba(255, 255, 255, 0.05);

  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;

  white-space: normal;
  overflow-y: auto;

  opacity: 0;
  pointer-events: none;

  transform: translateY(-8px);

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;

  z-index: 999;
}

/* ---------- Reveal ---------- */

.scripture-pop:hover .scripture-box,
.scripture-pop:focus-within .scripture-box {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---------- Right Edge Variant ---------- */

.scripture-pop.edge-right .scripture-box {
  left: auto;
  right: 0;
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {
  .scripture-box {
    width: min(280px, 92vw);
    max-height: 220px;
  }
}

/* ---------- Scrollbar ---------- */

.scripture-box::-webkit-scrollbar {
  width: 8px;
}

.scripture-box::-webkit-scrollbar-track {
  background: #111;
}

.scripture-box::-webkit-scrollbar-thumb {
  background: var(--accent-strong);
  border-radius: 8px;
}