/*
* @Author: 大胡子
* @Email:  dahuzi@xintheme.com
* @Link:   www.xintheme.com
* @Date:   2023-07-14 17:16:23
* @Last Modified by:   dahuzi
* @Last Modified time: 2023-07-14 20:01:56
*/

.book-header {
	height: fit-content !important;
	position: relative !important;
}
/*book-block*/
.wpjam-book{padding:100px 0}
.wpjam-book .container{display:flex;margin:0 auto;padding:0 16px;width:100%;max-width:1200px;flex-wrap:wrap}
.wpjam-book .book-block{margin:20px 16px;width:calc(33.33333% - 32px);border-radius:8px;box-shadow:0 20px 50px rgba(8,25,74,.08)}
.wpjam-book .book-block .book-title{display:flex;margin-bottom:16px;padding:16px;border-bottom:1px solid #f1f1f1;align-items:center}
.wpjam-book .book-block .book-title img{margin-right:10px;width:auto;height:66px}
.wpjam-book .book-block .book-title h2{color:#1d1d1d;font-weight:600;font-size:24px;line-height:28px}
.wpjam-book .book-block ul{margin:0;padding:0 16px 16px}
.wpjam-book .book-block ul li{display:flex;margin-bottom:5px;list-style:none;align-items:center}
.wpjam-book .book-block ul li:last-child{margin-bottom:0}
.wpjam-book .book-block ul li .icon-book{display:inline-block;margin-right:4px;width:17px;height:17px;background:url(icon/icon-book.png) no-repeat scroll 0 0;background-size:cover;cursor:pointer}
.wpjam-book .book-block ul li a{display:inline-block;overflow:hidden;padding:.1% 0;max-width:calc(100% - 21px);background-image:linear-gradient(to right,currentColor 0,currentColor 100%);background-position:0 95%;background-size:0 2px;background-repeat:no-repeat;color:#666;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;font-size:16px;line-height:28px;transition:background-size .25s cubic-bezier(.785,.135,.15,.86) 0s}
.wpjam-book .book-block ul li a:hover{background-size:100% 2px}
.wpjam-book .book-block ul li.book-more{display:block;margin:16px auto 0;margin-top:28px;width:100%}
.wpjam-book .book-block ul li.book-more a{position:relative;padding:8px 0;width:100%;border:1px solid #666;border-radius:4px;background-image:none;text-align:center;transition:all .5s}
.wpjam-book .book-block ul li.book-more a::before{position:absolute;top:0;left:0;z-index:-1;width:0;height:100%;background:#262626;content:"";transition:all .5s}
.wpjam-book .book-block ul li.book-more a:hover{border:1px solid #262626;color:#fff}
.wpjam-book .book-block ul li.book-more a:hover::before{right:auto;left:0;width:100%}

/*wpjam-book-single*/
.wpjam-book-single{}
.wpjam-book-single .book-container{display:flex;width:100%;flex-wrap:wrap; background: #F8F8FA;}
.book-chapter{width:300px;}
.book-chapter .book-directory{width:100%;padding:0 24px;border-right:2px solid #f1f1f1;background: #F8F8FA;}
.book-chapter ul{margin:10px 0 0;padding:0;list-style:none}
.book-chapter ul li{margin:0;width:100%;color:#333;font-size:16px;line-height:24px;cursor:pointer;display:flex;justify-content:space-between;align-items:center}
.book-chapter ul.sub-chapter{position:relative;display:none;padding-left:16px}
.book-chapter ul.sub-chapter li{width:calc(100% - 16px);position:relative;display:flex;margin-bottom:0;padding:8px 0 8px 0;align-items:center}
.book-chapter ul.sub-chapter li a{white-space: nowrap;overflow: hidden;text-overflow: ellipsis;width: 200px;color:#595959;text-decoration:none;font-size:16px;line-height:20px}
.book-chapter ul.sub-chapter li .icon-dot{display:none}
.book-chapter ul.sub-chapter li .icon-dot{position:absolute;left:-20px;display:block;width:1px;height:1px;border:5px solid #D8D8DE;border-radius:50%;background:#D8D8DE}
.book-chapter ul.sub-chapter li.selected .icon-dot{position:absolute;left:-20px;display:block;width:1px;height:1px;border:5px solid #027fff;border-radius:50%;background:#027fff}
.book-chapter ul.sub-chapter li a:hover,.book-chapter ul.sub-chapter li.selected a{color:#027fff}
.toc-anchor-sub {
	display: block !important;
}
.book-chapter ul li.active,.book-chapter>ul>li:hover{font-weight:600}
.chapter-single{width:calc(100vw - 600px);padding-right:48px; padding-top:48px; background-color: #ffffff;}
.chapter-single .chapter-title{margin-bottom:30px;padding-bottom:16px;border-bottom:1px solid #f1f1f1}
.chapter-single .chapter-title h1{margin:0;font-weight:600;font-size:36px;line-height:44px}
.chapter-single .chapter-content{color:#333;font-size:16px;line-height:26px}
.chapter-single .chapter-content p{margin-bottom:20px}
.chapter-single .chapter-content a{color:#027fff;font-size:16px;line-height:26px}
.chapter-single .chapter-content h2{font-weight:600;font-size:28px}
.chapter-single .chapter-content h3{font-weight:600;font-size:24px}
.chapter-single .chapter-content h4{font-weight:600;font-size:22px}
.chapter-single .chapter-content h5{font-weight:600;font-size:20px}
.chapter-single .chapter-content img{margin-bottom:20px;height:auto;max-width:100%}
.book-chapter ul ul::before{position:absolute;top:0;left:0;width:1px;height:100%;background-color:#eaeaea;content:''}
.book-chapter ul li .icon-right-arrow{display:inline-block;margin-right:4px;width:15px;height:15px;background:url(icon/icon-right-arrow.png) no-repeat scroll 0 0;background-size:cover!important;cursor:pointer;transition:transform .3s ease;transform:rotate(0)}
.book-chapter ul li.active .icon-right-arrow{background:url(icon/icon-right-arrow-blue.png) no-repeat scroll 0 0;transform:rotate(90deg)}
.icon-directory-menu{position:fixed;right:16px;bottom:20px;display:none;width:40px;height:40px;border-radius:50%;background:#027fff}

/*手机端 文章目录按钮*/
.hamburger{position:relative;top:50%;left:50%;z-index:1;width:20px;height:15px;cursor:pointer;transform:translate(-50%,-50%)}
.hamburger span{position:absolute;right:0;display:block;width:100%;height:2px;background-color:#fff;transition:all .3s}
.hamburger span.h-top{top:0}
.hamburger span.h-bottom{bottom:0;width:20px}
.hamburger span.h-middle{top:50%;margin-top:-1px;width:20px}
.hamburger.active span{width:100%}
.hamburger.active span.h-top{top:50%;margin-top:-1px;transform:rotate(45deg)}
.hamburger.active span.h-middle{opacity:0;transform:translateX(-30px)}
.hamburger.active span.h-bottom{bottom:50%;margin-bottom:-1px;transform:rotate(-45deg)}

.chapter-item a {
	color: #696969 !important;
}
.chapter-item.active a {
	color: #047FFF !important;
	font-weight: 500;
}
.chapter-content-item {
	justify-content: unset !important;
}
.chapter-content-item a{
	color: #696969;
    display: block;
	margin-left: 10px;
	white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 200px;
}
.chapter-content-item a:link,
.chapter-content-item a:visited {
	color: #696969;
}
.chapter-content-item.highlight-active a {
	color: #047FFF !important;
	font-weight: 500;
}
.highlight-active {
	color: #047FFF !important;
	font-weight: 500;
}
.book-container{
}
.chapter-single {
}
::-webkit-scrollbar {
	display: none; /* Chrome Safari */
  }
/* Mobile */
@media (max-width: 767px){

	/*book-block*/
	.wpjam-book .container{max-width:100%}
	.wpjam-book .book-block{margin:9px 0;width:100%}

	/*wpjam-book-single*/
	.chapter-single .chapter-title h1{font-size:28px;line-height:38px}
	.wpjam-book-single .container{display:block;width:auto;max-width:100%}
	.book-chapter .book-directory{padding-right:0;border:none}
	.book-chapter,.chapter-single{width:100%}

	/*文章目录*/
	.icon-directory-menu{display:block}
	.book-chapter{margin-bottom:0}
	.book-chapter .book-directory{position:fixed;bottom:0;left:0;overflow-y:auto;padding:20px 20px;width:260px;height:70%;border:1px solid #eaeaea;border-left:none;background:#fff}

}

/* 独立滚动：桌面端 */
@media (min-width: 768px) {
	.wpjam-book-single .book-container {
		align-items: flex-start;
	}
	.book-directory {
		overflow-y:auto;
		height: calc(100vh - 336px); /* 可根据实际header/footer高度调整 */
	}
	.book-chapter {
        max-height:70vh;
		overflow-y: auto;
	}
	.chapter-single {
		max-height: calc(100vh - 240px);
		overflow-y: auto;
	}
	.chapter-content {
		max-height: calc(100vh - 396px);
	}
}

body {
	overflow-y: hidden;
}
.book-content-container {
	width: calc(100vw - 300px);
}
.book-content-body {
	width: 100%;
	display: flex;
	background-color: #ffffff;
	min-height: calc(100vh - 240px); /* 可根据实际header/footer高度调整 */

}

.book-list {
	padding-left: 12.4%;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	border-bottom: 1px solid #f1f1f1;
	border-top: 1px solid #f1f1f1;
}


.book-list-item {
	width: fit-content;
}

.book-list-item-title:link,
.book-list-item-title:visited {
	color: #666;
	display: block;
	height: 100%;
	padding: 10px;
}

.book-list-item-title.active {
	color: #027fff;
	border-bottom: 1px solid #027fff;

}

.book-directory-header {
    display: flex;
    padding: 42px 35px;
    flex-direction: column;
	border-right: 2px solid #f1f1f1;
}

.book-directory-header-title {
	display: flex;
	align-items: center;
	font-size: 20px;
	margin-bottom: 40px;
}

.book-directory-header-title span {
	padding-left: 14px;
}

.book-directory-header-search {
	border-bottom: 2px solid #f1f1f1;
	width: 230px;
	display: flex;
	padding-bottom: 10px;
	align-items: center;
}

.book-directory-header-search img {
	width: 16px;
	height: 16px;
}

.book-directory-header-search input {
	color: #666;
	padding-left: 10px;
	border: none;
	background-color: transparent;
	font-size: 14px;

}
.book-directory-header-search input:focus {
	outline: none;
}

.book-directory-header-search input::placeholder {
	color: #666;
}

.book-content-header {
	height: 95px;
    display: flex;
    padding-left: 48px;
    flex-direction: column;
    justify-content: center;
	background-color: #ffffff;
	border-bottom: 1px solid #f1f1f1;
}
.book-content-header-time {
	margin-top: 4px;
	font-size: 12px;
	color: #666;
	display: flex;
}
.book-content-header-time span {
	padding-left: 10px;
}
.book-content-header-title span {
	color: #262626;
}
.book-content-header-title span:first-child {
	color: #595959;
}

.book-chapter-directory{
	padding: 0 48px;
	padding-top: 48px;
    max-height: 100vh;
}
.logo{
	/* padding-left: 300px !important; */
}
.chapter-item-name{
	display: flex;
}
.chapter-item-count {
	margin-left: 10px;
	padding : 4px;
	border-radius: 4px;
	background-color: #E9E9EB;
	color: #8C8C8C;
	font-size: 12px;
}

.chapter-content-item .chapter-icon-dot{
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background:#8C8C8C;;
	display: none;
    box-shadow: 0 0 0 3px rgba(216, 216, 222, 0.8);
    background-image: radial-gradient(circle, #8C8C8C 40%, #D8D8DE 70%);
}
.chapter-content-item.highlight-active .chapter-icon-dot{
    background: #027fff;
	/* display: block; */
    box-shadow: 0 0 0 3px rgba(2, 127, 255, 0.3);
    background-image: radial-gradient(circle, #027fff 50%, rgba(2, 127, 255, 0.5) 80%);
}
.chapter-content-sub-item {
	margin-top: 0 !important;
	/* padding: unset !important; */
}

/* 定义样式变量 */
.chapter-single .chapter-content {
    --text-color: #333;
    --link-color: #027fff;
    --heading-color: #222;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size: 16px;
    --line-height: 1.6;
    --spacing: 1em;
}

/* 使用变量定义样式 */
.chapter-single .chapter-content {
    font-family: var(--font-family);
    font-size: var(--font-size);
    line-height: var(--line-height);
    color: var(--text-color);
}

.chapter-single .chapter-content * {
    font-family: inherit;
    color: inherit;
}

.chapter-single .chapter-content h1,
.chapter-single .chapter-content h2,
.chapter-single .chapter-content h3,
.chapter-single .chapter-content h4,
.chapter-single .chapter-content h5,
.chapter-single .chapter-content h6 {
    color: var(--heading-color);
    font-family: var(--font-family);
}

.chapter-single .chapter-content a {
    color: var(--link-color);
}

/* 样式隔离容器 */
.chapter-single .chapter-content {
    /* 重置所有继承的样式 */
    all: initial;
    
    /* 重新设置基本样式 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    
    /* 确保容器正常显示 */
    display: block;
    width: 100%;
    box-sizing: border-box;
}

/* 重新定义富文本内容的样式 */
.chapter-single .chapter-content * {
    /* 重置所有子元素的样式 */
    all: unset;
    display: revert;
    box-sizing: border-box;
}

/* 段落样式 */
.chapter-single .chapter-content p {
    margin: 0 0 1em 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

/* 标题样式 */
.chapter-single .chapter-content h1 {
    font-size: 2em;
    font-weight: 600;
    margin: 0.67em 0;
    color: #222;
}

.chapter-single .chapter-content h2 {
    font-size: 1.75em;
    font-weight: 600;
    margin: 0.83em 0;
    color: #222;
}

.chapter-single .chapter-content h3 {
    font-size: 1.5em;
    font-weight: 600;
    margin: 1em 0;
    color: #222;
}

.chapter-single .chapter-content h4 {
    font-size: 1.375em;
    font-weight: 600;
    margin: 1.33em 0;
    color: #222;
}

.chapter-single .chapter-content h5 {
    font-size: 1.25em;
    font-weight: 600;
    margin: 1.67em 0;
    color: #222;
}

.chapter-single .chapter-content h6 {
    font-size: 1em;
    font-weight: 600;
    margin: 2.33em 0;
    color: #222;
}

/* 链接样式 */
.chapter-single .chapter-content a {
    color: #027fff;
    text-decoration: underline;
    cursor: pointer;
}

.chapter-single .chapter-content a:hover {
    color: #0056cc;
}

/* 列表样式 */
.chapter-single .chapter-content ul,
.chapter-single .chapter-content ol {
    margin: 1em 0;
    padding-left: 2em;
    display: block;
    list-style-type: decimal;
    margin-block-start: 1em;
    margin-block-end: 1em;
    padding-inline-start: 40px;
    unicode-bidi: isolate;
}

.chapter-single .chapter-content li {
    margin: 0.5em 0;
    list-style: revert;
    display: list-item;
    text-align: -webkit-match-parent;
    unicode-bidi: isolate;
}

/* 图片样式 */
.chapter-single .chapter-content img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
    display: block;
}

/* 引用样式 */
.chapter-single .chapter-content blockquote {
    margin: 1em 0;
    padding: 0 1em;
    border-left: 4px solid #027fff;
    background-color: #f8f9fa;
    font-style: italic;
}

/* 代码样式 */
.chapter-single .chapter-content code {
    background-color: #f1f3f4;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.chapter-single .chapter-content pre {
    background-color: #f8f8f8;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1em 0;
}

.chapter-single .chapter-content pre code {
    background: none;
    padding: 0;
}

/* 表格样式 */
.chapter-single .chapter-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
}

.chapter-single .chapter-content th,
.chapter-single .chapter-content td {
    border: 1px solid #ddd;
    padding: 0.5em;
    text-align: left;
}

.chapter-single .chapter-content th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* 强调样式 */
.chapter-single .chapter-content strong,
.chapter-single .chapter-content b {
    font-weight: 600;
}

.chapter-single .chapter-content em,
.chapter-single .chapter-content i {
    font-style: italic;
}

/* 覆盖全局样式的高优先级选择器 */
.wpjam-book-single .chapter-single .chapter-content {
    /* 重置继承的样式 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #333 !important;
}

/* 确保富文本内容元素不受全局样式影响 */
.wpjam-book-single .chapter-single .chapter-content p {
    margin: 0 0 1em 0 !important;
    padding: 0 !important;
    line-height: inherit !important;
    color: inherit !important;
    font-size: 16px !important;
}

.wpjam-book-single .chapter-single .chapter-content h1,
.wpjam-book-single .chapter-single .chapter-content h2,
.wpjam-book-single .chapter-single .chapter-content h3,
.wpjam-book-single .chapter-content h4,
.wpjam-book-single .chapter-single .chapter-content h5,
.wpjam-book-single .chapter-single .chapter-content h6 {
    font-family: inherit !important;
    color: #222 !important;
    margin: 1em 0 !important;
    padding: 0 !important;
}

.wpjam-book-single .chapter-single .chapter-content h2 {
    font-size: 32px !important;
    line-height: 40px !important;
}

.wpjam-book-single .chapter-single .chapter-content h3 {
    font-size: 24px !important;
    line-height: 32px !important;
}

.wpjam-book-single .chapter-single .chapter-content h4 {
    font-size: 20px !important;
    line-height: 28px !important;
}

.wpjam-book-single .chapter-single .chapter-content h5 {
    font-size: 18px !important;
    line-height: 26px !important;
}

.wpjam-book-single .chapter-single .chapter-content h6 {
    font-size: 16px !important;
    line-height: 24px !important;
}
.book-mobile-nav {
    display: none;
}
/* 手机端样式 */
@media (max-width: 767px) {
    body {
        overflow-y: auto;
    }
    .book-header{
        display: none;
    }
    .book-chapter{
        display: none;
    }
    .book-content-header{
        display: none;
    }
    .book-content-body {
        width: 100%;
    }
    .book-content-container {
        width: 100%;
    }
    .chapter-title h1 {
        font-size: 28px;
        line-height: 36px;
    }
    .chapter-single {
        padding-left: 24px !important;
        padding-right: 24px !important;
        padding-top: 60px !important;
    }
    .chapter-content img {
        max-height: 200px !important;
    }
    .book-mobile-nav {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 44px;
        z-index: 1000;
        background-color: #FFF;
        
    }
    .book-mobile-nav-header {
        height: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px;
    }
    .book-mobile-nav-header-left-icon {
        display: flex;
        align-items: center;
    }
    .book-mobile-nav-header-left-icon img {
        height: 24px;
        width: 24px;
    }
    .book-mobile-nav-header-right-icon {    
        display: flex;
        align-items: center;
    }
    .book-mobile-nav-header-right-icon img {
        height: 24px;
        width: 24px;
    }   
    .book-mobile-nav-header-title {
        font-size: 16px;
        color: #262626;
    }
    .book-mobile-nav-chapter-list-content {
        height: 85%;
        bottom: 0px;
        position: fixed;
        left: 0;
        width: 100%;
        background-color: #FFF;
        overflow-y: auto;
        padding: 0 16px;
        border-radius: 10px 10px 0 0;
    }
    .book-mobile-nav-chapter {
        display: none;
        background: rgba(0,0,0,0.4);
        height:100%;
        width: 100%;
        z-index: 1000;
        position: fixed;
        top: 0;
        left: 0;
        overflow: hidden;
    }
    .book-mobile-nav-chapter-item { 
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px;
    }
    .book-mobile-nav-chapter-item span {
        font-size: 16px;
        color: #333;
    }   
    .book-mobile-nav-chapter-list-content-header {
        display: flex;
        padding: 20px 0;
        align-items: center;
    }
    .book-mobile-nav-chapter-list-content-header-icon {
        display: flex;
        align-items: center;
    }
    .book-mobile-nav-chapter-list-content-header-icon img {
        height: 24px;
        width: 24px;
    }
    .book-mobile-nav-chapter-list-content-header-title {    
        color: #000000;
        margin:0 auto;
        font-size: 18px;
        line-height: 24px;
    }
    .book-mobile-nav-chapter-list-content-search {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 12px;
        border: 1px solid #f1f1f1;
        border-radius: 16px;
        height:44px;
        background-color: #F5F6F7;
        width: 100%;
    }   
    .book-mobile-nav-chapter-list-content-search img {
        height: 20px;
        width: 20px;
    }
    .book-mobile-nav-chapter-list-content-search input {
        height: 32px;
        width: 100%;
        padding: 0 16px;
        border: none;
        background-color: transparent;
    }   
    .book-mobile-nav-chapter-list-content-search input:focus {
        outline: none;
    }
    .book-mobile-nav-chapter-list-content-search input::placeholder {
        color: #999;
    }
    .book-mobile-nav-chapter-list-content-list-item > span {
        font-size: 14px;
        color: #333;
        display: flex;
        padding: 16px 15px;
    }
    .book-mobile-nav-chapter-list-content-list-item-title {
        display: flex;
        padding: 16px 15px;
        align-items: center;
    }
    .book-mobile-nav-chapter-list-content-list-item-title img {
        height: 16px;
        width: 16px;
        margin-right: 10px
    }
    .book-mobile-nav-chapter-list-content-list-item-title span {
        font-size: 14px;
        color: #333;
    }
    .book-mobile-nav-chapter-list-content-list-item > li li {
        font-size: 14px;
        color: #333;
        padding: 16px 15px;
        border-bottom: 1px solid #f1f1f1;
    }
    .book-mobile-nav-chapter-list-content-list-item > li > ul li {
        padding-left: 40px;
    }
    .book-mobile-nav-chapter-list-content-list-item-active {
        background-color: #E7EEFD;
    }
}