/**
 * @file plugins/themes/manuscriptDaffa/styles/manuscriptDaffa.css
 *
 * Distributed under the GNU GPL v3. For full terms see the file LICENSE.
 *
 * Styles of the Manuscript-Daffa features. Colours come from the theme
 * options (--msd-primary = Colour, --msd-accent = Accent Colour), set inline
 * by the theme.
 */
:root {
	--msd-primary: #1e6292;
	--msd-accent: #f7bc4a;
	--msd-on-primary: #fff;
	--msd-border: rgba(0, 0, 0, .12);
	--msd-muted: rgba(0, 0, 0, .6);
	/* Link colour of Manuscript (article titles); used by the action row */
	--msd-link: #4b7d92;
	/* Space title -> authors and authors -> action row in article lists */
	--msd-list-gap: .2rem;
	/* Extra size of article titles in lists */
	--msd-title-bump: 2px;
	/* Text size of article lists (theme option "Article list text size") */
	--msd-list-scale: 1;
}

/* Article page: authors, affiliation and country */
.obj_article_details .authors li {
	margin-bottom: .9em;
}
.obj_article_details .authors li:last-child {
	margin-bottom: 0;
}
.obj_article_details .authors .name,
.obj_article_details .authors .affiliation {
	margin: 0;
	line-height: 1.35;
}
.obj_article_details .authors .msd-country-only {
	display: block;
}

/* Dimensions badge above the DOI */
.obj_article_details .msd-dimensions {
	margin-bottom: .5rem;
	line-height: 1;
}
.obj_article_details .msd-dimensions .__dimensions_badge_embed__ {
	display: inline-block;
	vertical-align: middle;
}

/* Issue Coverage (issue page and homepage) */
.msd-coverage {
	margin: 0 0 1rem;
	padding: .75rem 1rem;
	border: 1px solid var(--msd-border);
	border-left: 4px solid var(--msd-primary);
	border-radius: 4px;
	font-size: .875rem;
	overflow: hidden;
}
.msd-coverage-title {
	font-weight: 700;
	color: var(--msd-primary);
	margin-bottom: .35rem;
}
.msd-coverage ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
.msd-coverage-stats li {
	display: inline-block;
	margin-right: 1rem;
}
.msd-coverage-countries {
	margin-top: .5rem !important;
	display: flex;
	flex-wrap: wrap;
	gap: .25rem 1rem;
}
.msd-coverage-countries li {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
}
.msd-country-count {
	color: var(--msd-muted);
}
.msd-flag {
	width: 20px;
	height: 15px;
	object-fit: cover;
	border: 1px solid rgba(0, 0, 0, .1);
	vertical-align: middle;
	display: inline-block;
}
@media (min-width: 768px) {
	.obj_issue_toc .heading .msd-coverage {
		overflow: hidden;
	}
}

/* Article lists: title size, spacing, action row, abstract */
.obj_article_summary > .title {
	font-size: calc(1rem * var(--msd-list-scale) + var(--msd-title-bump));
	line-height: 1.35;
	margin-bottom: 0;
}
.obj_article_summary > .meta {
	margin-top: var(--msd-list-gap);
	padding-top: 0;
	font-size: calc(.93rem * var(--msd-list-scale));
	line-height: 1.5;
}
.msd-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
	margin-top: var(--msd-list-gap);
	font-size: calc(.8rem * var(--msd-list-scale));
	line-height: 1.4;
}
.msd-act,
.msd-act:visited {
	display: inline-flex;
	align-items: center;
	gap: .35em;
	padding: .12rem .7rem;
	border: 1px solid #d5dde0;
	border-radius: 999px;
	color: #55666d;
	text-decoration: none;
	background: #fff;
	word-break: break-word;
	transition: color .15s, border-color .15s;
}
.msd-act:hover,
.msd-act:focus,
.msd-act.is-open {
	border-color: var(--msd-link);
	color: var(--msd-link);
	background: #fff;
	text-decoration: none;
}
.msd-act:focus-visible {
	outline: 2px solid var(--msd-link);
	outline-offset: 1px;
}

