/* 详情页评论区交互组件：操作条、二级扁平回复盒、顶部折叠发帖框、行内轻回复与站长置顶条 */

/* 一级主楼行内操作条（去掉沉重底栏分割线） */
.rx-c-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 6px;
}
.rx-c-actions .rx-act-like,
.rx-c-actions .rx-act-reply,
.rx-c-actions .rx-c-edit {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    margin-left: -6px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--rx-muted);
    font-size: 12px;
    line-height: 1.45;
    text-decoration: none;
    transition: color .15s ease, background-color .15s ease;
}
.rx-c-actions .rx-act-reply,
.rx-c-actions .rx-c-edit {
    margin-left: 0;
}
.rx-c-actions .rx-act-like:hover,
.rx-c-actions .rx-act-reply:hover,
.rx-c-actions .rx-c-edit:hover {
    color: var(--rx-text);
    background: var(--rx-c-sub-bg);
}
.rx-act-like svg {
    width: 13.5px;
    height: 13.5px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.85;
}
.rx-act-like.is-liked {
    color: var(--rx-c-like);
    font-weight: 600;
}
.rx-act-like.is-liked svg {
    fill: currentColor;
}
.rx-act-like:disabled {
    cursor: wait;
    opacity: .6;
}
.rx-comment-like-count {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.rx-reply-num {
    font-style: normal;
    font-size: 11.5px;
    color: var(--rx-muted);
    font-variant-numeric: tabular-nums;
}
.rx-c-actions .rx-c-edit {
    margin-left: auto;
}

/* 二级扁平子回复盒（全站最多只缩进一层，彻底告别多层套娃） */
.rx-subbox {
    margin: 8px 0 0 45px;
    padding: 7px 13px;
    border-radius: 10px;
    background: var(--rx-c-sub-bg);
    border-left: 2px solid rgba(75, 141, 255, .36);
}
.rx-subitem {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
    padding: 6px 0;
    align-items: start;
}
.rx-subitem[hidden] {
    display: none;
}
.rx-subitem + .rx-subitem {
    border-top: 1px dashed var(--rx-c-line-soft);
}
.rx-sub-main {
    min-width: 0;
}
.rx-sub-line {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--rx-c-body);
    overflow-wrap: anywhere;
}
.rx-sub-line .rx-c-author {
    font-size: 13px;
    margin-right: 4px;
}
.rx-sub-line .rx-c-badge {
    margin-right: 4px;
    vertical-align: 1px;
}
.rx-sub-reply-to {
    color: var(--rx-muted);
    font-size: 12.5px;
    margin-right: 2px;
}
.rx-jump-target {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--rx-blue);
    font-size: inherit;
    font-weight: 550;
}
.rx-jump-target:hover {
    text-decoration: underline;
}
.rx-sub-colon {
    color: var(--rx-muted);
}
.rx-sub-body p {
    display: inline;
    margin: 0;
}
.rx-sub-body p + p::before {
    content: " ";
}
.rx-sub-body a {
    color: var(--rx-blue);
}
.rx-sub-meta {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: 8px;
    font-size: 11.5px;
    color: var(--rx-muted);
    vertical-align: baseline;
}
.rx-sub-meta .rx-act-like,
.rx-sub-meta .rx-act-reply,
.rx-sub-meta .rx-c-edit {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--rx-muted);
    font-size: 11.5px;
    text-decoration: none;
}
.rx-sub-meta .rx-act-like svg {
    width: 12px;
    height: 12px;
}
.rx-sub-meta .rx-act-like:hover,
.rx-sub-meta .rx-act-reply:hover,
.rx-sub-meta .rx-c-edit:hover {
    color: var(--rx-blue);
}
.rx-sub-meta .rx-act-like.is-liked {
    color: var(--rx-c-like);
}

/* 展开/收起其余回复按钮 */
.rx-sub-toggle {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
    padding: 3px 0 1px;
    border: 0;
    background: transparent;
    color: var(--rx-blue);
    font-size: 12.5px;
    font-weight: 550;
}
.rx-sub-toggle:hover .rx-sub-toggle-text {
    text-decoration: underline;
}
.rx-sub-admin-hint {
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--rx-c-gold);
    background: var(--rx-c-gold-bg);
    border: 1px solid var(--rx-c-gold-border);
}

/* 高亮定位闪烁动效 */
.rx-is-flash {
    animation: rxCommentFlash 1.4s ease;
    border-radius: 7px;
}
@keyframes rxCommentFlash {
    0% { background: rgba(75, 141, 255, .24); }
    100% { background: transparent; }
}

