/*
Theme Name: 创享子主题Clean版
Theme URI: QQ216398216
Template: zibll
Author: 创享子主题-QQ216398216
Author URI: QQ216398216
Description: 创享子主题精简版，仅包含小工具功能，无美化代码
Version: 1.1.0
Tags: 子比主题、开源版、免费试用、可二开、创享子主题、QQ216398216、子主题、WP子主题、功能化子主题
*/

/* ========== 创享子主题Clean版 - 样式继承声明 ========== */
/*
 * 本子主题通过functions.php中的cxzzt_clean_enqueue_parent_styles()函数
 * 正确加载父主题zibll的所有样式文件，确保完整的样式继承
 *
 * 父主题样式加载顺序：
 * 1. _bootstrap (bootstrap.min.css)
 * 2. _fontawesome (font-awesome.min.css)
 * 3. _main (main.min.css) - 父主题核心样式
 * 4. 本子主题样式 (style.css) - 在父主题样式之后加载
 */

/* ========== 子主题自定义样式区域 ========== */
/* 此主题为精简版，主要功能通过小工具实现，不包含全局美化CSS */

/* 平板端单侧栏页面收口，避免 1024px 左右正文继续被侧栏挤压 */
@media (max-width: 1199px) and (min-width: 992px) {
    main.container,
    #forum > .container {
        flex-wrap: wrap;
        align-items: stretch;
        gap: 16px;
    }

    main.container > .content-wrap,
    #forum > .container > .content-wrap {
        flex: 0 0 100%;
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    main.container > .content-wrap > .content-layout,
    #forum > .container > .content-wrap > .content-layout {
        width: 100% !important;
        margin-right: 0 !important;
    }

    main.container > .sidebar,
    #forum > .container > .sidebar {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        margin-top: 0;
        margin-left: 0 !important;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    main.container > .sidebar .zib-widget,
    #forum > .container > .sidebar .zib-widget {
        min-width: 0;
        margin-bottom: 0;
    }

    #forum .bbs-home-tab {
        display: flex;
        align-items: flex-start;
        gap: 14px;
    }

    #forum .bbs-home-tab .fixed-wrap-nav {
        flex: 0 0 108px;
        width: 108px;
        min-width: 108px;
    }

    #forum .bbs-home-tab .fixed-wrap-content {
        min-width: 0;
        flex: 1 1 auto;
    }

    #forum .forum-posts.detail.alone,
    #forum .forum-posts.ajax-item {
        padding: 18px 20px;
        border-radius: 16px;
    }

    #forum .forum-title a {
        font-size: 15px;
        line-height: 1.5;
    }

    #forum .forum-posts .action-meta {
        gap: 10px;
    }
}

/* 平板端搜索页与归档筛选条收口，减少桌面节奏遗留 */
@media (max-width: 1199px) and (min-width: 769px) {
    .page-search-box {
        width: 100%;
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }

    .page-search-box .search-form {
        padding: 12px 14px;
    }

    .page-search-box .search-keywords {
        padding: 0 14px 12px;
    }

    .search-page-ajaxpager {
        margin-top: 6px;
    }

    .search-tab-header,
    .ajaxpager.cxzztclean-gallery-archive-list .ajax-option {
        padding-left: 12px;
        padding-right: 12px;
    }

    .search-tab-header .tab-nav-theme,
    .search-tab-filter .search-filter-item,
    .ajaxpager.cxzztclean-gallery-archive-list .option-items {
        gap: 10px;
    }

    .search-tab-filter,
    .ajaxpager.cxzztclean-gallery-archive-list .ajax-option .flex {
        gap: 10px;
    }

    .search-desc-text {
        margin-bottom: 12px;
    }
}

/* 搜索页热门搜索 / 历史搜索区域收口，覆盖父主题 pull-right 漂移布局 */
.page-search-box .search-keywords {
    padding: 0 14px 14px;
}

.page-search-box .search-keywords + .search-keywords {
    padding-top: 4px;
}

.page-search-box .search-keywords > p {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
    line-height: 1.4;
}

.page-search-box .search-keywords > p > span {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    font-size: 15px;
    font-weight: 700;
    color: #4b5563;
}

