/**
 * reprodb-artifinder.css — styling for the ArtiFinder provenance marker
 * (shown in search results and profile tables) and the ArtiFinder statistics
 * page. Mirrors the ".avail-warn" tooltip pattern so the two markers feel
 * consistent.
 */

/* ── Provenance marker (search + profile) ─────────────────────────── */
.artifinder-tag {
  position: relative;
  cursor: help;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.8em;
  color: #4a5aa8;
  background: #eef1fb;
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid #c9d2f0;
  vertical-align: middle;
}
.artifinder-tag .artifinder-logo {
  width: 0.95em;
  height: 0.95em;
  flex: 0 0 auto;
}
.artifinder-tag .avail-tip {
  display: none;
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  font-size: 0.9em;
  font-weight: normal;
  line-height: 1.3;
  padding: 5px 9px;
  border-radius: 4px;
  width: max-content;
  max-width: 240px;
  white-space: normal;
  text-align: left;
  z-index: 100;
  pointer-events: none;
}
.artifinder-tag:hover .avail-tip {
  display: block;
}

/* An ArtiFinder-only artifact link (no AE artifact_urls alongside it). */
.rdb-result-links .artifinder-link {
  color: #4a5aa8;
}

/* ArtiFinder-discovered paper rows in profile tables (author + institution). */
.af-title,
a.af-title {
  color: #4a5aa8;
  font-style: italic;
}

/* ── Statistics page ──────────────────────────────────────────────── */
.artifinder-note {
  font-size: 0.92em;
  color: var(--ov-muted, #666);
  border-left: 3px solid #c9d2f0;
  padding: 0.4em 0.9em;
  margin: 1em 0;
  background: rgba(200, 210, 240, 0.12);
  border-radius: 0 4px 4px 0;
}

/* ── Dark mode ────────────────────────────────────────────────────── */
html[data-theme="dark"] .artifinder-tag {
  color: #aeb8ea;
  background: #262a3d;
  border-color: #3d445f;
}
html[data-theme="dark"] .rdb-result-links .artifinder-link {
  color: #aeb8ea;
}
html[data-theme="dark"] .af-title,
html[data-theme="dark"] a.af-title {
  color: #aeb8ea;
}
html[data-theme="dark"] .artifinder-note {
  border-left-color: #3d445f;
  background: rgba(60, 68, 95, 0.25);
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .artifinder-tag {
    color: #aeb8ea;
    background: #262a3d;
    border-color: #3d445f;
  }
  html:not([data-theme="light"]) .rdb-result-links .artifinder-link {
    color: #aeb8ea;
  }
  html:not([data-theme="light"]) .artifinder-note {
    border-left-color: #3d445f;
    background: rgba(60, 68, 95, 0.25);
  }
}
