/*
 * J-HyTEL Global Authorship
 * Shared stylesheet for Archives and Additional Page
 * Version 1.0.2
 *
 * Upload to:
 * /public_html/assets/jhytel-global-authorship/jhytel-global-authorship.css
 */

/* =========================================================
   ARCHIVES: COMPACT GLOBAL AUTHORSHIP STATISTICS
   ========================================================= */

#jhSingleArchive .jhsa-global-stats,
#jhSingleArchive .jhsa-global-stats * {
	box-sizing: border-box;
}

#jhSingleArchive .jhsa-global-stats {
	--jga-wine: #610c3a;
	--jga-wine-dark: #35122f;
	--jga-wine-hover: #8d0d54;
	--jga-muted: #786a71;
	--jga-line: #e8dde2;

	position: relative;
	display: grid;
	grid-template-columns:
		minmax(220px, 1.35fr)
		minmax(145px, 0.8fr)
		minmax(145px, 0.8fr)
		auto;
	gap: 14px;
	align-items: center;
	margin: 0 0 13px;
	padding: 12px 14px;
	border: 1px solid var(--jga-line);
	border-left: 4px solid var(--jga-wine);
	border-radius: 13px;
	background: linear-gradient(
		110deg,
		#ffffff 0%,
		#fdf9fb 72%,
		#fff7fb 100%
	);
	box-shadow: 0 5px 15px rgba(53, 18, 47, 0.05);
	font-family: "Perpetua", Georgia, "Times New Roman", serif;
}

#jhSingleArchive .jhsa-global-stats__intro {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

#jhSingleArchive .jhsa-global-stats__icon {
	display: inline-flex;
	width: 38px;
	height: 38px;
	flex: 0 0 38px;
	align-items: center;
	justify-content: center;
	border: 1px solid #dec8d3;
	border-radius: 50%;
	background: #fff9fc;
	color: var(--jga-wine);
}

#jhSingleArchive .jhsa-global-stats__icon svg,
#jhSingleArchive .jhsa-global-stats__button svg {
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

#jhSingleArchive .jhsa-global-stats__icon svg {
	width: 19px;
	height: 19px;
}

#jhSingleArchive .jhsa-global-stats__heading {
	display: block;
	min-width: 0;
}

#jhSingleArchive .jhsa-global-stats__heading small,
#jhSingleArchive .jhsa-global-stats__metric small {
	display: block;
	color: var(--jga-muted);
	font-size: 12px;
	font-style: italic;
	line-height: 1.15;
}

#jhSingleArchive .jhsa-global-stats__heading strong {
	display: block;
	margin-top: 2px;
	overflow: hidden;
	color: var(--jga-wine-dark);
	font-size: 17px;
	font-style: italic;
	font-weight: 400;
	line-height: 1.15;
	text-overflow: ellipsis;
	white-space: nowrap;
}

#jhSingleArchive .jhsa-global-stats__metric {
	min-width: 0;
	padding-left: 13px;
	border-left: 1px solid #e8dce2;
}

#jhSingleArchive .jhsa-global-stats__metric strong {
	display: block;
	margin-top: 2px;
	color: var(--jga-wine);
	font-size: 24px;
	font-style: italic;
	font-weight: 400;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

#jhSingleArchive .jhsa-global-stats__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	min-height: 39px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid var(--jga-wine);
	border-radius: 999px;
	background: var(--jga-wine);
	color: #fff;
	font-family: "Perpetua", Georgia, serif;
	font-size: 14px;
	font-style: italic;
	cursor: pointer;
	white-space: nowrap;
	transition:
		background 0.18s ease,
		transform 0.18s ease,
		opacity 0.18s ease;
}

#jhSingleArchive .jhsa-global-stats__button svg {
	width: 15px;
	height: 15px;
}

#jhSingleArchive .jhsa-global-stats__button:hover,
#jhSingleArchive .jhsa-global-stats__button:focus-visible {
	background: var(--jga-wine-hover);
	transform: translateY(-1px);
}

#jhSingleArchive .jhsa-global-stats__status {
	position: absolute;
	right: 14px;
	bottom: -18px;
	color: #8a7981;
	font-size: 11px;
	font-style: italic;
	line-height: 1.2;
}

/* =========================================================
   ADDITIONAL PAGE: ORIGINAL VISUAL STYLE + HOVER
   Typography, icon, and button styling are inherited from the
   existing .jhytel-geo-* CSS already used by the Additional Page.
   ========================================================= */

