/**
 * RTM Child Theme - article action bar (Download / Share / Cite)
 * Loaded automatically by the theme; do not paste this into the
 * journal stylesheet field.
 */

/* ------------------------------------------------------
   Action bar
   ------------------------------------------------------ */
.rtm-actions-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 1px;
	background: #dfe4ea;
	border: 1px solid #dfe4ea;
	border-radius: 3px;
	overflow: hidden;
	margin: 0 0 1rem;
}

.rtm-act {
	flex: 1 1 0;
	min-width: 84px;
	display: flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: .3rem;
	padding: .7rem .35rem .6rem;
	background: #f4f6f8;
	border: 0;
	color: #333333;
	font-size: .72rem;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
}

.rtm-act:hover,
.rtm-act:focus {
	background: #005BAA;
	color: #ffffff;
	outline: none;
}

.rtm-act svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.rtm-act-download svg { stroke-width: 1.9; }

/* ------------------------------------------------------
   Sidebar order: bar, then How to Cite, then the rest
   ------------------------------------------------------ */
.rtm-has-actions-bar .entry_details {
	display: flex;
	flex-direction: column;
}

.rtm-has-actions-bar .entry_details > .rtm-actions-bar { order: 0; }
.rtm-has-actions-bar .entry_details > .item.citation   { order: 1; border-top: 0; padding-top: 0; }
.rtm-has-actions-bar .entry_details > .item            { order: 5; }

/* ------------------------------------------------------
   Hide the controls the bar replaces
   ------------------------------------------------------ */
.rtm-has-actions-bar .entry_details > .item.galleys,
.rtm-has-actions-bar .entry_details .item.citation .citation_formats,
.rtm-has-actions-bar .entry_details .item.citation .dropdown {
	display: none !important;
}

.rtm-has-actions-bar .entry_details .item.citation .label,
.rtm-has-actions-bar .entry_details .item.citation h2 {
	font-size: .72rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #555555;
}

.rtm-has-actions-bar #citationOutput {
	font-size: .82rem;
	line-height: 1.55;
	color: #555555;
}

/* ------------------------------------------------------
   Modal
   ------------------------------------------------------ */
.rtm-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(13, 35, 64, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	padding: 1rem;
}

.rtm-modal-overlay[hidden] { display: none !important; }

.rtm-modal {
	background: #ffffff;
	border-radius: 4px;
	width: 100%;
	max-width: 520px;
	max-height: 85vh;
	overflow-y: auto;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
}

.rtm-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	background: #005BAA;
	color: #ffffff;
	padding: .7rem 1rem;
}

.rtm-modal-title {
	font-size: 1.05rem;
	font-weight: 500;
}

.rtm-modal-close {
	background: none;
	border: 0;
	color: #ffffff;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	padding: 0 .2rem;
}

.rtm-modal-body { padding: 1.15rem; }

/* ------------------------------------------------------
   Share grid
   ------------------------------------------------------ */
.rtm-share-grid {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
}

.rtm-share-btn {
	width: 48px;
	height: 48px;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #ffffff !important;
	text-decoration: none !important;
	transition: opacity .15s ease;
}

.rtm-share-btn:hover { opacity: .85; }

.rtm-share-btn svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

.rtm-share-btn.rtm-share-mail svg,
.rtm-share-btn.rtm-share-link svg {
	fill: none;
	stroke: currentColor;
}

.rtm-share-fb   { background: #4267B2; }
.rtm-share-x    { background: #111111; }
.rtm-share-mail { background: #8A8F94; }
.rtm-share-wa   { background: #25D366; }
.rtm-share-li   { background: #0A66C2; }
.rtm-share-link { background: #7CBB3F; }

.rtm-share-btn.rtm-copied { box-shadow: 0 0 0 3px rgba(0, 91, 170, .45); }

/* ------------------------------------------------------
   Cite modal
   ------------------------------------------------------ */
.rtm-cite-text {
	font-size: .9rem;
	line-height: 1.6;
	color: #333333;
	background: #f4f6f8;
	border-inline-start: 3px solid #005BAA;
	padding: .8rem .9rem;
	margin: 0 0 .75rem;
	min-height: 3.2rem;
	transition: opacity .15s ease;
}

.rtm-cite-text.rtm-cite-loading {
	opacity: .5;
	font-style: italic;
}

.rtm-cite-legend {
	font-size: .68rem;
	text-transform: uppercase;
	letter-spacing: .06em;
	font-weight: 700;
	color: #8A8F94;
	margin: 1.1rem 0 .5rem;
	padding-bottom: .3rem;
	border-bottom: 1px solid #e6e9ed;
}

.rtm-cite-row {
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
}

.rtm-cite-row-copy { margin-bottom: .25rem; }

.rtm-cite-action {
	display: inline-flex;
	align-items: center;
	background: #ffffff;
	border: 1px solid #005BAA;
	border-radius: 3px;
	color: #005BAA !important;
	font-size: .76rem;
	font-weight: 600;
	padding: .4rem .7rem;
	cursor: pointer;
	text-decoration: none !important;
	transition: background .12s ease, color .12s ease;
}

.rtm-cite-action:hover {
	background: #005BAA;
	color: #ffffff !important;
}

.rtm-cite-action.rtm-active {
	background: #005BAA;
	color: #ffffff !important;
	border-color: #005BAA;
}

.rtm-cite-action.rtm-cite-dl {
	border-color: #7A8390;
	color: #4A525C !important;
	background: #f4f6f8;
}

.rtm-cite-action.rtm-cite-dl:hover {
	background: #4A525C;
	color: #ffffff !important;
	border-color: #4A525C;
}

.rtm-cite-action.rtm-cite-copy.rtm-copied {
	background: #1F8A3B;
	border-color: #1F8A3B;
	color: #ffffff !important;
}

/* ------------------------------------------------------
   RTL / small screens
   ------------------------------------------------------ */
html[lang^="ar"] .rtm-act,
body[dir="rtl"] .rtm-act { font-size: .78rem; }

@media (max-width: 767px) {
	.rtm-act { min-width: 72px; padding: .6rem .25rem .5rem; font-size: .68rem; }
	.rtm-act svg { width: 20px; height: 20px; }
}
