/* ============================================================
 * 标签页（掘金式）· PC
 * 层级对齐掘金标签页：居中大标签名 → 关注·文章统计 →
 * 卡片顶部条（图标+关注按钮 | 热门/最新/最热）→
 * 文章流 li.item > .entry > .content-wrapper >
 * (.content-main[title-row/abstract/entry-footer] + img.thumb)
 * ============================================================ */

.lsj-tag-page {
    width: 100%;
    margin: 0;
    background: #f4f5f5; /* 掘金页面底色，list-header 直接衬在其上 */
}

/* 居中内容列（色带为全宽独立层，不包在列内） */
.lsj-tag-page .tp-wrap {
    width: min(var(--tp-width, 720px), calc(100% - 32px));
    margin: 12px auto 48px;
}

/* ---------- 头部：tag-info-box（与掘金逐条对齐） ---------- */
.lsj-tag-page .tag-info-box {
    position: relative;
    height: 150px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #f1f1f1;
}
.lsj-tag-page .tag-info-box .tag-info {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    color: #666;
    padding: 48px 0; /* 掘金 4rem（根字号 12px）= 48px */
    box-sizing: border-box;
}
.lsj-tag-page .tag-info .title {
    font-size: 25px;
    line-height: 30px;
    font-weight: 700;
    /* 掘金未重置 h1 的 UA 上边距（.67em），仅覆盖下边距 .3rem≈4px */
    margin: .67em 0 4px;
    word-break: break-all;
}
.lsj-tag-page .tag-info .tag-meta {
    font-size: 12px;
    color: #666;
}
.lsj-tag-page .tag-info .tag-meta em {
    font-style: normal;
}

/* ---------- 白色卡片 ---------- */
.tp-card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

/* ---------- 顶部条：header.list-header（与掘金逐条对齐；独立于白卡片，衬页面灰底） ---------- */
.lsj-tag-page .list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3.6px; /* 掘金 .3rem（根字号 12px）= 3.6px */
    border-bottom: 1px solid hsla(0, 0%, 59.2%, .1);
    margin-bottom: 12px; /* 与下方白卡片的间距 */
}
.lsj-tag-page .list-header .left {
    display: flex;
    align-items: center;
}
.lsj-tag-page .list-header .tag-icon {
    height: 1.5rem;
    margin-right: 1rem;
}
.lsj-tag-page .subscribe-btn {
    margin: 0 0 0 12px; /* 掘金 1rem */
    padding: 6px 15px;
    font-size: 14px;
    color: #6cbd45;
    background: #fff;
    border: 1px solid #6cbd45;
    border-radius: 2px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, opacity .15s;
}
.lsj-tag-page .subscribe-btn:hover {
    background: rgba(108, 189, 69, .06);
}
.lsj-tag-page .subscribe-btn.had {
    color: #909090;
    border-color: #dcdcdc;
}
.lsj-tag-page .subscribe-btn.had:hover {
    background: #f7f8fa;
}
.lsj-tag-page .subscribe-btn.is-loading {
    opacity: .6;
    pointer-events: none;
}