.jhytel-geo-card--shared {
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 16px;

	/*
	 * Compact only this shared teaser.
	 * This removes the excessive upper spacing without changing
	 * the original typography, colors, or button design.
	 */
	min-height: 0 !important;
	margin-top: 18px !important;
	margin-bottom: 18px !important;
	padding-top: 14px !important;
	padding-bottom: 14px !important;

	transition:
		transform 0.2s ease,
		border-color 0.2s ease,
		box-shadow 0.2s ease;
}

.jhytel-geo-card--shared:hover,
.jhytel-geo-card--shared:focus-within {
	border-color: #d7bdca;
	box-shadow: 0 12px 28px rgba(53, 18, 47, 0.11);
	transform: translateY(-3px);
}

.jhytel-geo-card--shared .jhytel-geo-button {
	cursor: pointer;
	transition:
		transform 0.18s ease,
		box-shadow 0.18s ease;
}

.jhytel-geo-card--shared .jhytel-geo-statistics--shared {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
}

.jhytel-geo-card--shared
	.jhytel-geo-statistics--shared .jhytel-geo-stat {
	min-width: 86px;
	margin: 0;
}

/*
 * Keep the former .jhytel-geo-stat visual style.
 * Only normalize its internal spacing and number alignment.
 */
.jhytel-geo-card--shared
	.jhytel-geo-statistics--shared .jhytel-geo-stat strong {
	display: block;
	font-variant-numeric: tabular-nums;
	line-height: 1;
}

.jhytel-geo-card--shared
	.jhytel-geo-statistics--shared .jhytel-geo-stat span {
	display: block;
	margin-top: 3px;
}

.jhytel-geo-card--shared:hover .jhytel-geo-button,
.jhytel-geo-card--shared .jhytel-geo-button:hover,
.jhytel-geo-card--shared .jhytel-geo-button:focus-visible {
	transform: translateY(-1px);
}

.jhytel-geo-card--shared .jhytel-geo-button span[aria-hidden="true"] {
	display: inline-block;
	transition: transform 0.18s ease;
}

.jhytel-geo-card--shared:hover
	.jhytel-geo-button span[aria-hidden="true"],
.jhytel-geo-card--shared
	.jhytel-geo-button:hover span[aria-hidden="true"],
.jhytel-geo-card--shared
	.jhytel-geo-button:focus-visible span[aria-hidden="true"] {
	transform: translateX(3px);
}

.jhytel-geo-card--shared .jhytel-geo-status {
	display: none;
	grid-column: 1 / -1;
}

.jhytel-geo-card--shared .jhytel-geo-status.is-error {
	display: block;
}

@media (max-width: 760px) {
	.jhytel-geo-card--shared {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 12px;
	}

	.jhytel-geo-card--shared .jhytel-geo-summary {
		min-width: 0;
	}

	.jhytel-geo-card--shared .jhytel-geo-button {
		grid-column: 1 / -1;
		justify-self: start;
	}
}

@media (max-width: 520px) {
	.jhytel-geo-card--shared {
		grid-template-columns: minmax(0, 1fr);
		padding-top: 12px !important;
		padding-bottom: 12px !important;
	}

	.jhytel-geo-card--shared
		.jhytel-geo-statistics--shared {
		justify-content: flex-start;
	}

	.jhytel-geo-card--shared .jhytel-geo-button {
		grid-column: auto;
	}
}

/* =========================================================
   SHARED POPUP
   ========================================================= */

body.jhsa-global-modal-open {
	overflow: hidden;
}

.jhsa-global-modal,
.jhsa-global-modal * {
	box-sizing: border-box;
}

.jhsa-global-modal {
	--jga-wine: #610c3a;
	--jga-wine-dark: #35122f;
	--jga-wine-hover: #8d0d54;

	position: fixed;
	z-index: 999999;
	inset: 0;
	display: grid;
	place-items: center;
	padding: 18px;
}

.jhsa-global-modal[hidden] {
	display: none !important;
}

.jhsa-global-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(32, 19, 28, 0.58);
	backdrop-filter: blur(3px);
}

.jhsa-global-dialog {
	position: relative;
	display: flex;
	width: min(1010px, 96vw);
	max-height: min(790px, 94vh);
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #e5c8d8;
	border-top: 4px solid var(--jga-wine);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 24px 70px rgba(44, 19, 37, 0.28);
	color: #30262b;
	font-family: "Perpetua", Georgia, "Times New Roman", serif;
}

.jhsa-global-dialog__header {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	justify-content: space-between;
	padding: 19px 21px 15px;
	border-bottom: 1px solid #eadfe5;
	background: linear-gradient(
		110deg,
		#fff 0%,
		#fff8fc 72%,
		#fceeff 100%
	);
}

