/**
 * plugins/themes/educationGold/styles/article.css
 *
 * Article Detail Page, Galley PDF Downloads, Citation Block, and References.
 */

.eg-article-hero-card {
	margin-bottom: 24px;
}

.eg-article-section-pill {
	margin-bottom: 10px;
}

.eg-article-section-pill span {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background-color: var(--eg-bg-secondary);
	border: 1px solid var(--eg-border);
	color: var(--eg-primary);
	font-size: 0.78125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.eg-article-detail-title {
	margin: 0 0 8px;
	font-size: 1.875rem;
	font-weight: 700;
	line-height: 1.25;
	color: var(--eg-heading);
	overflow-wrap: break-word;
}

.eg-article-detail-subtitle {
	margin: 0 0 14px;
	font-size: 1.1875rem;
	font-weight: 500;
	font-style: italic;
	color: var(--eg-text-muted);
}

/* Authors List */
.eg-authors-list {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.eg-author-chip {
	max-width: 100%;
	background-color: #FCF9F2;
	border: 1px solid var(--eg-border-light);
	border-radius: var(--eg-radius-sm);
	padding: 10px 14px;
	font-size: 0.875rem;
	overflow-wrap: anywhere;
}

.eg-author-line {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.eg-author-name {
	font-weight: 700;
	color: var(--eg-heading);
}

.eg-author-orcid {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.78125rem;
}

.eg-author-orcid svg {
	width: 15px;
	height: 15px;
	vertical-align: middle;
}

.eg-author-affiliation {
	font-size: 0.8125rem;
	color: var(--eg-text-muted);
	margin-top: 3px;
}

.eg-author-affiliation svg {
	width: 14px;
	height: 14px;
	vertical-align: middle;
}

.eg-author-email {
	margin-top: 3px;
	font-size: 0.8125rem;
	display: flex;
	align-items: center;
	gap: 5px;
}

.eg-author-group {
	display: inline-block;
	margin-top: 4px;
	font-size: 0.72rem;
	color: var(--eg-primary);
	font-weight: 600;
}

/* Key Metadata Bar */
.eg-article-meta-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	padding-top: 14px;
	border-top: 1px solid var(--eg-border-light);
}

.eg-meta-pill {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 7px;
	max-width: 100%;
	padding: 6px 12px;
	border-radius: var(--eg-radius-sm);
	background-color: var(--eg-bg-secondary);
	border: 1px solid var(--eg-border);
	font-size: 0.8125rem;
	color: var(--eg-heading);
}

.eg-meta-pill .fa {
	color: var(--eg-primary);
}

.eg-meta-pill-doi {
	background-color: #FFFDF8;
}

.eg-meta-pill-doi a {
	overflow-wrap: anywhere;
	word-break: break-all;
}

.eg-copy-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 3px 10px;
	font-size: 0.75rem;
	font-weight: 600;
	border-radius: 999px;
	border: 1px solid var(--eg-primary);
	background-color: transparent;
	color: var(--eg-primary);
	cursor: pointer;
	transition: background-color var(--eg-transition), color var(--eg-transition);
}

.eg-copy-btn:hover,
.eg-copy-btn.is-copied {
	background-color: var(--eg-primary);
	color: #FFFFFF;
}

/* Two-Column Article Layout */
.eg-article-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 270px;
	gap: 24px;
	align-items: start;
}

.eg-article-main,
.eg-article-sidebar {
	min-width: 0;
}

.eg-article-block,
.eg-article-side-card {
	margin-bottom: 20px;
}

.eg-article-side-card .eg-card-header {
	padding: 11px 16px;
}

.eg-article-side-card .eg-card-title {
	font-size: 1.0625rem;
}

.eg-article-side-card .eg-card-body {
	padding: 16px;
}

.eg-block-subheading {
	margin: 0 0 10px;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--eg-heading);
	display: flex;
	align-items: center;
	gap: 8px;
}

.eg-keyword-chips {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.eg-keyword-chips li {
	padding: 4px 12px;
	border-radius: 999px;
	background-color: var(--eg-bg-secondary);
	border: 1px solid var(--eg-border);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--eg-heading);
}

/* References */
.eg-references-list {
	font-size: 0.875rem;
	line-height: 1.65;
}

.eg-reference-item {
	margin: 0 0 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--eg-border-light);
	word-break: break-word;
}

.eg-reference-item:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: 0;
}

/* Author Biographies */
.eg-bio-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.eg-bio-item + .eg-bio-item {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--eg-border-light);
}

.eg-bio-author {
	font-weight: 700;
	color: var(--eg-heading);
	margin-bottom: 4px;
}

/* Sidebar Cards */
.eg-cover-wrap {
	text-align: center;
}

.eg-cover-wrap img {
	border-radius: var(--eg-radius-sm);
	border: 1px solid var(--eg-border);
	max-height: 320px;
}

.eg-galley-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.obj_galley_link,
.obj_galley_link_supplementary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 10px 18px;
	border-radius: 999px;
	font-weight: 700;
	font-size: 0.875rem;
	text-align: center;
	background: linear-gradient(180deg, var(--eg-secondary) 0%, var(--eg-primary) 100%);
	color: #FFFFFF;
	border: 1px solid transparent;
	transition: background-color var(--eg-transition), transform var(--eg-transition);
}