/* Small line icons in front of the actions (mask, so they take the text colour) */
.msd-act::before {
	content: "";
	flex: none;
	width: 1em;
	height: 1em;
	background: currentColor;
	-webkit-mask: var(--msd-icon) center / contain no-repeat;
	mask: var(--msd-icon) center / contain no-repeat;
}
.msd-act-abstract {
	--msd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h10'/%3E%3C/svg%3E");
}
.msd-act-pdf {
	--msd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11m0 0l-4-4m4 4l4-4M5 20h14'/%3E%3C/svg%3E");
}
.msd-act-doi {
	--msd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 14a4 4 0 005.7 0l3-3a4 4 0 00-5.7-5.7l-1 1M14 10a4 4 0 00-5.7 0l-3 3a4 4 0 005.7 5.7l1-1'/%3E%3C/svg%3E");
}
.msd-act-scholar {
	--msd-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9l10-5 10 5-10 5z'/%3E%3Cpath d='M6 11v5c0 1.5 3 3 6 3s6-1.5 6-3v-5'/%3E%3C/svg%3E");
}
.msd-abstract {
	margin-top: .5rem;
	padding: .5rem .75rem;
	border-left: 3px solid var(--msd-accent);
	background: rgba(0, 0, 0, .03);
	font-size: calc(.9rem * var(--msd-list-scale));
	line-height: 1.6;
}
.msd-abstract p:first-child {
	margin-top: 0;
}
.msd-abstract p:last-child {
	margin-bottom: 0;
}

/* Thin divider between the articles of a list (not after the last one) */
.cmp_article_list > li + li,
.search_results > li + li {
	border-top: 1px solid var(--msd-border);
	padding-top: 1rem;
}

/* Homepage: folded current issue */
.current_issue [hidden] {
	display: none !important;
}
.msd-readmore-wrap {
	margin: 8px 0 1.5rem;
}
.current_issue .cmp_article_list > li:not([hidden]):last-child,
.current_issue .section:last-child .cmp_article_list {
	margin-bottom: 0;
}
.msd-readmore,
.msd-readmore:visited {
	display: inline-block;
	padding: .35rem 1rem;
	border: 1px solid var(--msd-primary);
	border-radius: 4px;
	color: var(--msd-primary);
	text-decoration: none;
	font-weight: 700;
}
.msd-readmore:hover,
.msd-readmore:focus {
	background: var(--msd-primary);
	color: var(--msd-on-primary);
}

/* Homepage: category cards */
.msd-categories {
	margin: 1.5rem 0;
}
.msd-category-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: .75rem;
	align-items: start;
}
.msd-category {
	border: 1px solid var(--msd-border);
	border-top: 3px solid var(--msd-primary);
	border-radius: 4px;
	background: #fff;
}
.msd-category summary {
	display: flex;
	flex-direction: column;
	padding: .65rem .85rem;
	cursor: pointer;
	list-style: none;
}
.msd-category summary::-webkit-details-marker {
	display: none;
}
.msd-category-name {
	font-weight: 700;
	color: var(--msd-primary);
}
.msd-category-count {
	font-size: .8rem;
	color: var(--msd-muted);
}
.msd-category ul {
	margin: 0;
	padding: 0 .85rem .65rem 1.9rem;
	font-size: .85rem;
}
.msd-category li {
	margin-bottom: .3rem;
}
.msd-category-all {
	display: block;
	padding: 0 .85rem .65rem;
	font-size: .8rem;
}

/* Archives: statistic cards */
.msd-archive-stats {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin: .5rem 0;
}
.msd-stat {
	display: flex;
	flex-direction: column;
	min-width: 6.5rem;
	padding: .4rem .75rem;
	border: 1px solid var(--msd-border);
	border-top: 3px solid var(--msd-primary);
	border-radius: 4px;
	font-size: .8rem;
	line-height: 1.3;
}
.msd-stat-num {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--msd-primary);
}
.msd-stat-label {
	text-transform: uppercase;
	letter-spacing: .03em;
	font-size: .7rem;
	color: var(--msd-muted);
}
.msd-stat-sub {
	margin-top: .15rem;
}
.msd-flags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 3px;
}
.msd-flags-more {
	font-size: .75rem;
	color: var(--msd-muted);
}
