/**
 * theme-custom.css — T20260918009-3 卡片样式统一 + 图标占位兜底
 * 由 inc/register.php wp_enqueue（ver=主题版本号，随 style.css 版本换 URL，绕 Caddy 静态缓存）
 * 仅做增量覆盖，不改动 nav.css / bootstrap.css 原有规则；深色 .black 模式单独补覆盖。
 */

/* ============ 图标：统一 40px / 圆角 / 占位兜底背景 ============
 * 兜底链路（任一路径失败都落到占位图，不出现空白/裂图）：
 *   1) 服务端渲染：懒加载开启时 src 直接就是占位图（site-card.php）
 *   2) onerror 属性 + js/app.js 捕获阶段监听（data-src 换源 404/解码失败）
 *   3) 本背景图：请求挂起或完全无 error 事件的静默失败时，占位图透过 img 盒显示
 */
.xe-widget.xe-conversations .xe-comment-entry img{
    width:40px !important;
    height:40px !important;
    border-radius:10px;
    object-fit:cover;
    background-image:url('../images/favicon.png');
    background-position:center;
    background-repeat:no-repeat;
    background-size:cover;
    border:none;
    flex:none;
}

/* ============ 卡片：圆角 / 边框 / 阴影 / hover ============ */
.xe-widget.xe-conversations{
    border-radius:10px;
    border:1px solid #e8eef4;
    box-shadow:0 1px 4px rgba(15,30,60,.05);
    overflow:hidden;
}
.xe-widget.xe-conversations:hover,
.xe-widget.xe-conversations:focus{
    border-color:#f8d7da;
    box-shadow:0 14px 30px -12px rgba(241,64,75,.28);
}

/* ============ 标题与描述：行高对齐、单行截断不换行 ============ */
.xe-widget.xe-conversations .xe-comment .xe-user-name{
    font-size:14px;
    line-height:20px;
    height:20px;
    margin-top:2px;
    overflow:hidden;
}
.xe-widget.xe-conversations .xe-comment .xe-user-name strong{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-weight:600;
    color:#282828;
}
.xe-widget.xe-conversations .xe-comment p{
    font-size:12px;
    line-height:16px;
    height:16px;
    color:#9aa3ad;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

/* ============ 区块 h4 标题统一（首页分组 + 分类页） ============ */
.sites-list h4.text-gray,
.fav-parent-group h4.text-gray{
    display:flex !important;
    align-items:center;
    margin:14px 0 0;
    padding:0;
    font-size:15px;
    font-weight:600;
    line-height:1.5;
    color:#333;
}
.sites-list h4.text-gray .icon-io-tag,
.fav-parent-group h4.text-gray .icon-io-tag{
    position:relative;
    flex:none;
    margin-right:8px !important;
}
.black .sites-list h4.text-gray,
.black .fav-parent-group h4.text-gray{
    color:#ddd;
}

/* ============ 移动端：网格间距收紧、卡片不溢出 ============ */
@media screen and (max-width:767px){
    .xe-card{margin-top:12px}
    .xe-widget.xe-conversations{padding:12px}
    .sites-list h4.text-gray,
    .fav-parent-group h4.text-gray{margin-top:12px}
}