.page-search-box .search-keywords > p > a.pull-right,
.page-search-box .search-keywords > p > a.trash-history-search {
    float: none !important;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: #98a2b3;
    background: #f7f8fa;
    border: 1px solid #e7eaf0;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.page-search-box .search-keywords > p > a.pull-right:hover,
.page-search-box .search-keywords > p > a.trash-history-search:hover {
    color: #ff6a1a;
    background: #fff4ec;
    border-color: #ffd2b7;
    transform: translateY(-1px);
}

.page-search-box .search-keywords > p > a.pull-right i,
.page-search-box .search-keywords > p > a.trash-history-search i {
    font-size: 15px;
    line-height: 1;
}

.page-search-box .search-keywords > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.page-search-box .search-keywords .search_keywords {
    margin: 0 !important;
    padding: 7px 10px;
    border-radius: 10px;
    background: #f7f8fa;
    border: 1px solid #e7eaf0;
    color: #4b5563;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.page-search-box .search-keywords .search_keywords:hover {
    color: #ff6a1a;
    background: #fff4ec;
    border-color: #ffd2b7;
    transform: translateY(-1px);
}

.page-search-box .search-input-text {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 46px;
}

.page-search-box .search-input-text .line-form-input {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 56px;
}

.page-search-box .search-input-text .abs-right {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    margin: 0;
    color: #667085;
    background: #f7f8fa;
    border: 1px solid #e7eaf0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.page-search-box .search-input-text .abs-right button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: inherit;
}

.page-search-box .search-input-text .abs-right .icon {
    display: block;
    width: 16px;
    height: 16px;
}

.page-search-box .search-input-text .abs-right:hover,
.page-search-box .search-input-text .abs-right:focus-within {
    color: #ff6a1a;
    background: #fff4ec;
    border-color: #ffd2b7;
    box-shadow: 0 8px 18px rgba(255, 106, 26, 0.14);
}

.page-search-box .search-input-text .abs-right button:focus-visible {
    outline: none;
}

.search .page-search-box .search-input-text .line-form-input[value]:not([value=""]) ~ .scale-placeholder,
.search-results .page-search-box .search-input-text .line-form-input[value]:not([value=""]) ~ .scale-placeholder {
    display: none !important;
}

body.theme-dark .page-search-box .search-keywords > p > span {
    color: #e5e7eb;
}

body.theme-dark .page-search-box .search-keywords > p > a.pull-right,
body.theme-dark .page-search-box .search-keywords > p > a.trash-history-search {
    color: #9aa4b2;
    background: #252b33;
    border-color: #323844;
}

body.theme-dark .page-search-box .search-keywords > p > a.pull-right:hover,
body.theme-dark .page-search-box .search-keywords > p > a.trash-history-search:hover {
    color: #ff8a4c;
    background: #33271f;
    border-color: #5a4434;
}

body.theme-dark .page-search-box .search-keywords .search_keywords {
    color: #d1d5db;
    background: #252b33;
    border-color: #323844;
}

body.theme-dark .page-search-box .search-keywords .search_keywords:hover {
    color: #ffb380;
    background: #33271f;
    border-color: #5a4434;
}

body.theme-dark .page-search-box .search-input-text .abs-right {
    color: #aeb8c5;
    background: #252b33;
    border-color: #323844;
    box-shadow: none;
}

body.theme-dark .page-search-box .search-input-text .abs-right:hover,
body.theme-dark .page-search-box .search-input-text .abs-right:focus-within {
    color: #ffb380;
    background: #33271f;
    border-color: #5a4434;
    box-shadow: none;
}

@media (max-width: 767px) {
    .page-search-box .search-keywords {
        padding: 0 12px 12px;
    }

    .page-search-box .search-keywords > p > span {
        font-size: 14px;
    }

    .page-search-box .search-keywords > p > a.pull-right,
    .page-search-box .search-keywords > p > a.trash-history-search {
        width: 28px;
        height: 28px;
    }

    .page-search-box .search-keywords .search_keywords {
        padding: 6px 10px;
        font-size: 12px;
    }
}



/* 如需添加其他自定义样式，请在此处添加，确保不会影响父主题的核心功能 */

/* ========== 强制隐藏父主题导航栏 ========== */
/* 完全隐藏父主题的导航栏，避免与子主题导航栏冲突 */
.header:not(.cxzzt-affix-header-proxy),
.mobile-header,
.navbar,
.navbar-top,
.mobile-navbar {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  top: -9999px !important;
  left: -9999px !important;
  z-index: -1 !important;
}

/* 父主题侧栏随动兼容：保留一个不可见的 .header 代理供 sidebarAffix() 读取顶部高度 */
.header.cxzzt-affix-header-proxy {
  display: block !important;
  position: fixed !important;
  top: -9999px !important;
  left: 0 !important;
  width: 100% !important;
  height: var(--header-h, 66px) !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
  z-index: -1 !important;
}

/* 【2025-01-30】移除重复的body.nav-fixed设置，复用父主题的间距计算 */
/* 父主题已有相同设置，避免双重padding-top导致额外间距 */
/*
body.nav-fixed {
  padding-top: 88px;
}

@media (max-width: 996px) {
  body.nav-fixed {
    padding-top: 72px;
  }
}
*/

/* ========== 文章页标题栏与内容区域重叠修复 ========== */
/* 注意：间距现在由functions.php中的.container统一规则处理 */

/* 响应式调整 - 已移除，现在使用body padding-top统一处理 */
