/* ==========================================================================
   Zib 角标 —— 前台样式
   所有类名统一 zjb- 前缀，避免与主题冲突
   ========================================================================== */

/* 宿主容器：主题的 .item-thumbnail 本身已是 position:relative + overflow:hidden，
   这里兜底一次，防止某些模板缺少定位 */
.zjb-host {
    position: relative;
    overflow: hidden;
}

/* ---------- 角标基础 ---------- */
.zjb-cov {
    position: absolute;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: calc(100% - 16px);
    height: 21px;
    padding: 0 8px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    color: #fff;
    background: var(--zjb-c, #ff8a0d);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
    pointer-events: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: .2px;
}

/* ---------- 左上 ---------- */
.zjb-cov--tl {
    left: 8px;
    top: 8px;
}

/* ---------- 右下（B 方案：加群 / 获取限制） ---------- */
.zjb-cov--br {
    right: 8px;
    bottom: 8px;
}

/* 底部条存在时，右下角上移避让 */
.zjb-host.zjb-has-bar .zjb-cov--br {
    bottom: 32px;
}

/* ---------- 底部条 ---------- */
.zjb-cov--bar {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    height: 24px;
    border-radius: 0 0 8px 8px;
    font-size: 12.5px;
    box-shadow: none;
}

/* ---------- 右上斜角缎带 ---------- */
.zjb-cov--tr {
    top: 13px;
    right: -46px;
    left: auto;
    width: 150px;
    height: 21px;
    max-width: none;
    border-radius: 0 50px 50px 0;
    transform: rotate(45deg);
    transform-origin: center;
    font-size: 11.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}

/* ---------- 移动端收一收 ---------- */
@media (max-width: 768px) {
    .zjb-cov {
        height: 19px;
        padding: 0 6px;
        font-size: 11px;
    }
    .zjb-cov--tl { left: 6px; top: 6px; }
    .zjb-cov--br { right: 6px; bottom: 6px; }
    .zjb-host.zjb-has-bar .zjb-cov--br { bottom: 28px; }
    .zjb-cov--bar { height: 21px; font-size: 11.5px; }
    .zjb-cov--tr { top: 11px; right: -50px; width: 140px; font-size: 11px; }
}

/* ---------- 卡片较小时避免挤压 ---------- */
@media (max-width: 480px) {
    .zjb-cov--tr {
        display: none; /* 小屏空间不足，斜角容易糊，直接隐藏 */
    }
}