.lsj-tag-page .nav-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1;
    list-style: none;
    margin: 0;
    padding: 0;
}
.lsj-tag-page .nav-list .nav-item {
    margin-left: 36px; /* 掘金 3rem */
    font-size: 14px;
}
.lsj-tag-page .nav-list .nav-item a {
    color: #909090;
    cursor: pointer;
    transition: color .15s;
}
.lsj-tag-page .nav-list .nav-item a:hover {
    color: var(--tp-primary, #1e80ff);
}
.lsj-tag-page .nav-list .nav-item.active a {
    color: var(--tp-primary, #1e80ff);
    font-weight: 500;
}

/* ---------- 文章流（掘金 entry 层级） ---------- */
.tp-entry-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.tp-entry-list > .item {
    border-bottom: 1px solid #f1f2f5;
}
.tp-entry-list > .item:last-child {
    border-bottom: none;
}

.lsj-tag-page .entry {
    cursor: pointer;
    position: relative;
    background: #fff;
    padding: 12px 20px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.lsj-tag-page .entry:hover {
    background: #fafbfc;
}

.lsj-tag-page .content-wrapper {
    display: flex;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(228, 230, 235, 0.5);
        width: 100%;
}
.lsj-tag-page .content-main {
    flex: 1;
    min-width: 0;
}

/* 标题行 */
.lsj-tag-page .title-row {
    display: flex;
    margin-bottom: 2px;
}
.lsj-tag-page .title-row .title {
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    color: #252933;
    width: 100%;
    display: -webkit-box;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}
.lsj-tag-page .entry:hover .title-row .title {
    /* color: var(--tp-primary, #1e80ff); */
}

/* 摘要行 */
.lsj-tag-page .abstract {
    margin-bottom: 4px;
    font-weight: 400;
}
.lsj-tag-page .abstract a {
    color: #8a919f;
    font-size: 13px;
    line-height: 22px;
    display: -webkit-box;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}
.lsj-tag-page .abstract a > div {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 底部行：元信息 + 右侧标签 */
.lsj-tag-page .entry-footer {
    display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        flex-wrap: wrap;
    
}
.lsj-tag-page .action-list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    color: #8a919f;
    min-width: 0;
}
.lsj-tag-page .action-list > .item {
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.lsj-tag-page .action-list svg {
    flex-shrink: 0;
    margin-right: 4px;
}
.lsj-tag-page .action-list .view-icon {
    margin-right: 5px;
}
.lsj-tag-page .user-message {
    color: #515767;
    font-weight: 500;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .15s;
}
.lsj-tag-page .user-message:hover {
    color: var(--tp-primary, #1e80ff);
}
.lsj-tag-page .footer-divider {
    width: 1px;
    height: 14px;
    background: #e4e6eb;
    margin: 0 10px;
    flex-shrink: 0;
}
.lsj-tag-page .action-list > .item.like.is-liked,
.lsj-tag-page .action-list > .item.like.is-liked span {
    color: #1e80ff;
}

/* 竖线只保留在作者、时间后面（掘金同款），浏览/点赞/评论用间距分隔 */
.lsj-tag-page .action-list > .item.like,
.lsj-tag-page .action-list > .item.comment {
    margin-left: 20px;
}
.lsj-tag-page .action-list > .item.like {
    cursor: pointer;
    transition: color .15s;
}
.lsj-tag-page .action-list > .item.like:not(.is-liked):hover,
.lsj-tag-page .action-list > .item.like:not(.is-liked):hover span {
    color: var(--tp-primary, #1e80ff);
}

/* 右侧标签 chips */
.lsj-tag-page .entry-footer-tags {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.lsj-tag-page .footer-tag {
    display: inline-flex;
    align-items: center;
    height: 20px;
    padding: 0 8px;
    margin-left: 8px;
    font-size: 12px;
    line-height: 1;
    color: #8a919f;
    background: #f2f3f5;
    border-radius: 2px;
    white-space: nowrap;
    transition: color .15s;
}
.lsj-tag-page .footer-tag.width-limited {
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lsj-tag-page .footer-tag:hover {
    color: var(--tp-primary, #1e80ff);
}

/* 右缩略图 */
.lsj-tag-page .thumb {
    flex: 0 0 auto;
    width: 108px;
    height: 72px;
    margin-left: 24px;
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid rgba(228, 230, 235, 0.5);
}

/* ---------- 状态：加载 / 空 / 加载更多 ---------- */
.tp-list-loading,
.tp-empty {
    list-style: none;
    padding: 56px 20px;
    text-align: center;
    font-size: 14px;
    color: #8a919f;
}
.tp-empty .remix-icon {
    display: block;
    font-size: 36px;
    margin-bottom: 10px;
    opacity: .35;
}
.tp-loadmore {
    padding: 16px 20px 20px;
    text-align: center;
}
.tp-loadmore-text {
    font-size: 13px;
    color: #8a919f;
}

/* ---------- 窄屏兜底（PC 模块仅在桌面注入，双屏/小窗自适应） ---------- */
@media (max-width: 768px) {
    .lsj-tag-page .tp-wrap {
        margin-top: 8px;
    }
    .lsj-tag-page .list-header .tag-icon {
        width: 44px;
        height: 44px;
    }
    .lsj-tag-page .nav-list .nav-item {
        margin-left: 20px;
    }
    .lsj-tag-page .entry {
        padding: 12px 14px 0;
    }
    .lsj-tag-page .thumb {
        width: 96px;
        height: 64px;
        margin-left: 12px;
    }
    .lsj-tag-page .entry-footer-tags {
        display: none;
    }
}
