/* 4x4 CHINA 文章分享条 */

.x4share {
	--x4-accent: #E8621A;
	--x4-ink: #16191d;
	--x4-muted: #6b7480;
	--x4-line: #e3e6ea;
	--x4-chip: #f6f7f8;
	margin: 2.6em 0 1.4em;
	padding-top: 1.5em;
	border-top: 1px solid var(--x4-line);
	font-size: 15px;
	line-height: 1.4;
	text-align: center;
}

.x4share__label {
	display: block;
	margin-bottom: .85em;
	font-size: .84em;
	font-weight: 600;
	letter-spacing: .12em;
	color: var(--x4-muted);
}

.x4share__btns {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: .55em;
}

.x4share__btn {
	display: inline-flex;
	align-items: center;
	gap: .45em;
	margin: 0;
	padding: .55em .95em;
	border: 1px solid var(--x4-line);
	border-radius: 999px;
	background: var(--x4-chip);
	color: var(--x4-ink);
	font: inherit;
	font-size: .93em;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: border-color .15s, background .15s, color .15s, transform .15s;
	-webkit-appearance: none;
	appearance: none;
}

.x4share__btn:hover,
.x4share__btn:focus-visible {
	border-color: var(--x4-accent);
	background: #fff;
	color: var(--x4-accent);
	text-decoration: none;
	transform: translateY(-1px);
}

.x4share__btn:focus-visible {
	outline: 2px solid var(--x4-accent);
	outline-offset: 2px;
}

.x4share__icon {
	flex: none;
}

/* 品牌按钮只留图标：名字留在 DOM 里给读屏和搜索引擎，视觉上收起来。 */
.x4share__btn--icon {
	width: 2.5em;
	height: 2.5em;
	padding: 0;
	justify-content: center;
	border-radius: 50%;
}

.x4share__btn--icon .x4share__name {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.x4share__btn--poster {
	border-color: var(--x4-accent);
	background: var(--x4-accent);
	color: #fff;
}

.x4share__btn--poster:hover,
.x4share__btn--poster:focus-visible {
	background: #cf5312;
	border-color: #cf5312;
	color: #fff;
}

/* 弹层 */

.x4share-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(12, 15, 18, .82);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	overscroll-behavior: contain;
}

.x4share-modal[hidden] {
	display: none;
}

.x4share-modal__box {
	position: relative;
	max-width: min(560px, 100%);
	max-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	overflow: auto;
}

.x4share-modal__img {
	display: block;
	width: auto;
	max-width: 100%;
	max-height: calc(100vh - 130px);
	border-radius: 6px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .45);
	background: #fff;
}

.x4share-modal__slot {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.x4share-modal__dl {
	display: inline-flex;
	align-items: center;
	padding: .6em 1.4em;
	border-radius: 999px;
	background: var(--x4-accent, #E8621A);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.x4share-modal__dl:hover {
	background: #cf5312;
	color: #fff;
	text-decoration: none;
}

.x4share-modal__qr {
	max-height: 260px;
	padding: 14px;
}

.x4share-modal__hint {
	margin: 0;
	color: #d8dde2;
	font-size: 14px;
	text-align: center;
	line-height: 1.6;
}

.x4share-modal__status {
	color: #d8dde2;
	font-size: 15px;
	padding: 40px 10px;
	text-align: center;
}

.x4share-modal__close {
	position: absolute;
	top: -46px;
	right: -4px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	font-size: 20px;
	line-height: 36px;
	cursor: pointer;
}

.x4share-modal__close:hover {
	background: rgba(255, 255, 255, .26);
}

/* 复制成功的小提示 */

.x4share-toast {
	position: fixed;
	left: 50%;
	bottom: 40px;
	z-index: 100000;
	transform: translateX(-50%) translateY(8px);
	padding: 11px 20px;
	border-radius: 999px;
	background: rgba(20, 24, 28, .94);
	color: #fff;
	font-size: 14px;
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s, transform .2s;
}

.x4share-toast.is-on {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

@media (max-width: 520px) {
	.x4share__btn span:not(.x4share__always) {
		font-size: .92em;
	}

	.x4share__btns {
		gap: .45em;
	}
}

@media (prefers-color-scheme: dark) {
	.x4share {
		--x4-ink: #e9edf1;
		--x4-muted: #98a2ad;
		--x4-line: #333a42;
		--x4-chip: #1e2429;
	}

	.x4share__btn:hover,
	.x4share__btn:focus-visible {
		background: #262d34;
	}
}

@media (prefers-reduced-motion: reduce) {
	.x4share__btn,
	.x4share-toast {
		transition: none;
	}

	.x4share__btn:hover {
		transform: none;
	}
}

/* ------------------------------------------------------------------
   站点微调：跟分享条无关，只是把 Kadence 文章页脚的标签行也居中，
   好跟上面的分享条对齐。想搬走的话，剪到「外观 → 自定义 → 额外 CSS」
   即可，那才是主题样式的正经位置。
   ------------------------------------------------------------------ */

.entry-footer .entry-tags {
	text-align: center;
}

/* Kadence 把 .tags-links 做成了 flex 容器，所以居中要靠 justify-content，
   text-align 在这里对子元素不起作用。不去改它的 display，免得打架。 */
.entry-footer .tags-links {
	justify-content: center;
	flex-wrap: wrap;
}
