/* ============================================
   LS Comment - 全新评论区样式
   ============================================ */

/* 评论区容器 */
.ls-comment-box {
    padding: 16px;
    border-top: 1px solid #f4f4f5;
}

/* ---- 菜单栏 ---- */
.ls-comment-menu {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.ls-comment-count {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-right: auto;
}

.ls-comment-count em {
    font-style: normal;
}

.ls-comment-tabs {
    display: flex;
    background: #f4f4f5;
    border-radius: 6px;
    padding: 2px;
}

.ls-comment-tabs .tab-item {
    padding: 4px 12px;
    font-size: 12px;
    color: #71717a;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s;
    white-space: nowrap;
}

.ls-comment-tabs .tab-item:hover {
    color: #3f3f46;
}

.ls-comment-tabs .tab-item.on {
    background: #fff;
    color: #18181b;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* ---- 评论输入框 ---- */
.ls-comment-form {
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
    transition: border-color 0.15s;
}

.ls-comment-form:focus-within {
    border-color: #a1a1aa;
}

.ls-comment-form .ls-comment-textarea {
    width: 100%;
    padding: 12px 14px 6px;
    border: none;
    background: transparent;
    resize: none;
    height: 44px;
    max-height: 180px;
    font-size: 13px;
    line-height: 1.6;
    color: #18181b;
    outline: none;
}

.ls-comment-form .ls-comment-textarea::placeholder {
    color: #a1a1aa;
}

/* 图片上传列表 */
.ls-comment-img-list {
    display: inline-flex;
    gap: 6px;
    padding: 0 14px;
    flex-wrap: wrap;
}

.ls-comment-img-list:empty {
    display: none;
}

.ls-comment-img-list li {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

/* 上传列表里的图点开是灯箱（`LS.imgPicker` 给每张图挂了 `data-lightbox`），
   所以指针给放大镜 —— 不给的话它和右上角的删除按钮共用一个普通手型，
   看不出这张图本身也是可以点的。 */
.ls-comment-img-list li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.ls-comment-img-list li .close {
    position: absolute;
    top: 0;
    right: 0;
    width: 18px;
    height: 18px;
    background: rgba(0,0,0,0.55);
    border-radius: 0 8px 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.15s;
    cursor: pointer;
}

.ls-comment-img-list li:hover .close {
    opacity: 1;
}

/* 评论结构化工具预览：位置、群聊 */
.ls-comment-extra-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 14px 6px;
}

.ls-comment-extra-list:empty {
    display: none;
}

.ls-comment-extra-card {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 360px;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
}

.ls-comment-extra-card > i,
.ls-comment-extra-avatar {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #eff6ff;
    color: var(--ls-primary, #2563eb);
    overflow: hidden;
}

.ls-comment-extra-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ls-comment-extra-card > div:not(.ls-comment-extra-avatar) {
    min-width: 0;
    flex: 1;
}

.ls-comment-extra-card strong,
.ls-comment-extra-card span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ls-comment-extra-card strong {
    font-size: 13px;
    color: #111827;
}

.ls-comment-extra-card span {
    margin-top: 2px;
    font-size: 12px;
    color: #64748b;
}

.ls-comment-extra-remove {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: transparent;
    cursor: pointer;
}

.ls-comment-extra-remove:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* 图片拖拽排序 */
.ls-comment-img-list li.ls-img-sort-ghost {
    opacity: 0.35;
}
.ls-comment-img-list li.ls-img-sort-chosen {
    cursor: grabbing;
}
.ls-comment-img-list li.ls-img-sort-drag {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

/* 工具栏 */
.ls-comment-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px 6px;
}

.ls-comment-toolbar .toolbar-left {
    display: flex;
    gap: 5px;
}

.ls-comment-toolbar .tool-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    color: #a1a1aa;
    transition: all 0.15s;
    font-size: 17px;
}

.ls-comment-toolbar .tool-btn:hover {
    color: #52525b;
    background: #f4f4f5;
}

.ls-comment-toolbar .tool-btn.is-active {
    color: var(--ls-primary, #2563eb);
    background: rgba(37, 99, 235, 0.08);
}

/* 被挡住的图：整张压一个锁，图本身就是服务端发来的打码图。

   **这里不再叠 `filter: blur()`。** 服务端发的是一张 48 px 的小图，浏览器把它
   拉到几百像素本身就够朦胧；再叠一层高斯会把仅有的轮廓也糊掉，而「看得出画的
   是什么」正是这张图存在的理由 —— 让人想买。

   安全不靠这一层：服务端那边要么发打码图、要么发一点灰
   （`server-api/src/infra/image.rs` 的 `blur_pending`），**原图地址一次都不出现**。 */
.ls-ci-images-locked img {
    background: var(--ls-bg-secondary, #e9ebee);
    /* 评论那一格只有 90 px 上下，放大不到两倍，1 px 就够把块状抹平。
       判据与另外两档见 `pc/css/post-list.css` 那一段。 */
    filter: blur(1px);
}

.ls-ci-images-locked a {
    position: relative;
    overflow: hidden;
}

/* 能解锁的那种整块可点；锁图标自己不收事件，免得点在它上面时
   `event.target.closest('.ls-ci-img-locked')` 还要多跳一层。 */
.ls-ci-img-locked[data-comment-id] {
    cursor: pointer;
}

.ls-ci-img-lock {
    pointer-events: none;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

/* 能解锁的那张，鼠标悬上去锁放大一点，看得出它是能点的。 */
.ls-ci-img-locked[data-comment-id] .ls-ci-img-lock {
    transition: transform 0.15s;
}

.ls-ci-img-locked[data-comment-id]:hover .ls-ci-img-lock {
    transform: scale(1.12);
}

/* 档位标识：底栏左边那一组里，紧跟在「来自哪个端」后面。 */
.ls-ci-bar .ls-ci-visibility-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #ff9800;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
}

.ls-ci-bar .ls-ci-visibility-tag i {
    font-size: 13px;
}

/* 解锁卡片：正文被挡住时顶替正文那一块。 */
.ls-ci-paywall {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0 4px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 152, 0, 0.22);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.08), rgba(255, 152, 0, 0.03));
    font-size: 13px;
    color: var(--ls-text-secondary, #6b7280);
}

.ls-ci-paywall-icon {
    flex-shrink: 0;
    font-size: 16px;
    color: #ff9800;
}

.ls-ci-paywall-text {
    flex: 1;
    min-width: 0;
}

.ls-ci-paywall-btn {
    flex-shrink: 0;
    height: 28px;
    padding: 0 16px;
    border: none;
    border-radius: 14px;
    background: #ff9800;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s;
}

.ls-ci-paywall-btn:hover {
    background: #f57c00;
}

/* 可见范围菜单。挂在 body 上按视口坐标定位（`position: fixed`）——
   评论框为了圆角带着 `overflow: hidden`，挂在里面会被整块裁掉。
   层级、圆角、投影与出场动画都照站点通用浮层 `.ls-dropdown` 那一套。 */
.ls-comment-visibility-menu {
    position: fixed;
    z-index: 10020;
    width: 268px;
    padding: 10px;
    border-radius: 10px;
    background: var(--ls-card-bg, #fff);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.12), 0 3px 6px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
    transform-origin: top left;
    transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 翻到按钮上方时出场也要从下边缘长出来，否则动画方向和位置是反的。 */
.ls-comment-visibility-menu.is-above {
    transform: scale(0.96) translateY(4px);
    transform-origin: bottom left;
}

.ls-comment-visibility-menu.is-open {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.ls-comment-visibility-menu .ls-cvm-hd {
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ls-text-tertiary, #9ca3af);
}

.ls-comment-visibility-menu .ls-cvm-tiers,
.ls-comment-visibility-menu .ls-cvm-currency {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ls-comment-visibility-menu .ls-cvm-item,
.ls-comment-visibility-menu .ls-cvm-coin {
    padding: 4px 12px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: var(--ls-bg-secondary, #f3f4f6);
    font-size: 12px;
    line-height: 18px;
    color: var(--ls-text-secondary, #4b5563);
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.ls-comment-visibility-menu .ls-cvm-item:hover,
.ls-comment-visibility-menu .ls-cvm-coin:hover {
    border-color: var(--ls-primary, #2563eb);
    color: var(--ls-primary, #2563eb);
}

.ls-comment-visibility-menu .ls-cvm-item.is-active,
.ls-comment-visibility-menu .ls-cvm-coin.is-active {
    border-color: var(--ls-primary, #2563eb);
    background: var(--ls-primary, #2563eb);
    color: #fff;
}

/* 付费那一段：只在选中「付费可见」时展开，收起时整段不占位。 */
.ls-comment-visibility-menu .ls-cvm-pay {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--ls-border, #eceef1);
}

/* **这一条不能省**：浏览器给 `[hidden]` 的是 `display: none`，
   而上面那条 `display: flex` 的选择器更具体，会把它盖掉 ——
   少了这一句，付费的货币与价钱在每一档下面都摆着。 */
.ls-comment-visibility-menu .ls-cvm-pay[hidden] {
    display: none;
}

.ls-comment-visibility-menu .ls-cvm-price {
    display: flex;
    align-items: center;
    height: 30px;
    padding-right: 10px;
    border: 1px solid var(--ls-border, #e5e6eb);
    border-radius: 8px;
    transition: border-color 0.15s;
}

.ls-comment-visibility-menu .ls-cvm-price:focus-within {
    border-color: var(--ls-primary, #2563eb);
}

.ls-comment-visibility-menu .ls-cvm-amount {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    font-size: 13px;
    color: var(--ls-text, #18181b);
    outline: none;
}

.ls-comment-visibility-menu .ls-cvm-unit {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--ls-text-tertiary, #9ca3af);
}

.ls-comment-visibility-menu .ls-cvm-rmb {
    font-size: 12px;
    line-height: 1.5;
    color: var(--ls-text-tertiary, #9ca3af);
}

.ls-comment-visibility-menu .ls-cvm-imgonly {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 12px;
    color: var(--ls-text-secondary, #4b5563);
    cursor: pointer;
}

/* 与付费那一段同理：`display: flex` 的选择器更具体，会盖掉 `[hidden]`。 */
.ls-comment-visibility-menu .ls-cvm-imgonly[hidden] {
    display: none;
}

.ls-comment-visibility-menu .ls-cvm-imgonly-input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--ls-primary, #2563eb);
    cursor: pointer;
}

/* 提交按钮 */
.ls-comment-submit {
    padding: 0 18px;
    height: 30px;
    border: none;
    border-radius: 15px;
    background: var(--ls-primary, #2563eb);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 30px;
}

.ls-comment-submit:hover {
    filter: brightness(1.08);
}

.ls-comment-submit.is-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* @用户列表 */
.ls-comment-at-box:empty {
    display: none;
}

.ls-comment-at-box {
    padding: 4px 14px 8px;
}

/* ---- 评论列表 ---- */
.ls-comment-list {
    display: flex;
    flex-direction: column;
}

/* ---- 评论项 ---- */
.ls-comment-item {
    display: flex;
    gap: 10px;
    padding: 14px 0;
}

.ls-comment-item > .ls-avatar .lsaf-avatar-hook {
    display: block;
    width: 100%;
    height: 100%;
}

.ls-comment-item > .ls-avatar .ls-avatar-frame {
    pointer-events: none;
}

.ls-comment-list > .ls-comment-item + .ls-comment-item {
    border-top: 1px solid #f4f4f5;
}

/* 闪烁 */
.ls-comment-item.fade {
    animation: ls-fade 1.2s ease;
}

/* 通知跳转高亮 */
.ls-comment-item.ls-comment-focus {
    background: rgba(37, 99, 235, 0.05);
    border-radius: 6px;
    padding: 10px;
}

@keyframes ls-fade {
    0%, 40% { background: rgba(37, 99, 235, 0.04); }
    100% { background: transparent; }
}

/* 主体 */
.ls-ci-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* 用户信息 */
.ls-ci-header {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ls-ci-user {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 13px;
    font-weight: 500;
    color: #18181b;
}

.ls-ci-user:hover {
    color: var(--ls-theme-color, #2563eb);
}

.ls-ci-nickname {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ls-ci-header .ls-mark {
    font-size: 10px;
    padding: 0 4px;
    line-height: 16px;
    border-radius: 3px;
}

.ls-ci-header .ls-user-title {
    flex-shrink: 0;
}

.ls-ci-badges {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.ls-ci-badge {
    display: inline-flex;
    align-items: center;
    height: 16px;
    padding: 0 5px;
    border-radius: 3px;
    background: #f4f4f5;
    color: #52525b;
    font-size: 10px;
    line-height: 16px;
    font-weight: 500;
    white-space: nowrap;
}

.ls-ci-badge-author-engaged {
    background: rgba(37, 99, 235, 0.08);
    color: var(--ls-theme-color, #2563eb);
}

.ls-ci-badge-supporter {
    background: #fff7ed;
    color: #c2410c;
}

.ls-ci-badge-highlight {
    background: #f8fafc;
    color: #52525b;
}

.ls-ci-badge-part-author {
    color: var(--ls-theme-color, #2563eb);
}

.ls-ci-badge-part-supporter {
    color: #c2410c;
}

.ls-ci-badge-sep {
    margin: 0 4px;
    color: #a1a1aa;
}

/* 评论内容 */
.ls-ci-content {
    font-size: 14px;
    line-height: 1.7;
    color: #27272a;
    word-break: break-word;
}

.ls-ci-content .comment-sticky {
    display: inline-block;
    padding: 0 5px;
    font-size: 10px;
    line-height: 16px;
    color: #f43f5e;
    border: 1px solid #fda4af;
    border-radius: 3px;
    margin-right: 4px;
    vertical-align: text-bottom;
    font-weight: 500;
}

/* 引用回复 */
.ls-ci-reply-ref {
    background: #fafafa;
    border-left: 2px solid #e4e4e7;
    border-radius: 0 6px 6px 0;
    padding: 6px 10px;
    margin-bottom: 4px;
    font-size: 12px;
    color: #71717a;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ls-ci-reply-ref:hover {
    background: #f4f4f5;
}

/* @用户 */
.ls-ci-at-list {
    display: inline;
}

.ls-ci-at {
    color: #2563eb;
    margin-right: 2px;
    font-size: inherit;
    font-weight: 500;
}

.ls-ci-at:hover {
    text-decoration: underline;
}

/* 评论图片 */
.ls-ci-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    max-width: 280px;
    margin-top: 6px;
}

.ls-ci-images.img-1 {
    grid-template-columns: 1fr;
    max-width: 160px;
}

.ls-ci-images.img-2 {
    grid-template-columns: 1fr 1fr;
    max-width: 220px;
}

.ls-ci-images a {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    position: relative;
}

.ls-ci-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.ls-ci-images a:hover img {
    transform: scale(1.03);
}

.ls-ci-images k.gif {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 9px;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* 评论中的位置行 */
.ls-ci-location-line {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    margin-top: 4px;
    color: #2563eb;
    font-size: 13px;
    line-height: 20px;
    text-decoration: none;
    vertical-align: top;
}

.ls-ci-location-line i {
    font-size: 15px;
    color: #3b82f6;
}

.ls-ci-location-line span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ls-ci-location-line:hover {
    color: #1d4ed8;
}

/* 评论中的群聊卡片 */
.ls-ci-tool-card {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(340px, 100%);
    min-height: 68px;
    margin-top: 6px;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.ls-ci-tool-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.ls-ci-card-avatar {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0f2fe;
    color: #0284c7;
}

.ls-ci-card-avatar {
    background: #eef2ff;
    color: #4f46e5;
}

.ls-ci-card-avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ls-ci-card-info {
    min-width: 0;
    flex: 1;
}

.ls-ci-card-info strong,
.ls-ci-card-info span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ls-ci-card-info strong {
    font-size: 14px;
    color: #111827;
}

.ls-ci-card-info span {
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

/* ---- 操作栏 ---- */
.ls-ci-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2px;
}

.ls-ci-bar-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #a1a1aa;
}

.ls-ci-bar-right {
    display: flex;
    align-items: center;
    gap: 2px;
}

.ls-ci-bar-right > span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 12px;
    color: #a1a1aa;
    transition: all 0.15s;
}

.ls-ci-bar-right > span:hover {
    background: #f4f4f5;
    color: #52525b;
}

.ls-ci-bar-right > span i {
    font-size: 14px;
}

.ls-ci-bar-right > span em {
    font-style: normal;
}

/* 点赞激活 */
.ls-ci-up.is-up {
    color: #f43f5e !important;
}

.ls-ci-up.is-up:hover {
    color: #f43f5e !important;
    background: #fff1f2 !important;
}

/* ---- 子评论 ---- */
.ls-ci-child-list {
    margin-top: 6px;
    margin-left: 4px;
    padding-left: 12px;
    border-left: 2px solid #f4f4f5;
}

.ls-ci-child-list:empty {
    display: none;
}

.ls-ci-child-list .ls-comment-item {
    padding: 10px 0;
}

/* 子评论头像缩小 */
.ls-ci-child-list .ls-avatar {
    width: 24px;
    height: 24px;
}

.ls-ci-child-list .ls-avatar img.avatar,
.ls-ci-child-list .ls-avatar > a > img {
    width: 24px;
    height: 24px;
}

.ls-ci-child-list .ls-avatar .ls-avatar-verify img {
    width: 12px;
    height: 12px;
}
.ls-ci-child-list .ls-avatar .ls-online-dot { width: 6px; height: 6px; }

.ls-ci-child-list .ls-ci-content {
    font-size: 13px;
}

/* 子评论操作按钮 */
.ls-ci-child-more {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}

.ls-ci-child-more span {
    font-size: 12px;
    color: var(--ls-theme-color, #2563eb);
    cursor: pointer;
    transition: opacity 0.15s;
}

.ls-ci-child-more span:hover {
    opacity: 0.7;
}

/* 「共 N 条回复」里的条数：em 是给 JS 定位用的，别让它斜体 */
.ls-ci-child-more em {
    font-style: normal;
}

.ls-ci-child-fold {
    color: #a1a1aa !important;
}

/* ---- 加载更多 ---- */
.ls-comment-load-more {
    text-align: center;
    padding: 8px 0 0;
}

.ls-comment-load-more span {
    font-size: 13px;
    color: var(--ls-theme-color, #2563eb);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
    transition: opacity 0.15s;
}

.ls-comment-load-more span:hover {
    opacity: 0.7;
}

.ls-comment-load-more span i {
    font-size: 16px;
}

/* 空状态 */
.ls-comment-empty {
    text-align: center;
    padding: 36px 0;
    color: #a1a1aa;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.ls-comment-empty i {
    font-size: 32px;
    color: #d4d4d8;
}

/* 加载中 */
.ls-comment-loading {
    text-align: center;
    padding: 20px 0;
}

/* ---- 回复框 ---- */
.ls-comment-reply-form {
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    overflow: hidden;
    margin: 8px 0;
    transition: border-color 0.15s;
}

.ls-comment-reply-form:focus-within {
    border-color: #a1a1aa;
}

.ls-comment-reply-form .ls-comment-textarea {
    width: 100%;
    padding: 10px 12px 4px;
    border: none;
    background: transparent;
    resize: none;
    height: 38px;
    max-height: 120px;
    font-size: 13px;
    line-height: 1.5;
    color: #18181b;
    outline: none;
}

.ls-comment-reply-form .ls-comment-toolbar {
    padding: 2px 6px 4px;
}

.ls-comment-reply-form .ls-comment-submit {
    height: 26px;
    padding: 0 14px;
    font-size: 12px;
    line-height: 26px;
    border-radius: 13px;
}

.ls-comment-reply-form .tool-btn {
    width: 26px;
    height: 26px;
    font-size: 15px;
}

/* ---- LSEditor 编辑器 ---- */
.ls-editor {
    border: none;
    background: transparent;
}

/* 主评论框 LSEditor */
.ls-comment-form .ls-editor {
    min-height: 44px;
    max-height: 180px;
    padding: 12px 14px 6px;
    font-size: 13px;
    line-height: 1.6;
    color: #18181b;
    outline: none;
    word-break: break-word;
    overflow-y: auto;
}

/* 回复框 LSEditor */
.ls-comment-reply-form .ls-editor {
    min-height: 38px;
    max-height: 120px;
    padding: 10px 12px 4px;
    font-size: 13px;
    line-height: 1.5;
    color: #18181b;
    outline: none;
    word-break: break-word;
    overflow-y: auto;
}

.ls-editor:empty:not(:focus)::before {
    content: attr(data-placeholder);
    color: #a1a1aa;
    pointer-events: none;
}

.ls-editor .ls-emoji {
    width: auto;
    height: 1.4em;
    vertical-align: middle;
    margin: 0 1px;
}

/* ---- 语音条（评论列表） ---- */
.ls-ci-voice {
    --ls-voice-duration: 1;
    --ls-voice-width: clamp(82px, calc(82px + (var(--ls-voice-duration) - 1) * 3px), 180px);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 34px;
    min-width: 82px;
    width: var(--ls-voice-width);
    max-width: 180px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #bfd6ff;
    background: linear-gradient(90deg, #f3f8ff 0%, #e7f0ff 100%);
    color: #1d4ed8;
    cursor: pointer;
    user-select: none;
    transition: all .2s ease;
}

.ls-ci-voice:hover {
    border-color: #93c5fd;
}

.ls-ci-voice em {
    margin-left: auto;
    font-style: normal;
    font-size: 12px;
    color: #1e40af;
}

.ls-ci-voice-wave {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}

.ls-ci-voice-wave i {
    display: block;
    width: 2px;
    border-radius: 999px;
    background: #60a5fa;
}

.ls-ci-voice-wave i:nth-child(1) { height: 5px; }
.ls-ci-voice-wave i:nth-child(2) { height: 9px; }
.ls-ci-voice-wave i:nth-child(3) { height: 7px; }
.ls-ci-voice-wave i:nth-child(4) { height: 10px; }
.ls-ci-voice-wave i:nth-child(5) { height: 6px; }

.ls-ci-voice.is-playing {
    border-color: #60a5fa;
    background: linear-gradient(90deg, #e7f1ff 0%, #dbeafe 100%);
}

.ls-ci-voice.is-playing .ls-ci-voice-wave i {
    animation: ls-ci-voice-playing .8s ease-in-out infinite;
}

.ls-ci-voice.is-playing .ls-ci-voice-wave i:nth-child(1) { animation-delay: .02s; }
.ls-ci-voice.is-playing .ls-ci-voice-wave i:nth-child(2) { animation-delay: .12s; }
.ls-ci-voice.is-playing .ls-ci-voice-wave i:nth-child(3) { animation-delay: .22s; }
.ls-ci-voice.is-playing .ls-ci-voice-wave i:nth-child(4) { animation-delay: .32s; }
.ls-ci-voice.is-playing .ls-ci-voice-wave i:nth-child(5) { animation-delay: .42s; }

@keyframes ls-ci-voice-playing {
    0%, 100% {
        transform: scaleY(.55);
        opacity: .55;
    }
    50% {
        transform: scaleY(1.35);
        opacity: 1;
    }
}

/* 群聊选择弹窗 */
.ls-comment-group-picker {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ls-comment-group-tabs {
    display: flex;
    gap: 8px;
}

.ls-comment-group-tabs button {
    height: 32px;
    padding: 0 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    cursor: pointer;
}

.ls-comment-group-tabs button:hover,
.ls-comment-group-tabs button.is-active {
    border-color: var(--ls-primary, #2563eb);
    color: var(--ls-primary, #2563eb);
    background: #eff6ff;
}

.ls-comment-group-search {
    height: 36px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #94a3b8;
    background: #f8fafc;
}

.ls-comment-group-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    color: #111827;
}

.ls-comment-group-list {
    max-height: 360px;
    overflow-y: auto;
}

.ls-comment-group-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    border: none;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.ls-comment-group-item:hover {
    background: #f8fafc;
}

.ls-comment-group-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #eef2ff;
    color: #4f46e5;
}

.ls-comment-group-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ls-comment-group-main {
    min-width: 0;
    flex: 1;
}

.ls-comment-group-main strong,
.ls-comment-group-main em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ls-comment-group-main strong {
    font-size: 14px;
    color: #111827;
}

.ls-comment-group-main em {
    margin-top: 2px;
    font-size: 12px;
    color: #64748b;
    font-style: normal;
}

.ls-comment-group-empty,
.ls-comment-group-loading {
    padding: 32px 0;
    color: #94a3b8;
    text-align: center;
}