.jhsa-global-dialog__kicker {
	display: block;
	margin-bottom: 3px;
	color: #9a0c58;
	font-size: 12px;
	font-style: italic;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

.jhsa-global-dialog__header h2 {
	margin: 0 !important;
	color: var(--jga-wine-dark) !important;
	font-family: "Perpetua", Georgia, serif !important;
	font-size: clamp(25px, 3vw, 32px) !important;
	font-style: italic !important;
	font-weight: 400 !important;
	line-height: 1.08 !important;
}

.jhsa-global-dialog__header p {
	max-width: 690px;
	margin: 6px 0 0 !important;
	color: #73636b !important;
	font-size: 15px !important;
	line-height: 1.4 !important;
}

.jhsa-global-dialog__close {
	display: grid;
	width: 39px;
	height: 39px;
	flex: 0 0 39px;
	place-items: center;
	border: 1px solid #ead6e1;
	border-radius: 50%;
	background: #fffafc;
	color: #6f214c;
	font: inherit;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.jhsa-global-dialog__metrics {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	border-bottom: 1px solid #eee4e9;
	background: #fff;
}

.jhsa-global-dialog__metrics > div {
	display: flex;
	gap: 8px;
	align-items: baseline;
	justify-content: center;
	padding: 10px 14px;
	border-right: 1px solid #eee4e9;
}

.jhsa-global-dialog__metrics > div:last-child {
	border-right: 0;
}

.jhsa-global-dialog__metrics small {
	color: #74636c;
	font-size: 13px;
	font-style: italic;
}

.jhsa-global-dialog__metrics strong {
	color: #750b47;
	font-size: 22px;
	font-style: italic;
	font-weight: 400;
	font-variant-numeric: tabular-nums;
}

.jhsa-global-dialog__tools {
	display: grid;
	grid-template-columns: minmax(150px, 1fr) minmax(230px, 330px) auto;
	gap: 12px;
	align-items: center;
	padding: 12px 18px;
	border-bottom: 1px solid #eee4e9;
	background: #fffafb;
}

.jhsa-global-dialog__tools label {
	color: #5a414d;
	font-size: 15px;
	font-style: italic;
}

.jhsa-global-dialog__search-wrap {
	position: relative;
}

.jhsa-global-dialog__search-wrap svg {
	position: absolute;
	top: 50%;
	left: 11px;
	width: 16px;
	height: 16px;
	color: #8e6a7d;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	transform: translateY(-50%);
	pointer-events: none;
}

.jhsa-global-dialog__search-wrap input {
	display: block;
	width: 100%;
	height: 38px;
	margin: 0 !important;
	padding: 7px 11px 7px 35px !important;
	border: 1px solid #ddd0d6 !important;
	border-radius: 9px !important;
	background: #fff !important;
	box-shadow: none !important;
	color: #34282d !important;
	font-family: "Perpetua", Georgia, serif !important;
	font-size: 15px !important;
}

.jhsa-global-dialog__result-status {
	color: #806e77;
	font-size: 12px;
	font-style: italic;
	white-space: nowrap;
}

.jhsa-country-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	min-height: 130px;
	padding: 14px 18px 16px;
	overflow: auto;
}

.jhsa-country-list__loading,
.jhsa-country-list__empty {
	grid-column: 1 / -1;
	align-self: center;
	padding: 26px 14px;
	color: #77656e;
	font-size: 16px;
	font-style: italic;
	text-align: center;
}

.jhsa-country-card {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr) auto;
	gap: 9px;
	align-items: center;
	min-width: 0;
	padding: 9px 10px;
	border: 1px solid #eee2e8;
	border-radius: 10px;
	background: #fffafb;
}

.jhsa-country-card.is-hidden {
	display: none;
}

.jhsa-country-card__flag {
	display: block;
	width: 32px;
	height: 22px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 3px;
	object-fit: cover;
}

.jhsa-country-card__flag-fallback {
	display: grid;
	width: 32px;
	height: 22px;
	place-items: center;
	font-family: "Segoe UI Emoji", sans-serif;
	font-size: 19px;
}

.jhsa-country-card__copy {
	min-width: 0;
}

.jhsa-country-card__name {
	display: block;
	overflow: hidden;
	color: #3d3036;
	font-size: 15px;
	line-height: 1.15;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.jhsa-country-card__bar {
	display: block;
	width: 100%;
	height: 5px;
	margin-top: 5px;
	overflow: hidden;
	border-radius: 999px;
	background: #eadfe5;
}

.jhsa-country-card__bar > span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--jga-wine-hover);
}

