/* Bible reference styling */
.bible-ref {
  cursor: pointer;
  text-decoration: underline;
  color: #0066cc;
  transition: color 0.2s ease;
}
.bible-ref:hover {
  color: #003366;
}

/* Tooltip base */
.bible-tooltip {
  display: none;
  position: absolute;
  background: #fff;
  border: 1px solid #ccc;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 10000;
  max-width: 300px;
  font-size: 14px;
  line-height: 1.4;
  font-family: sans-serif;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
  box-sizing: border-box;
}

/* Active state */
.bible-tooltip.active {
  display: block;
  opacity: 1;
}

/* Tooltip header */
.bible-tooltip .bible-tooltip-header {
  background: #f5f5f5;
  padding: 8px 10px;
  font-weight: bold;
  border-bottom: 1px solid #ccc;
}

/* Tooltip body */
.bible-tooltip .bible-tooltip-body {
  padding: 10px 15px;
}

/* Arrow elements */
.bible-tooltip::before,
.bible-tooltip::after {
  content: '';
  position: absolute;
  left: var(--arrow-left, 10px);
}

/* Arrow pointing up (tooltip below) */
.bible-tooltip.tooltip-bottom::before {
  top: -6px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #ccc;
}
.bible-tooltip.tooltip-bottom::after {
  top: -5px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #fff;
}

/* Arrow pointing down (tooltip above) */
.bible-tooltip.tooltip-top::before {
  bottom: -6px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #ccc;
}
.bible-tooltip.tooltip-top::after {
  bottom: -5px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #fff;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .bible-tooltip {
    max-width: none !important;
    width: calc(100% - 20px) !important;
    left: 10px !important;
    right: 10px !important;
  }
  .bible-tooltip::before,
  .bible-tooltip::after {
    left: var(--arrow-left, 50%) !important;
  }
}
