/* 章节管理专用样式 */
.chapter-manager {
    display: flex;
    gap: 20px;
    height: 700px;
}

.chapter-list-panel {
    flex: 1;
    border: 1px solid #ddd;
    background: #f9f9f9;
    overflow-y: auto;
    padding: 10px;
}

.chapter-edit-panel {
    flex: 2;
    border: 1px solid #ddd;
    background: #fff;
    padding: 20px;
    overflow-y: auto;
}

.chapter-list-panel h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.chapter-list-panel h4 {
    margin: 15px 0 5px 0;
    padding: 5px 0;
    border-bottom: 1px dashed #ccc;
    overflow: hidden;
}

.chapter-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.chapter-item:hover {
    background: #e9e9e9;
}

.chapter-item.active {
    background: #0073aa;
    color: white;
}

.chapter-item .chapter-title {
    font-weight: bold;
    margin-bottom: 5px;
}

.chapter-item .chapter-meta {
    font-size: 0.9em;
    color: #666;
}

.chapter-item .chapter-meta span {
    display: inline-block;
    margin-right: 5px;
}

.chapter-item.active .chapter-meta {
    color: #ccc;
}

.chapter-edit-panel .form-field {
    margin-bottom: 15px;
}

.chapter-edit-panel .form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.chapter-edit-panel .form-field input,
.chapter-edit-panel .form-field textarea,
.chapter-edit-panel .form-field select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.chapter-edit-panel .form-field textarea {
    min-height: 200px;
    resize: vertical;
}

.chapter-edit-panel .submit-buttons {
    margin-top: 20px;
    text-align: right;
}

.chapter-edit-panel .submit-buttons .button {
    margin-left: 10px;
}

.no-chapter-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-style: italic;
}

.notice {
    background: #fff;
    border-left: 4px solid #ffb900;
    padding: 12px 16px;
    margin: 10px 0;
}

.notice-warning {
    border-left-color: #ffb900;
}

.notice-info {
    border-left-color: #00a0d2;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* TinyMCE编辑器样式调整 */
.chapter-edit-panel .wp-editor-container {
    border: 1px solid #ddd;
}

.chapter-edit-panel .mce-toolbar-grp {
    border-bottom: 1px solid #ddd;
}

.chapter-edit-panel .mce-edit-area {
    min-height: 300px;
}

/* 古籍筛选器样式 */
.ancient-text-filter {
    margin-bottom: 15px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ancient-text-filter label {
    font-weight: bold;
    margin-right: 10px;
}

.ancient-text-filter select {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

/* 新建章节按钮样式 */
.add-chapter-button {
    padding: 5px 10px;
    font-size: 13px;
    line-height: 1.5;
}

/* 后台编辑页面样式 */
#character-basic-info .form-table th {
    width: 120px;
}

#character-basic-info .form-table p {
    margin: 5px 0;
}

.post-type-chinese_character .wrap h1.wp-heading-inline {
    margin-bottom: 15px;
}

.post-type-chinese_character .wrap .nav-tab-wrapper {
    margin-bottom: 15px;
}

.post-type-chinese_character .wrap .tab-content {
    background: #fff;
    padding: 15px;
    border: 1px solid #c3c4c7;
    border-top: none;
}

.post-type-chinese_character .wrap .tab-pane {
    display: none;
}

.post-type-chinese_character .wrap .tab-pane.active {
    display: block;
}

.character-meta-box .wp-editor-wrap {
    margin-top: 5px;
}

.character-meta-box .wp-editor-container {
    border: 1px solid #8c8f94;
}

/* Select2 样式调整 */
.select2-container {
    margin-top: 5px;
}

.select2-container--default .select2-selection--single {
    height: 30px;
    border: 1px solid #8c8f94;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px;
    padding-left: 8px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 28px;
}

/* 拼音和部首下拉框优化 */
#character_pinyin,
#character_radical {
    width: 250px; /* 增加宽度以适应更多内容 */
}

/* 分组标签样式优化 */
#character_pinyin optgroup,
#character_radical optgroup {
    font-weight: bold;
    background-color: #f0f0f0;
    font-style: normal; /* 确保分组标题是正体 */
}

#character_pinyin option,
#character_radical option {
    font-weight: normal;
    background-color: #fff;
    padding: 2px 0;
}

/* 部首下拉框特殊优化 */
#character_radical optgroup {
    color: #333;
    font-size: 13px;
}