.obj_galley_link::before {
	content: "\f1c1";
	font-family: FontAwesome;
}

.obj_galley_link.file::before,
.obj_galley_link_supplementary::before {
	content: "\f019";
	font-family: FontAwesome;
}

.obj_galley_link:hover,
.obj_galley_link_supplementary:hover {
	background: var(--eg-primary-dark);
	color: #FFFFFF;
	transform: translateY(-1px);
}

.eg-supp-heading {
	margin: 16px 0 8px;
	font-size: 0.875rem;
}

.eg-article-side-card .label {
	margin: 0 0 6px;
	font-family: var(--eg-font-serif);
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--eg-heading);
}

.eg-article-side-card .value {
	overflow-wrap: anywhere;
	word-break: break-word;
}

.eg-article-side-card .sub_item + .sub_item {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--eg-border-light);
}

.eg-versions-list,
.eg-article-side-card .categories {
	list-style: none;
	margin: 0;
	padding: 0;
}

.eg-citation-box {
	width: 100%;
	max-width: 100%;
	margin: 0 0 12px;
	padding: 12px;
	background-color: var(--eg-bg-secondary);
	border: 1px solid var(--eg-border);
	border-radius: var(--eg-radius-sm);
	font-size: 0.8125rem;
	line-height: 1.55;
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: break-word;
}

/* CSL Plugin Citation Box Styling */
.eg-article-details-plugins {
	max-width: 100%;
	min-width: 0;
}

.eg-article-details-plugins .item.citation {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	background-color: var(--eg-bg);
	border: 1px solid var(--eg-border);
	border-radius: var(--eg-radius-md);
	box-shadow: var(--eg-shadow-sm);
	padding: 16px;
	margin-bottom: 20px;
	overflow: hidden;
}

.eg-article-details-plugins .citation_display,
.eg-article-details-plugins .citation_display .value {
	max-width: 100%;
	min-width: 0;
}

.eg-article-details-plugins .citation_display .label {
	margin: 0 0 8px;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--eg-heading);
}

.eg-article-details-plugins #citationOutput {
	width: 100%;
	max-width: 100%;
	padding: 12px;
	background-color: var(--eg-bg-secondary);
	border: 1px solid var(--eg-border);
	border-radius: var(--eg-radius-sm);
	font-size: 0.8125rem;
	line-height: 1.55;
	margin-bottom: 10px;
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.eg-article-details-plugins #citationOutput *,
.eg-article-details-plugins .csl-bib-body,
.eg-article-details-plugins .csl-entry {
	max-width: 100% !important;
	white-space: normal !important;
	overflow-wrap: anywhere !important;
	word-break: break-word !important;
}

.eg-article-details-plugins .csl-bib-body,
.eg-article-details-plugins .csl-entry {
	margin-left: 0 !important;
	padding-left: 0 !important;
	text-indent: 0 !important;
	line-height: 1.55 !important;
}

.eg-article-details-plugins #citationOutput a {
	word-break: break-all;
	overflow-wrap: anywhere;
}

.eg-article-details-plugins .citation_formats_button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-width: 100%;
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid var(--eg-border);
	background-color: var(--eg-bg);
	color: var(--eg-primary);
	font-size: 0.8125rem;
	font-weight: 600;
	cursor: pointer;
}

.eg-article-details-plugins .citation_formats_list {
	display: none;
	max-width: 100%;
	margin-top: 10px;
	border: 1px solid var(--eg-border);
	border-radius: var(--eg-radius-sm);
	padding: 10px;
}

.eg-article-details-plugins .citation_formats_list[aria-hidden="false"] {
	display: block;
}

.eg-article-details-plugins .citation_formats_styles {
	list-style: none;
	margin: 0;
	padding: 0;
}

.eg-article-details-plugins .citation_formats_styles li a {
	display: block;
	padding: 5px 8px;
	font-size: 0.8125rem;
	border-radius: 4px;
	overflow-wrap: anywhere;
}

.eg-article-details-plugins .citation_formats_styles li a:hover {
	background-color: var(--eg-bg-secondary);
}

/* Usage Stats Chart */
.usageStatsGraph {
	width: 100%;
	max-height: 260px;
}

.usageStatsUnavailable {
	display: none;
	color: var(--eg-text-muted);
	font-size: 0.875rem;
}

/* 12-Month Views & Downloads Dual-Bar Chart */
.eg-usage-card-header {
	flex-wrap: wrap;
	gap: 8px 16px;
}

.eg-dual-legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	font-size: 0.78125rem;
	font-weight: 600;
	color: #FFF8E8;
}

.eg-legend-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.eg-legend-swatch {
	width: 10px;
	height: 10px;
	border-radius: 3px;
	border: 1px solid rgba(255, 255, 255, 0.55);
	flex-shrink: 0;
}

