/*
	cyz_kefu —— 右侧悬浮客服条
	全部选择器以 .ck 前缀隔离，不修改主题；不依赖任何前端框架。
	默认视觉按效果图：白色圆角方块 + 浅灰线性图标 + 贴右侧垂直居中。
*/

.cyz-kefu,
.cyz-kefu * {
	box-sizing: border-box;
}

.cyz-kefu {
	position: fixed;
	top: 0;
	right: 0;
	width: 0;
	height: 0;
	z-index: var(--ck-z, 1050);
	font-family: inherit;
	font-size: 13px;
	line-height: 1.55;
	color: #26282b;
	text-align: left;
	-webkit-font-smoothing: antialiased;
	pointer-events: none;
}

.cyz-kefu [hidden] {
	display: none !important;
}

.cyz-kefu button {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.cyz-kefu a,
.cyz-kefu a:hover,
.cyz-kefu a:focus {
	color: inherit;
	text-decoration: none;
}

/* ------------------------------------------------------------------
   右侧按钮列
------------------------------------------------------------------ */
.ck-rail {
	position: fixed;
	top: 50%;
	right: var(--ck-right, 14px);
	transform: translateY(-50%);
	display: flex;
	flex-direction: column;
	gap: var(--ck-gap, 8px);
	z-index: 2;
	pointer-events: auto;
}

.ck-item {
	position: relative;
	width: var(--ck-size, 48px);
	height: var(--ck-size, 48px);
}

.ck-item[data-ck-top-item] {
	transition: opacity 0.18s ease, visibility 0.18s ease;
}

.ck-item[data-ck-top-item].is-top-hidden {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.ck-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 8px;
	background: #fff;
	color: var(--ck-icon, #8b8b8b);
	box-shadow:
		0 1px 2px rgba(0, 0, 0, 0.055),
		0 0 0 1px rgba(0, 0, 0, 0.028);
	line-height: 1;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	transition:
		color 0.18s ease,
		background-color 0.18s ease,
		box-shadow 0.18s ease,
		transform 0.18s ease;
}

.ck-btn:hover,
.ck-btn:focus-visible {
	color: var(--ck-icon-hover, #5f6368);
	background: #fdfdfd;
	box-shadow:
		0 4px 12px rgba(0, 0, 0, 0.09),
		0 0 0 1px rgba(0, 0, 0, 0.04);
	transform: translateX(-2px);
}

.ck-btn:active {
	transform: translateX(-1px) scale(0.97);
}

.ck-btn[aria-expanded="true"] {
	color: var(--ck-icon-hover, #5f6368);
	background: #fdfdfd;
	box-shadow:
		0 4px 12px rgba(0, 0, 0, 0.09),
		0 0 0 1px rgba(0, 0, 0, 0.04);
	transform: translateX(-2px);
}

.ck-btn:focus-visible {
	outline: 2px solid #b9bdc2;
	outline-offset: 2px;
}

/* 「去发帖」是 <a> 链接：补一条比 .cyz-kefu a 更高优先级的颜色规则 */
.cyz-kefu a.ck-btn {
	color: var(--ck-icon, #8b8b8b);
}

.cyz-kefu a.ck-btn:hover,
.cyz-kefu a.ck-btn:focus-visible {
	color: var(--ck-icon-hover, #5f6368);
}

.ck-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.ck-icon svg {
	display: block;
	width: 54%;
	height: 54%;
	max-width: 28px;
	max-height: 28px;
}

.ck-tip {
	position: absolute;
	top: 50%;
	right: calc(100% + 9px);
	z-index: 3;
	padding: 6px 9px;
	border-radius: 6px;
	background: #303338;
	color: #fff;
	font-size: 12px;
	line-height: 1;
	white-space: nowrap;
	opacity: 0;
	transform: translate(4px, -50%);
	transition: opacity 0.16s ease, transform 0.16s ease;
	pointer-events: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.ck-tip::after {
	content: "";
	position: absolute;
	top: 50%;
	right: -4px;
	width: 8px;
	height: 8px;
	background: #303338;
	transform: translateY(-50%) rotate(45deg);
}

.ck-item:hover .ck-tip,
.ck-item:focus-within .ck-tip {
	opacity: 1;
	transform: translate(0, -50%);
}

.cyz-kefu.is-panel-open .ck-tip {
	opacity: 0 !important;
}

/* ------------------------------------------------------------------
   弹层
------------------------------------------------------------------ */
.ck-panel {
	position: fixed;
	top: 50%;
	right: calc(var(--ck-right, 14px) + var(--ck-size, 48px) + 12px);
	transform: translateY(-50%);
	width: 296px;
	max-width: calc(100vw - var(--ck-right, 14px) - var(--ck-size, 48px) - 28px);
	max-height: calc(100vh - 32px);
	overflow-x: hidden;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 14px;
	box-shadow:
		0 18px 48px rgba(0, 0, 0, 0.14),
		0 4px 14px rgba(0, 0, 0, 0.06);
	z-index: 1;
	pointer-events: auto;
	animation: ck-panel-in 0.18s ease both;
	overscroll-behavior: contain;
}

.ck-panel:focus {
	outline: none;
}

@keyframes ck-panel-in {
	from {
		opacity: 0;
		transform: translate(8px, -50%);
	}
	to {
		opacity: 1;
		transform: translate(0, -50%);
	}
}

.ck-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 15px 15px 0 17px;
}

.ck-head-text {
	min-width: 0;
}

.ck-title {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: #1f2226;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 0.01em;
}

.ck-sub {
	margin: 3px 0 0;
	color: #9a9fa5;
	font-size: 11.5px;
	line-height: 1.4;
}

.ck-close {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	margin: -2px -3px 0 0;
	border-radius: 7px;
	color: #a0a4a9;
	transition: color 0.16s ease, background-color 0.16s ease;
}

.ck-close:hover,
.ck-close:focus-visible {
	color: #3d4146;
	background: #f3f3f3;
}

.ck-close:focus-visible {
	outline: 2px solid #b9bdc2;
	outline-offset: 1px;
}

.ck-body {
	padding: 13px 17px 17px;
}

/* ------------------------------------------------------------------
   联系卡片
------------------------------------------------------------------ */
.ck-rows {
	border: 1px solid #f0f0f0;
	border-radius: 10px;
	overflow: hidden;
}

.ck-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 9px 12px;
	border-bottom: 1px solid #f3f3f3;
	font-size: 12.5px;
	transition: background-color 0.15s ease;
}

.ck-row:last-child {
	border-bottom: 0;
}

.ck-row:hover {
	background: #fafafa;
}

.ck-row-static:hover {
	background: transparent;
}

.ck-row-label {
	flex-shrink: 0;
	color: #969ba1;
}

.ck-row-value {
	min-width: 0;
	color: #2d3034;
	font-weight: 500;
	text-align: right;
	overflow-wrap: anywhere;
}

.ck-note {
	margin: 12px 0 0;
	color: #7d8288;
	font-size: 12px;
	line-height: 1.7;
	overflow-wrap: anywhere;
}

.ck-note-center {
	text-align: center;
}

.ck-action {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	margin-top: 13px;
	padding: 9px 12px;
	border-radius: 8px;
	background: #23262a;
	color: #fff !important;
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.35;
	text-align: center;
	transition: background-color 0.16s ease, transform 0.16s ease;
}

.ck-action:hover,
.ck-action:focus-visible {
	background: #000;
	color: #fff !important;
}

.ck-action:focus-visible {
	outline: 2px solid #b9bdc2;
	outline-offset: 2px;
}

.ck-hint {
	margin: 12px 0 0;
	padding-top: 11px;
	border-top: 1px solid #f2f2f2;
	color: #a0a4a9;
	font-size: 11.5px;
	line-height: 1.6;
}

/* ------------------------------------------------------------------
   二维码 / 占位图标
------------------------------------------------------------------ */
.ck-qr {
	width: 178px;
	max-width: 100%;
	margin: 3px auto 12px;
	padding: 6px;
	border: 1px solid #f0f0f0;
	border-radius: 10px;
	background: #fff;
}

.ck-qr img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 5px;
}

.ck-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 92px;
	height: 92px;
	margin: 5px auto 13px;
	border-radius: 50%;
	background: #f7f7f7;
	color: #9da2a8;
}

.ck-logo svg {
	width: 42px;
	height: 42px;
}

.ck-logo-qq svg {
	width: 39px;
	height: 39px;
}

.ck-copy {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 9px 8px 11px;
	border-radius: 8px;
	background: #f7f7f7;
}

.ck-copy-label {
	flex-shrink: 0;
	color: #90959b;
	font-size: 11.5px;
}

.ck-copy code {
	min-width: 0;
	flex: 1;
	padding: 0;
	background: transparent;
	color: #272a2e;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 12.5px;
	text-align: left;
	overflow-wrap: anywhere;
}

.ck-copy-btn {
	flex-shrink: 0;
	padding: 4px 9px;
	border: 1px solid #e1e1e1;
	border-radius: 6px;
	background: #fff;
	color: #4d5156;
	font-size: 11.5px;
	line-height: 1.4;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.ck-copy-btn:hover,
.ck-copy-btn:focus-visible {
	border-color: #bfc3c7;
	color: #181a1d;
}

.ck-copy-btn:focus-visible {
	outline: 2px solid #b9bdc2;
	outline-offset: 1px;
}

.ck-copy-btn.is-copied {
	border-color: #b7d8bf;
	background: #f2fbf4;
	color: #2d7a3d;
}

/* ------------------------------------------------------------------
   移动端
------------------------------------------------------------------ */
@media (max-width: 767px) {
	.ck-rail {
		right: 8px;
		gap: 7px;
	}

	.ck-item {
		width: 44px;
		height: 44px;
	}

	.ck-btn {
		border-radius: 8px;
	}

	.ck-icon svg {
		width: 24px;
		height: 24px;
	}

	.ck-tip {
		display: none;
	}

	.ck-panel {
		top: auto;
		right: 10px;
		bottom: 10px;
		left: 10px;
		width: auto;
		max-width: none;
		max-height: min(72vh, calc(100vh - 84px));
		transform: none;
		border-radius: 14px;
		animation-name: ck-panel-in-mobile;
	}

	@keyframes ck-panel-in-mobile {
		from {
			opacity: 0;
			transform: translateY(10px);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}

	.ck-qr {
		width: 164px;
	}
}

@media (max-width: 767px) {
	.cyz-kefu--no-mobile {
		display: none !important;
	}
}

/* ------------------------------------------------------------------
   减少动态效果 / 打印
------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	.ck-btn,
	.ck-tip,
	.ck-panel,
	.ck-action,
	.ck-close,
	.ck-copy-btn,
	.ck-row,
	.ck-item[data-ck-top-item] {
		animation: none !important;
		transition: none !important;
	}
}

@media print {
	.cyz-kefu {
		display: none !important;
	}
}
