/*
Theme Name:     B2子主题
Theme URI:      https://7b2.com/
Description:    Child theme for B2 PRO (with custom enhancements)
Author:         MEPSKING
Template:       b2
Version:        1.0.0
*/

/* ===================================================
   1. 侧边栏小工具标题自定义样式
   =================================================== */
.widget .widget-title {
    border-bottom: 2px #111111 solid !important;
    padding-left: 0 !important;
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

.widget .widget-title span.widget-title-inner,
.widget .widget-title > span {
    background-color: #111111 !important;
    color: #ffffff !important;
    display: inline-block !important;
    padding: 10px !important;
}

/* ===================================================
   2. 头部导航二级菜单自动换行优化
   =================================================== */
#ym-menu .sub-menu a {
    word-wrap: break-word !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
}

/* ===================================================
   3. 隐藏文章底部悬浮操作条（海报分享、收藏、举报、点赞）
   =================================================== */
.content-footer.post-content-footer,
.post-content-footer {
    display: none !important;
}

/* ===================================================
   4. 分类/列表卡片作者头像尺寸固定 20px
   =================================================== */
.post-list-meta-avatar picture,
.post-list-meta-avatar img,
.list-footer .post-list-meta-avatar img {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: inline-block !important;
    margin-right: 4px !important;
    vertical-align: middle !important;
}

/* ===================================================
   5. Recent post 等区块小工具排版美化与统一
   =================================================== */
.widget.widget_block {
    padding: 0 !important;
    overflow: hidden;
    background-color: #fff;
}

.widget_block .widget-title {
    border-bottom: 2px #111111 solid !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 15px !important;
}

.widget_block .wp-widget-group__inner-blocks {
    padding: 12px 16px 16px 16px !important;
}

.widget_block ul.wp-block-latest-posts {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

.widget_block ul.wp-block-latest-posts li {
    position: relative;
    padding: 10px 0 !important;
    border-bottom: 1px dashed #eee !important;
    line-height: 1.5 !important;
    font-size: 14px !important;
}

.widget_block ul.wp-block-latest-posts li:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.widget_block ul.wp-block-latest-posts li a {
    color: #333 !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: color 0.2s ease;
    font-weight: 500;
}

.widget_block ul.wp-block-latest-posts li a:hover {
    color: #111 !important;
    text-decoration: underline !important;
}

/* ===================================================
   6. 侧边栏作者名片社交图标尺寸强制 24px
   =================================================== */
.author .wp-block-social-links .wp-block-social-link svg,
.author .wp-social-link svg {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    display: block !important;
}

/* ===================================================
   7. 隐藏首页幻灯片中的文章标题、作者信息与发布日期
   =================================================== */
.slider-info-box h2,
.slider-info-box .slider-user,
.slider-user {
    display: none !important;
}

/* ===================================================
   8. 修复 tags 标签聚合页及 404 页面多余的第二层社交导航条
   =================================================== */
body.tags .site-header .header.social-top,
body.tags .header.social-top,
body:has(#tags) .header.social-top,
body:has(.tags-page) .header.social-top,
body.b2-is-tags-page .site-header .header.social-top,
body.b2-is-tags-page .header.social-top,
body.page-template-tags .site-header .header.social-top,
body.page-template-Pagestags-php .site-header .header.social-top,
body.page-tags .site-header .header.social-top,
body.error404 .site-header .header.social-top,
body.error404 .header.social-top {
    display: none !important;
}

body.tags .site-header.social-top,
body:has(#tags) .site-header.social-top,
body:has(.tags-page) .site-header.social-top,
body.b2-is-tags-page .site-header.social-top,
body.page-template-tags .site-header.social-top,
body.page-template-Pagestags-php .site-header.social-top,
body.page-tags .site-header.social-top,
body.error404 .site-header.social-top {
    height: 58px !important;
}

@media screen and (max-width: 768px) {
    body.tags .site-header.social-top,
    body:has(#tags) .site-header.social-top,
    body:has(.tags-page) .site-header.social-top,
    body.b2-is-tags-page .site-header.social-top,
    body.page-template-tags .site-header.social-top,
    body.page-template-Pagestags-php .site-header.social-top,
    body.page-tags .site-header.social-top,
    body.error404 .site-header.social-top {
        height: 91px !important;
    }
}

