/*
 * doiSummary plugin - article summary styling
 *
 * Tweak the look from the variables below. Muted text uses opacity instead of
 * a fixed grey, so it adapts to any theme colour scheme.
 */
.obj_article_summary {
	--dsm-accent: #1a6fb5;                 /* DOI icon / stat accent */
	--dsm-border: rgba(127, 127, 127, 0.28);
	--dsm-pill-bg: rgba(127, 127, 127, 0.12);
	--dsm-muted: 0.72;                     /* opacity of secondary text */
}

/* ---- Core copies replaced by the plugin ---------------------------------- */
.obj_article_summary .meta .authors,
.obj_article_summary .meta .pages {
	display: none;
}

/* ---- List rhythm: a hairline between summaries ---------------------------- */
.obj_article_summary {
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.cmp_article_list > li + li {
	border-top: 1px solid var(--dsm-border, rgba(127, 127, 127, 0.28));
}

/*
 * Put the plugin block above the galley buttons (browsers with :has() support;
 * elsewhere the block simply appears below the galley buttons). Summaries with
 * a cover image keep the theme's own float layout.
 */
.obj_article_summary:not(:has(> .cover)) {
	display: flex;
	flex-direction: column;
}

.obj_article_summary:not(:has(> .cover)) > .galleys_links {
	order: 1;
	margin-top: 0.75rem;
}

/* ---- Title ---------------------------------------------------------------- */
.obj_article_summary .title {
	margin: 0 0 0.4rem;
	font-size: 1.125em;
	font-weight: 600;
	line-height: 1.35;
}

.obj_article_summary .title a {
	text-decoration: none;
}

.obj_article_summary .title a:hover,
.obj_article_summary .title a:focus {
	text-decoration: underline;
}

/* ---- Authors + numbered affiliations ------------------------------------- */
.obj_article_summary .article_summary_details {
	margin-top: 0;
}

.obj_article_summary .summary_authors {
	font-size: 0.9375em;
	line-height: 1.5;
}

.obj_article_summary .summary_authors .name {
	font-weight: 500;
}

.obj_article_summary .aff_ref {
	font-size: 0.8em;
	opacity: var(--dsm-muted, 0.72);
	white-space: nowrap;
}

.obj_article_summary .summary_authors .separator {
	opacity: var(--dsm-muted, 0.72);
}

.obj_article_summary .summary_affiliations {
	margin: 0.4rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125em;
	line-height: 1.45;
}

.obj_article_summary .summary_affiliations li {
	margin: 0 0 0.1rem;
	padding-left: 2.1em;       /* hanging indent so wrapped lines align */
	text-indent: -2.1em;
	opacity: var(--dsm-muted, 0.72);
}

.obj_article_summary .summary_affiliations .aff_ref {
	display: inline-block;
	min-width: 1.9em;
	margin-right: 0.2em;
	text-indent: 0;
	opacity: 1;
	font-size: 1em;
	font-variant-numeric: tabular-nums;
}

/* ---- Meta row: pages | DOI | usage counts -------------------------------- */
.obj_article_summary .summary_meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem 1.25rem;
	margin-top: 0.6rem;
	font-size: 0.8125em;
}

.obj_article_summary .summary_pages {
	font-variant-numeric: tabular-nums;
	font-weight: 500;
}

.obj_article_summary .doi_summary {
	min-width: 0;
}

.obj_article_summary .doi_summary .doi_icon {
	display: inline-block;
	width: 16px;
	height: 16px;
	margin-right: 0.35em;
	vertical-align: text-bottom;
}

.obj_article_summary .doi_summary .value {
	overflow-wrap: anywhere;
	word-break: break-word;
}

/* Usage counts as small pills, pushed to the right on wide screens */
.obj_article_summary .summary_stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.obj_article_summary .summary_stats .stat {
	display: inline-block;
	padding: 0.15em 0.75em;
	border-radius: 999px;
	background: var(--dsm-pill-bg, rgba(127, 127, 127, 0.12));
	font-size: 0.95em;
	font-variant-numeric: tabular-nums;
	line-height: 1.5;
	white-space: nowrap;
}

.obj_article_summary .summary_stats .pdf_downloads {
	box-shadow: inset 0 0 0 1px var(--dsm-accent, #1a6fb5);
	background: transparent;
}

@media (min-width: 640px) {
	.obj_article_summary .summary_stats {
		margin-left: auto;
	}
}

/* ---- Small screens -------------------------------------------------------- */
@media (max-width: 639px) {
	.obj_article_summary .summary_meta {
		flex-direction: column;
		align-items: flex-start;
	}
}

@media print {
	.obj_article_summary .summary_stats {
		display: none;
	}
}
