/*!
 * ChatKnow 主题补充样式：面包屑、客服悬浮窗、分页、文章附加块、下载页附加信息
 * 与站点原有 CSS 不冲突，全部以 .ck- / 既有 class 补丁的形式出现。
 */

/* ---------- 0. 栅格工具类兜底（原站依赖 bootstrap 的 .col-auto / .flex-* ，压缩后缺失会挤爆头部） ---------- */
.col-auto {
	flex: 0 0 auto;
	width: auto;
	max-width: 100%;
}
.flex-1 {
	flex: 1 1 0% !important;
}
.flex-auto {
	flex: 1 1 auto !important;
}
.align-items-center {
	align-items: center !important;
}
.text-end {
	text-align: right !important;
}
.row-new {
	display: flex;
	flex-wrap: wrap;
	margin-right: -12px;
	margin-left: -12px;
}

/* ---------- 0.1 主导航在桌面端显示（原站规则位于 @media min-width:1150px，压缩时被裁掉，这里补回） ---------- */
@media screen and (min-width: 1150px) {
	nav.d-flex-j-a {
		display: flex !important;
		justify-content: space-between;
		align-items: center;
	}
	nav.d-flex-j-a .main-menu-item {
		margin-left: 24px;
	}
	.btn-toggler,
	.offcanvas-toggler {
		display: none !important;
	}
	nav.d-flex-j-a .btn-toggler {
		display: none !important;
	}
}
@media screen and (min-width: 1280px) {
	nav.d-flex-j-a .main-menu-item {
		margin-left: 40px;
	}
}
@media screen and (max-width: 1149px) {
	nav.d-flex-j-a {
		display: none !important;
	}
}

.section-platform {
	position: relative;
}

/* ---------- 0.2 装饰性背景图不拦截点击（原站 bg-left/bg-right 会盖住下方按钮） ---------- */
.section-platform .bg-left,
.section-platform .bg-right,
.section-platform .bg-left img,
.section-platform .bg-right img,
.section-introduction-bg,
.section-introduction .right-img img,
.ck-deco {
	pointer-events: none;
}

/* ---------- 1. 面包屑（与 new-details.css 中的同款规则，保证所有内页都有） ---------- */
.section-breadcrumb {
	width: 100%;
	display: flex;
	justify-content: center;
	padding-top: 12px;
	margin-bottom: 22px;
}
.section-breadcrumb .breadcrumb-container {
	width: 1200px;
	max-width: calc(100vw - 40px);
	font-size: 12px;
	line-height: 20px;
}
.section-breadcrumb .breadcrumb-container label {
	font-weight: 400;
	font-size: 12px;
	color: #21262c;
}
.section-breadcrumb .breadcrumb-container span {
	font-weight: 400;
	font-size: 12px;
	color: #8f959e;
}
.section-breadcrumb .breadcrumb-container a {
	color: #8f959e;
	text-decoration: none;
}
.section-breadcrumb .breadcrumb-container a:hover {
	color: #2aa846;
}
.section-breadcrumb .breadcrumb-container .crumb-sep {
	color: #c9cdd4;
}
.ellipsis-line {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* ---------- 2. 页脚移动端折叠（不引入 layui，只补需要的两条） ---------- */
.layui-colla-content {
	display: none;
}
.layui-colla-content.layui-show {
	display: block;
}
.layui-colla-title {
	cursor: pointer;
}

/* ---------- 3. 客服悬浮窗 ---------- */
.ck-service {
	position: fixed;
	right: 18px;
	bottom: 96px;
	z-index: 9000;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
}
.ck-service__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 10px 14px;
	border-radius: 999px;
	background: #2aa846;
	color: #fff;
	font-size: 14px;
	line-height: 1;
	text-decoration: none;
	box-shadow: 0 8px 20px rgba(42, 168, 70, 0.28);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ck-service__btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 26px rgba(42, 168, 70, 0.34);
	color: #fff;
}
.ck-service__tip {
	padding: 4px 10px;
	border-radius: 6px;
	background: rgba(33, 38, 44, 0.86);
	color: #fff;
	font-size: 12px;
	line-height: 18px;
	white-space: nowrap;
}
@media (max-width: 768px) {
	.ck-service {
		right: 12px;
		bottom: 74px;
	}
	.ck-service__tip {
		display: none;
	}
}

/* ---------- 4. 分页 ---------- */
.ck-pager {
	display: flex;
	justify-content: center;
	margin: 28px 0 8px;
}
.ck-pager .left-page {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	list-style: none;
	margin: 0;
	padding: 0;
}
.ck-pager .page-numbers {
	display: inline-block;
	min-width: 34px;
	padding: 6px 10px;
	border: 1px solid #e5e8ef;
	border-radius: 6px;
	color: #4e5969;
	font-size: 14px;
	text-align: center;
	text-decoration: none;
	background: #fff;
}
.ck-pager .page-numbers.current,
.ck-pager .page-numbers:hover {
	border-color: #2aa846;
	color: #2aa846;
}
.ck-pager .page-numbers.dots {
	border-color: transparent;
	background: transparent;
}