/* 顶部折叠态发表框 */
.rx-composer {
    margin: 13px 0 7px;
    border: 1px solid var(--rx-line);
    border-radius: 10px;
    background: var(--rx-c-input-bg);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.rx-composer.is-open {
    border-color: rgba(75, 141, 255, .58);
    box-shadow: 0 0 0 3px rgba(75, 141, 255, .1);
}
.rx-composer-row {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 9px 11px;
}
.rx-composer textarea {
    flex: 1;
    min-width: 0;
    height: 30px;
    min-height: 30px;
    max-height: 190px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--rx-text);
    font-size: 13.5px;
    line-height: 1.55;
    resize: none;
    outline: 0;
    transition: height .16s ease;
}
.rx-composer.is-open textarea {
    height: 76px;
    resize: vertical;
}
.rx-composer textarea::placeholder {
    color: var(--rx-muted);
    opacity: 1;
}
.rx-composer-quick-btn {
    flex-shrink: 0;
    height: 30px;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    background: linear-gradient(135deg, #2b6ee0, #1f5ecc);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
}
.rx-composer.is-open .rx-composer-quick-btn {
    display: none;
}
.rx-composer-foot {
    display: none;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 11px 9px 56px;
    border-top: 1px solid var(--rx-c-line-soft);
}
.rx-composer.is-open .rx-composer-foot {
    display: flex;
}
.rx-composer-id {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--rx-muted);
}
.rx-composer-id strong {
    color: var(--rx-text);
    font-weight: 600;
}
.rx-composer-name-label {
    margin: 0;
    font-size: 12px;
    color: var(--rx-muted);
}
.rx-composer-name-input {
    width: 155px;
    height: 28px;
    padding: 0 9px;
    border: 1px solid var(--rx-line);
    border-radius: 6px;
    background: var(--rx-panel-soft);
    color: var(--rx-text);
    font-size: 12.5px;
}
.rx-composer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rx-btn-ghost {
    height: 30px;
    padding: 0 11px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--rx-muted);
    font-size: 12.5px;
}
.rx-btn-ghost:hover {
    color: var(--rx-text);
    background: var(--rx-c-sub-bg);
}
.rx-btn-primary {
    height: 30px;
    padding: 0 15px;
    border: 0;
    border-radius: 7px;
    background: linear-gradient(135deg, #2b6ee0, #1f5ecc);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(43, 110, 224, .2);
}
.rx-btn-primary:disabled,
.rx-composer-quick-btn:disabled {
    opacity: .6;
    cursor: wait;
}

/* 站长置顶紧凑横条 */
.rx-pinned-bar {
    margin: 10px 0 4px;
    padding: 9px 13px;
    border: 1px solid var(--rx-c-gold-border);
    border-radius: 9px;
    background: var(--rx-c-gold-bg);
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13.5px;
    line-height: 1.55;
    cursor: pointer;
    transition: border-color .15s ease;
}
.rx-pinned-bar:hover {
    border-color: var(--rx-c-gold);
}
.rx-pinned-tag {
    flex-shrink: 0;
    padding: 1px 6px;
    margin-top: 2px;
    border-radius: 4px;
    background: linear-gradient(135deg, #ffe5a5, #f5b94c);
    color: #291b04;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.45;
}
.rx-pinned-body {
    min-width: 0;
    flex: 1;
}
.rx-pinned-text {
    color: var(--rx-text);
    overflow-wrap: anywhere;
}
.rx-pinned-meta {
    margin-left: 8px;
    font-size: 11.5px;
    color: var(--rx-muted);
    white-space: nowrap;
}

/* 行内轻回复表单 */
.rx-inline-reply {
    margin: 8px 0 2px 45px;
    padding: 7px 9px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(75, 141, 255, .48);
    border-radius: 8px;
    background: var(--rx-c-input-bg);
    box-shadow: 0 0 0 3px rgba(75, 141, 255, .08);
}
.rx-inline-reply input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 28px;
    border: 0;
    background: transparent;
    color: var(--rx-text);
    font-size: 13px;
    outline: 0;
}
.rx-inline-reply input[type="text"]::placeholder {
    color: var(--rx-muted);
}
.rx-inline-reply .rx-btn-ghost,
.rx-inline-reply .rx-btn-primary {
    height: 28px;
    padding: 0 11px;
    font-size: 12px;
}

/* 渐进加载更多按钮与状态提示 */
.rx-load-more {
    width: 100%;
    height: 36px;
    margin-top: 11px;
    border: 1px dashed var(--rx-line);
    border-radius: 8px;
    background: transparent;
    color: var(--rx-muted);
    font-size: 13px;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.rx-load-more:hover {
    color: var(--rx-text);
    border-color: var(--rx-blue);
    background: var(--rx-c-sub-bg);
}
.rx-load-more[hidden] {
    display: none;
}
.rx-comment-live {
    min-height: 0;
    margin: 4px 0 0;
    color: var(--rx-muted);
    font-size: 12px;
    text-align: right;
}
.rx-comment-live.is-error {
    color: var(--rx-c-like);
}
.rx-comment-live:empty {
    margin: 0;
}

/* 移动端紧凑缩进与零横向溢出 */
@media (max-width: 760px) {
    .rx-subbox {
        margin-left: 12px;
        padding: 7px 10px;
    }
    .rx-sub-line {
        font-size: 13px;
    }
    .rx-inline-reply {
        margin-left: 12px;
        flex-wrap: wrap;
    }
    .rx-composer-foot {
        padding-left: 11px;
    }
    .rx-pinned-bar {
        padding: 8px 11px;
        font-size: 13px;
    }
    .rx-pinned-meta {
        display: block;
        margin: 2px 0 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    .rx-is-flash,
    .rx-composer textarea {
        animation: none;
        transition: none;
    }
}
