levineuwirth.org/static/css/popups.css

142 lines
3.2 KiB
CSS

/* popups.css — Hover preview popup styles. */
/* ============================================================
POPUP CONTAINER
Absolutely positioned, single shared element.
============================================================ */
.link-popup {
position: absolute;
z-index: 500;
max-width: 420px;
min-width: 200px;
padding: 0.7rem 0.9rem;
background: var(--bg);
border: 1px solid var(--border);
border-radius: 3px;
box-shadow: 0 3px 14px rgba(0, 0, 0, 0.09);
font-family: var(--font-sans);
font-size: 0.8rem;
color: var(--text-muted);
line-height: 1.55;
pointer-events: auto;
opacity: 0;
visibility: hidden;
transition: opacity 0.14s ease, visibility 0.14s ease;
}
.link-popup.is-visible {
opacity: 1;
visibility: visible;
}
/* ============================================================
SHARED POPUP CONTENT
============================================================ */
.popup-title {
font-weight: 600;
color: var(--text);
font-size: 0.82rem;
margin-bottom: 0.3rem;
line-height: 1.35;
}
.popup-abstract,
.popup-extract {
font-size: 0.78rem;
color: var(--text-muted);
line-height: 1.55;
}
/* Source label ("Wikipedia", "arXiv") */
.popup-source {
font-size: 0.65rem;
font-weight: 600;
font-variant-caps: all-small-caps;
letter-spacing: 0.07em;
color: var(--text-faint);
margin-bottom: 0.25rem;
}
/* Author list (arXiv, DOI, GitHub, etc.) */
.popup-authors {
font-size: 0.75rem;
color: var(--text-faint);
margin-bottom: 0.3rem;
font-style: italic;
}
/* Journal / year / language / stars line */
.popup-meta {
font-size: 0.72rem;
color: var(--text-faint);
margin-bottom: 0.3rem;
font-variant-numeric: tabular-nums;
}
/* ============================================================
CITATION POPUP
Shows the .csl-entry from the bibliography in-page.
============================================================ */
.popup-citation .csl-entry {
font-family: var(--font-sans);
font-size: 0.8rem;
color: var(--text-muted);
line-height: 1.6;
/* Override the hanging-indent style used in the bibliography list */
padding-left: 0;
text-indent: 0;
margin-bottom: 0;
}
.popup-citation .csl-entry a {
color: var(--text-faint);
word-break: break-all;
}
/* Hide the [N] number badge — already shown in the inline marker */
.popup-citation .ref-num {
display: none;
}
/* Epistemic preview popup — content cloned from #epistemic; ep-* styles inherited */
.popup-epistemic {
min-width: 230px;
}
/* PDF thumbnail popup — first-page image generated by pdftoppm at build time */
.link-popup:has(.popup-pdf) {
padding: 0;
overflow: hidden;
}
.popup-pdf {
line-height: 0; /* collapse whitespace gap below <img> */
}
.popup-pdf-thumb {
display: block;
width: 320px;
max-width: 100%;
height: auto;
max-height: 420px;
object-fit: contain;
object-position: top left;
}
/* PGP signature popup */
.popup-sig pre {
margin: 0;
font-family: var(--font-mono);
font-size: 0.68rem;
line-height: 1.45;
white-space: pre;
overflow-x: auto;
color: var(--text-muted);
}