/* ==========================================================================
   ShareHub 全站右侧快捷栏
   ========================================================================== */

/* 右侧主题悬浮栏 ---------------------------------------------------------- */
.theme-rail {
	position: fixed;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	z-index: 55;
	width: 72px;
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding: 6px;
	border: 1px solid var(--line-strong);
	border-radius: 15px;
	background: var(--header-bg);
	-webkit-backdrop-filter: blur(16px) saturate(130%);
	backdrop-filter: blur(16px) saturate(130%);
	box-shadow: 0 22px 50px -30px rgba(0, 0, 0, .7);
}
html.scheme-light .theme-rail { background: rgba(255, 255, 255, .9); box-shadow: 0 22px 46px -32px rgba(15, 23, 42, .25); }
.theme-rail-item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	min-height: 57px;
	padding: 8px 3px 7px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--text-dim);
	font-family: inherit;
	cursor: pointer;
	transition: background .18s ease, transform .18s ease, color .18s ease;
}
.theme-rail-item:hover,
.theme-rail-item:focus-visible {
	background: var(--s2);
	color: var(--text);
	transform: translateX(-2px);
}
.theme-rail-item .theme-rail-ico {
	display: grid;
	place-items: center;
	width: 20px;
	height: 20px;
	color: var(--accent);
}
.theme-rail-item .theme-rail-ico .ico { width: 18px; height: 18px; }
.theme-rail-item strong {
	color: var(--text);
	font-size: 10px;
	line-height: 1.2;
	font-weight: 750;
	letter-spacing: -.03em;
	white-space: nowrap;
}
.theme-rail-item em {
	color: var(--muted);
	font-size: 8.5px;
	line-height: 1.2;
	font-style: normal;
	white-space: nowrap;
}
.theme-rail-item.is-buy {
	background: linear-gradient(145deg, #38bdf8, #6366f1 72%);
	box-shadow: 0 10px 22px -14px rgba(56, 189, 248, .9);
}
.theme-rail-item.is-buy:hover { background: linear-gradient(145deg, #22b0f0, #5857e8 72%); }
.theme-rail-item.is-buy .theme-rail-ico,
.theme-rail-item.is-buy strong { color: #04121c; }
.theme-rail-item.is-buy em { color: rgba(4, 18, 28, .64); }
.theme-rail-item.is-vip {
	border: 1px solid rgba(251, 191, 36, .25);
	background: rgba(251, 191, 36, .075);
}
.theme-rail-item.is-vip .theme-rail-ico { color: #f59e0b; }
.theme-rail-item.is-vip strong { color: #b45309; }
html.scheme-dark .theme-rail-item.is-vip strong { color: #fbbf24; }
.theme-rail-item.is-top .theme-rail-ico { color: var(--muted); }
.theme-rail-item.is-top .theme-rail-ico .ico { transform: rotate(-90deg); }
.theme-rail-tip {
	position: absolute;
	right: calc(100% + 12px);
	top: 50%;
	width: 168px;
	padding: 10px 12px;
	border: 1px solid var(--line-strong);
	border-radius: 10px;
	background: var(--card);
	color: var(--text-dim);
	font-size: 10.5px;
	line-height: 1.65;
	text-align: left;
	white-space: normal;
	box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .7);
	opacity: 0;
	pointer-events: none;
	transform: translateY(-50%) translateX(6px);
	transition: opacity .16s ease, transform .16s ease;
}
.theme-rail-tip b { display: block; margin-bottom: 2px; color: var(--text); font-size: 11px; }
.theme-rail-item:hover .theme-rail-tip,
.theme-rail-item:focus-visible .theme-rail-tip {
	opacity: 1;
	transform: translateY(-50%) translateX(0);
}


/* 桌面端为右侧栏预留安全区，仅收窄正文容器，不影响页头和页脚 */
@media (min-width: 1200px) {
	body.has-site-rail .site-main .container,
	body.has-site-rail .site-footer .container {
		max-width: min(var(--maxw), calc(100vw - 200px));
	}
}

@media (max-width: 1199px) {
	.theme-rail { display: none; }
}
