/**
 * 文章共创 前台样式
 * 尽量复用子比(zibll)主题变量与已有类（如 .img-badge、.but），并带兜底。
 */

/* ===== 文章页省略号圆点 ===== */
.atp-collab-trigger {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    line-height: 24px;
    margin-left: 8px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(122, 130, 146, 0.35);
    background: transparent;
    color: var(--muted-2-color, #8890a3);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}
.atp-collab-trigger:hover {
    color: var(--primary-color, var(--this-primary-color, #1677ff));
    border-color: var(--primary-color, var(--this-primary-color, #1677ff));
    background: rgba(22, 119, 255, 0.06);
}

/* ===== 共创作者信息区（头像堆叠，紧贴原文作者信息右侧） ===== */
.atp-collab-trigger--partners {
    flex-shrink: 0;
    width: auto;
    height: 32px;
    line-height: 1;
    padding: 0 8px 0 4px;
    /* 紧贴原作者信息右侧（间距由父级 flex gap 控制），不另行拉开 */
    margin-left: 0;
    margin-right: 0;
    border-radius: 17px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    background: rgba(22, 119, 255, 0.06);
    border-color: rgba(22, 119, 255, 0.28);
}
.atp-collab-trigger--partners:hover {
    background: rgba(22, 119, 255, 0.12);
}
.atp-collab-trigger-avas {
    display: inline-flex;
    align-items: center;
}
.atp-collab-trigger-ava {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    margin-left: -8px;
    border: 2px solid var(--main-bg-color, #fff);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.atp-collab-trigger-ava:first-child { margin-left: 0; }
.atp-collab-trigger-ava-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.atp-collab-trigger-ava-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--muted-3-color, #e3e6ec);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
.atp-collab-trigger-extra {
    margin-left: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-color, var(--this-primary-color, #1677ff));
}

/* ===== 弹窗 ===== */
.atp-collab-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.atp-collab-modal.is-open { display: flex; }
.atp-collab-modal-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}
.atp-collab-modal-panel {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 78vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--main-bg-color, #fff);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
}
.atp-collab-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color, #eceef2);
}
.atp-collab-modal-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color, #22262e);
}
.atp-collab-modal-close {
    border: none;
    background: none;
    font-size: 22px;
    line-height: 1;
    color: var(--muted-3-color, #a5aab8);
    cursor: pointer;
    padding: 0 2px;
}
.atp-collab-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 18px 16px;
}
.atp-collab-modal-tip {
    font-size: 12px;
    color: var(--muted-2-color, #8890a3);
    margin: 10px 0 6px;
}
.atp-collab-modal-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.atp-collab-modal-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px dashed var(--border-color, #eceef2);
}
.atp-collab-modal-row:last-child { border-bottom: none; }
/* 整行可点击跳转个人主页 */
.atp-collab-modal-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s;
}
.atp-collab-modal-link:hover {
    background: rgba(22, 119, 255, 0.06);
}
.atp-collab-modal-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.atp-collab-modal-avatar--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--muted-3-color, #e3e6ec);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}
.atp-collab-modal-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.atp-collab-modal-top {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}
.atp-collab-modal-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color, #22262e);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.atp-collab-modal-name:hover { color: var(--primary-color, #1677ff); }
.atp-collab-modal-role {
    font-size: 12px;
    color: var(--muted-2-color, #8890a3);
    flex-shrink: 0;
    padding: 0 6px;
    border-radius: 4px;
    background: var(--border-color, #eceef2);
}
.atp-collab-modal-go {
    font-size: 11px;
    color: var(--muted-3-color, #a5aab8);
}
.atp-collab-modal-foot {
    padding: 12px 18px;
    border-top: 1px solid var(--border-color, #eceef2);
    text-align: right;
}

/* ===== 列表卡片角标 ===== */
.atp-collab-badge {
    position: absolute;
    top: 0.6em;
    left: 0;
    border-radius: 0 50px 50px 0;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    z-index: 2;
    padding: 0.2em 0.6em;
    font-size: 11px;
}
.atp-collab-badge--second { left: 52px; }
.posts-item.atp-collab-post { position: relative; }
.atp-collab-badge--inline {
    position: relative;
    display: inline-block;
    top: auto;
    left: auto;
    border-radius: 50px;
    margin-top: 6px;
}

/* ===== 投稿页共创选择器 ===== */
.atp-collab-desc {
    font-size: 12px;
    color: var(--muted-2-color, #8890a3);
    margin: 0 0 10px;
}
.atp-collab-search { position: relative; margin-bottom: 6px; }
.atp-collab-search-input,
.atp-collab-role-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--border-color, #dcdfe3);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    background: #fff;
    color: var(--text-color, #22262e);
}
.atp-collab-search-input:focus,
.atp-collab-role-input:focus { border-color: var(--primary-color, #1677ff); outline: none; }
.atp-collab-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 50;
    max-height: 220px;
    overflow-y: auto;
    background: var(--main-bg-color, #fff);
    border: 1px solid var(--border-color, #e6e8ee);
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.atp-collab-dropdown-empty {
    padding: 14px;
    text-align: center;
    font-size: 12px;
    color: var(--muted-3-color, #a5aab8);
}
.atp-collab-drop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color, #f0f1f4);
}
.atp-collab-drop-item:last-child { border-bottom: none; }
.atp-collab-drop-item:hover { background: rgba(22, 119, 255, 0.05); }
.atp-collab-drop-ava img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.atp-collab-drop-ava-ph { width: 30px; height: 30px; border-radius: 50%; display: inline-block; background: var(--muted-3-color, #e3e6ec); }
.atp-collab-drop-name { flex: 1; font-size: 13px; color: var(--text-color, #22262e); }
.atp-collab-drop-add { font-size: 12px; color: var(--primary-color, #1677ff); }
.atp-collab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color, #eceef2);
}
.atp-collab-item-main { min-width: 0; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.atp-collab-item-name { font-size: 13px; font-weight: 600; color: var(--text-color, #22262e); white-space: nowrap; }
.atp-collab-item-name em { font-style: normal; font-weight: 400; font-size: 11px; color: var(--muted-3-color, #a5aab8); }
.atp-collab-item-status {
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 4px;
    white-space: nowrap;
    background: #f2f2f5;
    color: var(--muted-2-color, #8890a3);
}
.atp-collab-item-status.is-approved { background: #e6f6ee; color: #16a34a; }
.atp-collab-item-status.is-rejected { background: #fde8e8; color: #dc2626; }
.atp-collab-item-status.is-pending { background: #fff6e5; color: #d97706; }
.atp-collab-item-role { flex: 1; min-width: 80px; }
.atp-collab-item-remove {
    flex-shrink: 0;
    border: none;
    background: none;
    font-size: 18px;
    line-height: 1;
    color: var(--muted-3-color, #a5aab8);
    cursor: pointer;
    padding: 2px 4px;
}
.atp-collab-item-remove:hover { color: #dc2626; }

/* ===== 共创确认中心 ===== */
.atp-collab-center {
    max-width: 680px;
    margin: 0 auto;
}
.atp-collab-center-head h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--text-color, #22262e);
}
.atp-collab-section { margin-bottom: 24px; }
.atp-collab-section-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.atp-collab-section-title em { font-style: normal; color: var(--muted-2-color, #8890a3); font-size: 13px; }
.atp-collab-empty {
    font-size: 13px;
    color: var(--muted-3-color, #a5aab8);
    padding: 18px 0;
    text-align: center;
    border: 1px dashed var(--border-color, #e6e8ee);
    border-radius: 8px;
}
.atp-collab-center-list { margin: 0; padding: 0; list-style: none; }
.atp-collab-center-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color, #eceef2);
    border-radius: 10px;
    background: var(--main-bg-color, #fff);
}
.atp-collab-center-item.is-focus { border-color: var(--primary-color, #1677ff); box-shadow: 0 0 0 1px var(--primary-color, #1677ff); }
.atp-collab-center-item-main { flex: 1; min-width: 0; }
.atp-collab-center-item-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color, #22262e);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.atp-collab-center-item-title:hover { color: var(--primary-color, #1677ff); }
.atp-collab-center-item-sub { font-size: 12px; color: var(--muted-2-color, #8890a3); margin-top: 3px; }
.atp-collab-center-item-actions { flex-shrink: 0; display: flex; gap: 8px; }
.atp-collab-center-item-status { font-size: 12px; flex-shrink: 0; }
.atp-collab-center-item-status.is-approved { color: #16a34a; }
.atp-collab-respond-accept { background: var(--primary-color, #1677ff); color: #fff; }
.atp-collab-respond-decline { color: var(--muted-2-color, #8890a3); }
.atp-collab-login { text-align: center; padding: 30px 10px; }
.atp-collab-login-btn { display: inline-block; margin-top: 10px; }