/* jh-hover: tooltips driven by data-jh-hover-target */

/* Hidden content source (included in page, never shown in place) */
#jh-hover-content {
  position: absolute;
  left: -9999px;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
}

#jh-hover-content .jh-hover-tip {
  box-sizing: border-box;
  max-width: 320px;
  padding: 0.5em 0;
  font-size: 0.95em;
}

/* Injected info icon next to trigger */
.jh-hover-trigger {
  position: relative;
}

.jh-hover-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 3px;
  vertical-align: middle;
  border-radius: 50%;
  background: hsl(211.65deg 76.05% 32.75% / 47%);
  color: #fff;
  font-size: 0.75em;
  font-weight: bold;
  line-height: 1;
  cursor: help;
}

.jh-hover-icon::after {
  content: "i";
  font-style: italic;
  font-family: serif;
}

.jh-hover-icon:hover,
.jh-hover-trigger:hover .jh-hover-icon {
  background: #0d3560;
}

/* Popover that shows cloned tip content */
.jh-hover-popover {
  display: none;
  position: absolute;
  z-index: 10000;
  max-width: 320px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 0.9em;
  line-height: 1.4;
  color: #333;
  pointer-events: auto;
}

.jh-hover-popover p {
  margin: 0 0 0.5em 0;
}

.jh-hover-popover p:last-child {
  margin-bottom: 0;
}

.jh-hover-popover code {
  background: #f0f0f0;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 0.95em;
}

/* Formula block: makes the calculation easy to read */
.jh-hover-popover .jh-hover-formula,
#jh-hover-content .jh-hover-formula {
  display: block;
  margin: 0.4em 0 0.5em 0;
  padding: 0.5em 0.6em;
  background: #f5f8fa;
  border-left: 3px solid #145093;
  border-radius: 0 4px 4px 0;
  font-size: 0.95em;
  line-height: 1.5;
  color: #333;
}

.jh-hover-popover .jh-f-line,
#jh-hover-content .jh-f-line {
  display: block;
  padding: 0.1em 0;
}

.jh-hover-popover .jh-f-op,
#jh-hover-content .jh-f-op {
  display: block;
  padding: 0.15em 0 0.1em 0;
  font-weight: 600;
  color: #145093;
}

/* Single-line formula: keep "A − B" on one line so it reads as one calculation */
.jh-hover-popover .jh-f-single .jh-f-line,
.jh-hover-popover .jh-f-single .jh-f-op,
#jh-hover-content .jh-f-single .jh-f-line,
#jh-hover-content .jh-f-single .jh-f-op {
  display: inline;
  padding: 0;
}
.jh-hover-popover .jh-f-single .jh-f-op,
#jh-hover-content .jh-f-single .jh-f-op {
  margin-left: 0.25em;
}

.jh-hover-popover .jh-f-divide,
#jh-hover-content .jh-f-divide {
  display: block;
  margin: 0.2em 0;
  border: none;
  border-top: 1px solid #b0bcc7;
  font-size: 0.85em;
  color: #6b7c8a;
  letter-spacing: 0.05em;
}