.jhsa-country-card__total {
	display: grid;
	justify-items: end;
	color: #765d69;
	font-size: 10px;
	font-style: italic;
	line-height: 1.1;
}

.jhsa-country-card__total strong {
	color: var(--jga-wine);
	font-size: 19px;
	font-style: italic;
	font-weight: 400;
	font-variant-numeric: tabular-nums;
}

.jhsa-global-dialog__note {
	margin: 0 !important;
	padding: 8px 18px;
	border-top: 1px solid #f0e5ea;
	background: #fffaf1;
	color: #725a3d !important;
	font-size: 12px !important;
	line-height: 1.35 !important;
}

.jhsa-global-dialog__note:empty {
	display: none;
}

.jhsa-global-dialog__footer {
	display: flex;
	gap: 14px;
	align-items: center;
	justify-content: space-between;
	padding: 10px 18px;
	border-top: 1px solid #eadfe5;
	background: #fffafc;
}

.jhsa-global-dialog__footer span {
	color: #68565f;
	font-size: 12px;
}

.jhsa-global-dialog__done {
	min-width: 78px;
	padding: 8px 15px;
	border: 1px solid var(--jga-wine);
	border-radius: 999px;
	background: var(--jga-wine);
	color: #fff;
	font: inherit;
	cursor: pointer;
}

.jhsa-global-dialog__done:hover,
.jhsa-global-dialog__done:focus-visible {
	background: var(--jga-wine-hover);
}

@media (max-width: 820px) {
	#jhSingleArchive .jhsa-global-stats {
		grid-template-columns:
			minmax(0, 1fr)
			repeat(2, minmax(125px, 0.7fr));
	}

	#jhSingleArchive .jhsa-global-stats__button {
		grid-column: 1 / -1;
		justify-self: start;
	}

	.jhsa-country-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.jhytel-geo-card--shared {
		grid-template-columns: 42px minmax(0, 1fr);
		padding: 13px;
	}

	.jhytel-geo-card--shared .jhytel-geo-icon {
		width: 40px;
		height: 40px;
	}

	.jhytel-geo-card--shared .jhytel-geo-button {
		grid-column: 1 / -1;
		justify-self: start;
	}

	.jhytel-geo-card--shared .jhytel-geo-status {
		grid-column: 1 / -1;
	}
}

@media (max-width: 620px) {
	#jhSingleArchive .jhsa-global-stats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	#jhSingleArchive .jhsa-global-stats__intro,
	#jhSingleArchive .jhsa-global-stats__button {
		grid-column: 1 / -1;
	}

	#jhSingleArchive .jhsa-global-stats__metric {
		padding-left: 0;
		border-left: 0;
	}

	#jhSingleArchive .jhsa-global-stats__status {
		position: static;
		grid-column: 1 / -1;
	}

	.jhsa-global-modal {
		padding: 8px;
	}

	.jhsa-global-dialog {
		width: 100%;
		max-height: 96vh;
		border-radius: 13px;
	}

	.jhsa-global-dialog__header {
		padding: 15px;
	}

	.jhsa-global-dialog__metrics {
		grid-template-columns: 1fr;
	}

	.jhsa-global-dialog__metrics > div {
		justify-content: flex-start;
		border-right: 0;
		border-bottom: 1px solid #eee4e9;
		padding: 7px 15px;
	}

	.jhsa-global-dialog__metrics > div:last-child {
		border-bottom: 0;
	}

	.jhsa-global-dialog__tools {
		grid-template-columns: 1fr;
		padding: 11px 13px;
	}

	.jhsa-global-dialog__result-status {
		white-space: normal;
	}

	.jhsa-country-list {
		grid-template-columns: 1fr;
		padding: 11px 13px 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.jhytel-geo-card--shared,
	.jhytel-geo-card--shared .jhytel-geo-button,
	.jhytel-geo-card--shared
		.jhytel-geo-button span[aria-hidden="true"],
	#jhSingleArchive .jhsa-global-stats__button {
		transition: none !important;
	}

	.jhytel-geo-card--shared:hover,
	.jhytel-geo-card--shared:focus-within,
	.jhytel-geo-card--shared:hover .jhytel-geo-button,
	.jhytel-geo-card--shared .jhytel-geo-button:hover,
	.jhytel-geo-card--shared .jhytel-geo-button:focus-visible,
	#jhSingleArchive .jhsa-global-stats__button:hover,
	#jhSingleArchive .jhsa-global-stats__button:focus-visible {
		transform: none !important;
	}
}