/* ---------- 5. 文章详情附加块 ---------- */
.entry-content img {
	max-width: 100%;
	height: auto;
}
.entry-content table {
	max-width: 100%;
	overflow-x: auto;
}
.left-bottom {
	margin-top: 28px;
}
.ck-tags {
	margin: 0 0 18px;
	font-size: 14px;
	color: #8f959e;
}
.ck-tags a {
	display: inline-block;
	margin: 0 6px 6px 0;
	padding: 3px 10px;
	border-radius: 999px;
	background: #f2f3f5;
	color: #4e5969;
	font-size: 12px;
	text-decoration: none;
}
.ck-tags a:hover {
	background: #e8f7ec;
	color: #2aa846;
}
.ck-adjacent {
	display: grid;
	gap: 10px;
	margin: 0 0 22px;
}
.ck-adjacent__item {
	display: block;
	padding: 12px 16px;
	border: 1px solid #eef0f4;
	border-radius: 8px;
	color: #21262c;
	font-size: 14px;
	text-decoration: none;
	line-height: 22px;
}
.ck-adjacent__item span {
	display: block;
	color: #8f959e;
	font-size: 12px;
	margin-bottom: 2px;
}
.ck-adjacent__item:hover {
	border-color: #2aa846;
	color: #2aa846;
}
.ck-download-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px;
	border-radius: 10px;
	background: #f4fbf6;
	border: 1px solid #d9f0e1;
}
.ck-download-cta p {
	margin: 0;
	color: #21262c;
	font-size: 14px;
	line-height: 22px;
}

/* ---------- 6. 搜索 ---------- */
.ck-search-box {
	margin: 0 0 20px;
}
.ck-search-form {
	display: flex;
	gap: 10px;
	max-width: 560px;
}
.ck-search-form__input {
	flex: 1;
	height: 42px;
	padding: 0 14px;
	border: 1px solid #e5e8ef;
	border-radius: 8px;
	font-size: 14px;
	color: #21262c;
	background: #fff;
}
.ck-search-form__input:focus {
	outline: none;
	border-color: #2aa846;
}
.ck-search-form .btn-new-bd {
	height: 42px;
	line-height: 42px;
	padding: 0 20px;
	border: 0;
	cursor: pointer;
}

/* ---------- 7. 下载页 ---------- */
.section-version .version-list .list-item .item-wrap {
	position: relative;
}
.ck-dl-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #2aa846;
}
.item-text-hover + .ck-dl-meta,
.ck-dl-meta {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: #8f959e;
	line-height: 16px;
}
.ck-dl-meta span + span::before {
	content: " · ";
	color: #c9cdd4;
}
.ck-dl-notes {
	padding-top: 10px;
}
.ck-dl-notes__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 28px;
}
.ck-dl-notes__col .problem-header {
	margin-bottom: 12px;
	font-size: 20px;
	color: #21262c;
}
.ck-list-dot {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ck-list-dot li {
	position: relative;
	padding-left: 16px;
	margin-bottom: 8px;
	font-size: 14px;
	line-height: 22px;
	color: #4e5969;
}
.ck-list-dot li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 8px;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #2aa846;
	opacity: 0.7;
}
.ck-empty-tip {
	color: #8f959e;
	font-size: 14px;
}

/* ---------- 8. 轮播降级 ---------- */
.ck-swiper-fallback {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	padding-bottom: 6px;
}
.ck-swiper-fallback > * {
	flex: 0 0 auto;
}

/* ---------- 9. 抽屉与吸顶 ---------- */
body.ck-modal-open {
	overflow: hidden;
}
.offcanvas-close {
	position: absolute;
	right: 16px;
	top: 10px;
	z-index: 3;
	width: 34px;
	height: 34px;
	line-height: 1;
	font-size: 24px;
	color: #21262c;
	background: transparent;
	border: 0;
	cursor: pointer;
}
.header.ck-scrolled {
	box-shadow: 0 4px 16px rgba(17, 24, 39, 0.08);
}

/* ---------- 10. 404 与通用 ---------- */
.ck-404 {
	text-align: left;
	padding: 40px 0 60px;
}
.ck-404__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 18px 0 26px;
}
.ck-404__links .top-title {
	margin: 22px 0 10px;
}
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.ck-icon {
	display: inline-block;
	vertical-align: -3px;
}

/* ---------- 11. 后台设置页 ---------- */
.ck-admin__intro {
	max-width: 900px;
	color: #50575e;
}
.ck-admin__tabs {
	margin-bottom: 12px;
}
.ck-admin .ck-admin__platform-head th {
	padding-top: 18px;
	border-top: 1px solid #f0f0f1;
}
.ck-admin .ck-badge {
	display: inline-block;
	padding: 2px 8px;
	margin-right: 8px;
	border-radius: 4px;
	background: #e8f7ec;
	color: #1e7e34;
	font-size: 12px;
	font-weight: 600;
}
.ck-admin .ck-media {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.ck-admin .ck-media__preview img {
	max-width: 120px;
	max-height: 48px;
	height: auto;
	border: 1px solid #e5e8ef;
	border-radius: 4px;
	background: #fff;
}
.ck-seo-box p {
	margin: 0 0 14px;
}
.ck-seo-box label {
	display: block;
	margin-bottom: 4px;
}
.ck-len-hint {
	color: #8f959e;
}