.eg-legend-swatch-views {
	background: linear-gradient(180deg, #E6B84A 0%, #C18A16 100%);
}

.eg-legend-swatch-downloads {
	background: linear-gradient(180deg, #7A5618 0%, #4A300A 100%);
}

.eg-dual-chart-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 4px;
}

.eg-dual-chart {
	display: grid;
	grid-template-columns: repeat(12, minmax(46px, 1fr));
	gap: 8px;
	align-items: end;
	padding: 14px 10px 10px;
	background-color: #FFFDF9;
	border: 1px solid var(--eg-border-light);
	border-radius: var(--eg-radius-sm);
}

.eg-dual-col {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	min-width: 0;
}

.eg-dual-bars {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	gap: 4px;
	width: 100%;
}

.eg-dual-bar-unit {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.eg-dual-val {
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.1;
	color: var(--eg-heading);
}

.eg-dual-val.is-zero {
	color: var(--eg-text-muted);
	font-weight: 500;
	opacity: 0.7;
}

.eg-dual-track {
	width: 12px;
	height: 108px;
	border-radius: 4px 4px 2px 2px;
	background-color: var(--eg-bg-secondary);
	display: flex;
	align-items: flex-end;
	overflow: hidden;
}

.eg-dual-fill {
	width: 100%;
	border-radius: 4px 4px 0 0;
	transition: height 0.25s ease;
}

.eg-dual-fill-views {
	background: linear-gradient(180deg, #E6B84A 0%, #C18A16 100%);
}

.eg-dual-fill-downloads {
	background: linear-gradient(180deg, #7A5618 0%, #4A300A 100%);
}

.eg-dual-label {
	font-size: 0.6875rem;
	color: var(--eg-text-muted);
	white-space: nowrap;
}

/* PDF & Galley Viewer (OJS pdfJsViewer / htmlArticleGalley) */
html:has(body > .header_view),
body:has(> .header_view),
html:has(body > .galley_view),
body:has(> .galley_view) {
	margin: 0;
	padding: 0;
	height: 100%;
	overflow: hidden;
	font-family: var(--eg-font-sans);
	background-color: #2B2620;
}

.header_view {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	height: 52px;
	display: flex;
	align-items: center;
	background: linear-gradient(90deg, var(--eg-primary-dark) 0%, var(--eg-primary) 60%, var(--eg-secondary) 100%);
	color: #FFFFFF;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	font-family: var(--eg-font-sans);
	font-size: 0.875rem;
	line-height: 1.3;
}

.header_view .return {
	flex: 0 0 52px;
	width: 52px;
	height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #FFFFFF;
	background-color: rgba(0, 0, 0, 0.14);
	border-right: 1px solid rgba(255, 255, 255, 0.2);
	text-decoration: none;
	transition: background-color var(--eg-transition), color var(--eg-transition);
}

.header_view .return::before {
	font-family: "FontAwesome";
	content: "\f060";
	font-size: 1rem;
	line-height: 1;
}

.header_view .return:hover,
.header_view .return:focus-visible {
	background-color: rgba(0, 0, 0, 0.28);
	color: #FFF8E8;
}

.header_view .title {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0 18px;
	color: #FFFFFF;
	font-family: var(--eg-font-serif);
	font-size: 0.96875rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.header_view .title:hover,
.header_view .title:focus-visible {
	color: #FFF8E8;
	text-decoration: underline;
}

.header_view .download {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 34px;
	margin-right: 14px;
	padding: 0 16px;
	border-radius: 999px;
	background-color: #FFFFFF;
	color: var(--eg-primary);
	font-family: var(--eg-font-sans);
	font-size: 0.8125rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
	transition: background-color var(--eg-transition), color var(--eg-transition), transform var(--eg-transition);
}

.header_view .download::before {
	font-family: "FontAwesome";
	content: "\f019";
	font-size: 0.875rem;
	line-height: 1;
}

.header_view .download:hover,
.header_view .download:focus-visible {
	background-color: var(--eg-bg-secondary);
	color: var(--eg-heading);
	transform: translateY(-1px);
}

.galley_view {
	position: fixed;
	top: 52px;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 900;
	display: flex;
	flex-direction: column;
	background-color: #2B2620;
	overflow: hidden;
}

.galley_view iframe {
	display: block;
	width: 100%;
	height: 100%;
	flex: 1 1 auto;
	min-height: 0;
	border: 0;
	margin: 0;
	padding: 0;
	background-color: #525659;
}

.galley_view_notice {
	flex: 0 0 auto;
	background-color: var(--eg-bg-secondary);
	border-bottom: 2px solid var(--eg-secondary);
	color: var(--eg-heading);
	padding: 10px 18px;
	font-size: 0.84375rem;
	line-height: 1.45;
	text-align: center;
}

.galley_view_notice_message {
	max-width: 960px;
	margin: 0 auto;
}

.galley_view_notice_message a {
	color: var(--eg-primary);
	font-weight: 700;
	text-decoration: underline;
}

[dir="rtl"] .header_view .return {
	border-right: 0;
	border-left: 1px solid rgba(255, 255, 255, 0.2);
}

[dir="rtl"] .header_view .return::before {
	content: "\f061";
}

[dir="rtl"] .header_view .download {
	margin-right: 0;
	margin-left: 14px;
}
