/*
 * 《风水有关系》继续观看 —— 顶部入口样式
 * 桌面端：入口为 .top-bar .header-right ul 内的第一个 li（与登录/注册同栏同样式）；
 * 移动端：主题在 ≤959px 隐藏整个 .top-bar，入口切换到 .site-header（汉堡按钮旁）。
 */

/* ---------- 桌面：top-bar 内的 li ---------- */
.top-bar .fsygx-cw-entry {
	display: inline-block;
	list-style: none;
	margin-left: 15px;
	line-height: 34px;
	position: relative;
}

.fsygx-cw-trigger {
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	font-family: inherit;
	font-size: 13px;
	line-height: 1;
	height: 34px;
	color: #ddd;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	vertical-align: top;
}
.top-bar .fsygx-cw-trigger:hover,
.top-bar .fsygx-cw-entry.is-open .fsygx-cw-trigger {
	color: #fff;
	text-decoration: none;
}

/* ---------- 弹层（桌面锚在 li 下方，右对齐） ---------- */
.fsygx-cw-panel {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	margin-top: 9px; /* top-bar 高 34px，li 行高 1，用 margin 补齐到黑条下沿 */
	width: 340px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
	padding: 14px 16px;
	z-index: 99999;
	text-align: left;
	color: #333;
	font-size: 13px;
	line-height: 1.5;
}
.fsygx-cw-entry.is-open .fsygx-cw-panel {
	display: block;
}
/* 隐形桥接：盖住入口与弹层之间的空隙，鼠标慢移穿过不触发 mouseleave */
.fsygx-cw-panel::before {
	content: '';
	position: absolute;
	top: -16px;
	left: 0;
	right: 0;
	height: 16px;
}

.fsygx-cw-panel-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12px;
	color: #999;
	margin-bottom: 8px;
}
.fsygx-cw-when {
	color: #bbb;
}

.fsygx-cw-focus-title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #222;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.fsygx-cw-focus-sub {
	margin: 4px 0 0;
	font-size: 12px;
	color: #888;
}

.fsygx-cw-track {
	height: 4px;
	background: #eee;
	border-radius: 2px;
	margin-top: 8px;
	overflow: hidden;
}
.fsygx-cw-fill {
	height: 100%;
	background: #1e88e5;
	border-radius: 2px;
}

.fsygx-cw-actions {
	display: flex;
	gap: 8px;
	margin-top: 12px;
}
.fsygx-cw-btn {
	flex: 1;
	padding: 7px 0;
	border: 1px solid #ddd;
	background: #f7f7f7;
	border-radius: 6px;
	font-size: 13px;
	color: #333;
	cursor: pointer;
	font-family: inherit;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
}
.fsygx-cw-btn:hover:not(:disabled) {
	border-color: #1e88e5;
	color: #1e88e5;
}
.fsygx-cw-cont {
	background: #1e88e5;
	border-color: #1e88e5;
	color: #fff;
	font-weight: 600;
}
.fsygx-cw-cont:hover:not(:disabled) {
	background: #1565c0;
	color: #fff;
}
.fsygx-cw-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.fsygx-cw-recent {
	margin-top: 12px;
	border-top: 1px solid #f0f0f0;
	padding-top: 8px;
	max-height: 220px;
	overflow: auto;
}
.fsygx-cw-recent-label {
	font-size: 12px;
	color: #999;
	margin-bottom: 4px;
}
.fsygx-cw-recent-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	padding: 5px 4px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 12.5px;
}
.fsygx-cw-recent-item:hover {
	background: #f5f8fc;
}
.fsygx-cw-recent-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	color: #444;
}
.fsygx-cw-recent-status {
	flex: none;
	color: #1e88e5;
}
.fsygx-cw-recent-status.done {
	color: #2ea35c;
}

.fsygx-cw-empty {
	padding: 18px 6px;
	text-align: center;
	color: #999;
	font-size: 13px;
	line-height: 1.7;
}

.fsygx-cw-sync-note {
	margin-top: 10px;
	padding-top: 8px;
	border-top: 1px dashed #eee;
	font-size: 11.5px;
	color: #2ea35c;
}

/* ---------- 移动端备用入口（默认隐藏，≤959px 显示） ---------- */
.fsygx-cw-entry-mobile {
	display: none;
}

@media only screen and (max-width: 959px) {
	/* 整条站头悬浮：主题移动端（<960px）无任何悬浮逻辑，这里整体 sticky。
	   桌面端（≥960px）主题自有 main-nav-scrolled 逻辑，不受影响 */
	.site-header {
		position: sticky;
		top: 0;
		z-index: 9990;
		background: #fff;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	}
	/* 入口与搜索图标同高（40px）同顶（top:8），间距 8px（44+8=52）；
	   站头已悬浮，入口跟随站头即可，不需自身 fixed */
	.fsygx-cw-entry-mobile {
		display: inline-block;
		position: absolute;
		top: 8px;
		right: 52px;
	}
	/* 站内头部是白底：胶囊用白底深字（原白字样式在白底上不可见） */
	.fsygx-cw-entry-mobile .fsygx-cw-trigger {
		font-size: 14px;
		line-height: 1;
		height: 40px;
		padding: 0 14px;
		border: 1px solid #e2e6ea;
		border-radius: 999px;
		color: #444;
		background: #fff;
		vertical-align: middle;
	}
	.fsygx-cw-entry-mobile .fsygx-cw-trigger:hover,
	.fsygx-cw-entry-mobile.is-open .fsygx-cw-trigger {
		color: #1e88e5;
		border-color: #1e88e5;
	}
	.fsygx-cw-entry-mobile .fsygx-cw-panel {
		/* 视口定位，落在悬浮站头下方（站头高约 110px） */
		position: fixed;
		top: 118px;
		left: 8px;
		right: 8px;
		width: auto;
		max-height: calc(100vh - 130px);
		overflow: auto;
	}
	.fsygx-cw-entry-mobile .fsygx-cw-trigger .fsygx-cw-trigger-text {
		font-size: 13px;
	}
}

/* 主题关闭 top-bar 时，备用入口全宽常显 */
.fsygx-cw-no-topbar .fsygx-cw-entry-mobile {
	display: inline-block;
}
