/* 长文发布页 - publish-article */
/* CSS 前缀: ls-pa- (LightSNS Publish Article) */

/* ========== 页面布局 ========== */
.ls-pa-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px 60px;
    min-height: calc(100vh - var(--ls-header-height));
}

/* ========== 底部操作栏 ========== */
.ls-pa-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid var(--ls-border);
    background: var(--ls-card-bg);
    border-radius: 0 0 10px 10px;
    border-left: 1px solid var(--ls-border);
    border-right: 1px solid var(--ls-border);
    border-bottom: 1px solid var(--ls-border);
}
.ls-pa-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ls-pa-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ls-pa-word-count {
    font-size: 12px;
    color: var(--ls-text-4);
    line-height: 1;
    text-align: right;
    padding: 0 24px 12px;
}
.ls-pa-word-count em { font-style: normal; }
.ls-pa-word-count.ls-over { color: var(--ls-danger); }
.ls-pa-word-count.ls-under { color: var(--ls-warning); }

/* ========== 板块选择器 ========== */
.ls-pa-bbs-select {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--ls-text-2);
    border: 1px solid var(--ls-border);
    transition: all 0.15s;
    line-height: 1;
}
.ls-pa-bbs-select:hover { border-color: var(--ls-primary); color: var(--ls-primary); }
.ls-pa-bbs-select img { width: 20px; height: 20px; border-radius: 4px; object-fit: cover; }
.ls-pa-bbs-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ========== 草稿/发布按钮 ========== */
.ls-pa-draft-btn {
    padding: 5px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--ls-text-2);
    border: 1px solid var(--ls-border);
    transition: all 0.15s;
    line-height: 1.4;
    user-select: none;
}
.ls-pa-draft-btn:hover { border-color: var(--ls-text-3); color: var(--ls-text); }
.ls-pa-submit-btn {
    padding: 5px 18px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background: var(--ls-primary);
    transition: all 0.15s;
    line-height: 1.4;
}
.ls-pa-submit-btn:hover { opacity: 0.9; }
.ls-pa-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ========== 写作卡片 ========== */
.ls-pa-card {
    background: var(--ls-card-bg);
    border-radius: 10px 10px 0 0;
    border: 1px solid var(--ls-border);
    border-bottom: none;
    margin-top: 20px;
    position: relative;
}

/* ========== 标题 ========== */
.ls-pa-title {
    padding: 24px 24px 16px;
    position: relative;
}
.ls-pa-title input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 24px;
    font-weight: 700;
    color: var(--ls-text);
    background: transparent;
    padding: 0;
    padding-right: 60px;
    line-height: 1.4;
}
.ls-pa-title input::placeholder { color: var(--ls-text-4); font-weight: 400; }
.ls-pa-title-count {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--ls-text-4);
    margin-top: 12px;
}
.ls-pa-title-count em { font-style: normal; }
.ls-pa-title.ls-over .ls-pa-title-count { color: var(--ls-danger); }

/* ========== 编辑器工具栏（sticky） ========== */
.ls-pa-toolbar-main {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 24px;
    border-top: 1px solid var(--ls-border);
    border-bottom: 1px solid var(--ls-border);
    flex-wrap: wrap;
    position: sticky;
    top: var(--ls-header-height, 0px);
    z-index: 40;
    background: var(--ls-card-bg);
    border-radius: 0;
}
.ls-pa-tb-group {
    display: flex;
    align-items: center;
    gap: 1px;
}
.ls-pa-tb-btn {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 5px;
    cursor: pointer;
    color: var(--ls-text-3);
    font-size: 16px;
    transition: all 0.15s;
    flex-shrink: 0;
    position: relative;
}
.ls-pa-tb-btn:hover { background: var(--ls-bg-2); color: var(--ls-text); }
.ls-pa-tb-btn.ls-active { background: rgba(var(--ls-primary-rgb), 0.08); color: var(--ls-primary); }
.ls-pa-tb-sep {
    width: 1px;
    height: 18px;
    background: var(--ls-border);
    margin: 0 5px;
    flex-shrink: 0;
}

/* ========== tiptap 编辑器 ========== */
.ls-pa-editor {
    padding: 20px 24px 32px;
    min-height: 480px;
}
.ls-pa-editor .ProseMirror {
    outline: none;
    min-height: 440px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--ls-text);
}
.ls-pa-editor .ProseMirror p.is-editor-empty:first-child::before {
    content: attr(data-placeholder);
    float: left;
    color: var(--ls-text-4);
    pointer-events: none;
    height: 0;
}
.ls-pa-editor .ProseMirror img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 4px 2px;
    cursor: pointer;
    display: inline-block;
    vertical-align: bottom;
}
.ls-pa-editor .ProseMirror img.ProseMirror-selectednode {
    outline: 2px solid var(--ls-primary);
    outline-offset: 2px;
}
.ls-pa-editor .ProseMirror video {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 4px 2px;
    cursor: pointer;
    display: inline-block;
    vertical-align: bottom;
}
.ls-pa-editor .ProseMirror video.ProseMirror-selectednode {
    outline: 2px solid var(--ls-primary);
    outline-offset: 2px;
}
/* 编辑器内链接样式 */
.ls-pa-editor .ProseMirror a,
.ls-pa-hidden-editor .ProseMirror a {
    color: var(--ls-primary);
    text-decoration: underline;
    cursor: text;
    pointer-events: none;
    margin: 0 2px;
}
/* 链接插入弹窗 */
.ls-pa-link-form { display: flex; flex-direction: column; gap: 14px; }
.ls-pa-link-field { display: flex; flex-direction: column; gap: 4px; }
.ls-pa-link-field label { font-size: 13px; color: var(--ls-text-3); }
.ls-pa-link-field input { border: 1px solid var(--ls-border); border-radius: 6px; padding: 8px 10px; font-size: 14px; outline: none; transition: border-color 0.15s; }
.ls-pa-link-field input:focus { border-color: var(--ls-primary); }
.ls-pa-link-toggle { flex-direction: row; align-items: center; justify-content: space-between; }
.ls-pa-link-switch { width: 36px; height: 20px; border-radius: 10px; background: #ddd; position: relative; cursor: pointer; transition: background 0.2s; display: inline-block; }
.ls-pa-link-switch i { width: 16px; height: 16px; border-radius: 50%; background: #fff; position: absolute; top: 2px; left: 2px; transition: left 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.15); }
.ls-pa-link-switch.ls-on { background: var(--ls-primary); }
.ls-pa-link-switch.ls-on i { left: 18px; }
.ls-pa-editor .ProseMirror pre {
    background: #f5f6f7;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 12px 16px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    margin: 10px 0;
    color: #333;
}
.ls-pa-editor .ProseMirror pre code {
    color: inherit;
    background: none;
    font-size: inherit;
    padding: 0;
}
.ls-pa-editor .ProseMirror blockquote {
    border-left: 3px solid var(--ls-primary);
    padding-left: 14px;
    margin: 10px 0;
    color: var(--ls-text-2);
}
.ls-pa-editor .ProseMirror h2 { font-size: 22px; font-weight: 700; margin: 20px 0 8px; }
.ls-pa-editor .ProseMirror h3 { font-size: 18px; font-weight: 600; margin: 16px 0 6px; }
.ls-pa-editor .ProseMirror hr {
    border: none;
    border-top: 1px solid var(--ls-border);
    margin: 16px 0;
}
.ls-pa-editor .ProseMirror ul,
.ls-pa-editor .ProseMirror ol { padding-left: 24px; }
.ls-pa-editor .ProseMirror ul[data-type="taskList"] {
    padding-left: 0;
    list-style: none;
}
.ls-pa-editor .ProseMirror ul[data-type="taskList"] li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
}
.ls-pa-editor .ProseMirror ul[data-type="taskList"] li label {
    flex-shrink: 0;
    margin-top: 5px;
    position: relative;
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.ls-pa-editor .ProseMirror ul[data-type="taskList"] li label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}
.ls-pa-editor .ProseMirror ul[data-type="taskList"] li label span {
    display: block;
    width: 18px;
    height: 18px;
    border: 2px solid var(--ls-border);
    border-radius: 4px;
    transition: all 0.15s;
    background: var(--ls-card-bg);
}
.ls-pa-editor .ProseMirror ul[data-type="taskList"] li label input[type="checkbox"]:checked + span,
.ls-pa-editor .ProseMirror ul[data-type="taskList"] li[data-checked="true"] label span {
    background: var(--ls-primary);
    border-color: var(--ls-primary);
}
.ls-pa-editor .ProseMirror ul[data-type="taskList"] li label input[type="checkbox"]:checked + span::after,
.ls-pa-editor .ProseMirror ul[data-type="taskList"] li[data-checked="true"] label span::after {
    content: "";
    display: block;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin: 1px 0 0 5px;
}
.ls-pa-editor .ProseMirror ul[data-type="taskList"] li[data-checked="true"] > div {
    text-decoration: line-through;
    color: var(--ls-text-4);
}

/* ========== 预览弹窗 ========== */
.ls-pa-preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
}
.ls-pa-preview-modal.ls-show { display: flex; align-items: center; justify-content: center; }
.ls-pa-preview-mask {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
}
.ls-pa-preview-dialog {
    position: relative;
    width: 1052px;
    max-width: 90vw;
    max-height: 85vh;
    background: var(--ls-card-bg);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}
.ls-pa-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--ls-border);
    flex-shrink: 0;
}
.ls-pa-preview-header-title {
    font-size: 14px;
    color: var(--ls-text-2);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
.ls-pa-preview-close {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    cursor: pointer;
    color: var(--ls-text-3);
    font-size: 16px;
    transition: all 0.15s;
}
.ls-pa-preview-close:hover { background: var(--ls-bg-2); color: var(--ls-text); }
.ls-pa-preview-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 28px;
}
.ls-pa-preview-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--ls-text);
    margin-bottom: 16px;
    line-height: 1.4;
}
.ls-pa-preview-title:empty { display: none; }
.ls-pa-preview-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--ls-text);
    word-break: break-word;
}
.ls-pa-preview-body img { max-width: 100%; height: auto; border-radius: 6px; margin: 4px 2px; display: inline-block; vertical-align: bottom; }
.ls-pa-preview-body video { max-width: 100%; height: auto; border-radius: 6px; margin: 8px 0; display: block; }
.ls-pa-preview-body pre {
    background: #f5f6f7;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 12px 16px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    margin: 10px 0;
    color: #333;
}
.ls-pa-preview-body pre code {
    color: inherit;
    background: none;
    font-size: inherit;
    padding: 0;
}
.ls-pa-preview-body blockquote {
    border-left: 3px solid var(--ls-primary);
    padding-left: 14px;
    margin: 10px 0;
    color: var(--ls-text-2);
}
.ls-pa-preview-body h2 { font-size: 22px; font-weight: 700; margin: 20px 0 8px; }
.ls-pa-preview-body h3 { font-size: 18px; font-weight: 600; margin: 16px 0 6px; }
.ls-pa-preview-body hr { border: none; border-top: 1px solid var(--ls-border); margin: 16px 0; }
.ls-pa-preview-body ul, .ls-pa-preview-body ol { padding-left: 24px; }

/* ========== 附加信息区域 ========== */
.ls-pa-extra {
    margin-top: 0;
    background: var(--ls-card-bg);
    border-radius: 0;
    border: 1px solid var(--ls-border);
    border-top: none;
    border-bottom: none;
    padding: 0 16px;
}

/* ========== 附件区域 ========== */
.ls-pa-files { padding: 6px 8px; }
.ls-pa-file-list { display: flex; flex-direction: column; gap: 6px; }
.ls-pa-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--ls-card-bg);
    border-radius: 8px;
    border: 1px solid var(--ls-border);
    transition: border-color 0.15s;
}
.ls-pa-file-item:hover { border-color: var(--ls-primary); }
.ls-pa-file-item.ls-locked { border-color: var(--ls-warning); background: rgba(var(--ls-warning-rgb, 255,152,0), 0.04); }
.ls-pa-file-icon {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.ls-pa-file-info { flex: 1; min-width: 0; }
.ls-pa-file-name { font-size: 13px; color: var(--ls-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-pa-file-meta { font-size: 12px; color: var(--ls-text-4); margin-top: 1px; }
.ls-pa-file-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ls-pa-file-edit, .ls-pa-file-lock, .ls-pa-file-remove {
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 5px; cursor: pointer; color: var(--ls-text-4); transition: all 0.15s;
}
.ls-pa-file-edit:hover { background: var(--ls-bg-2); color: var(--ls-primary); }
.ls-pa-file-lock:hover { background: var(--ls-bg-2); color: var(--ls-warning); }
.ls-pa-file-item.ls-locked .ls-pa-file-lock { color: var(--ls-warning); }
.ls-pa-file-remove:hover { background: var(--ls-bg-2); color: var(--ls-danger); }
.ls-pa-file-power-tip {
    display: none; padding: 6px 0; font-size: 12px; color: var(--ls-text-4); gap: 4px; align-items: center;padding: 6px 8px;
}
.ls-pa-file-power-tip.ls-show { display: flex; }

/* ========== 网盘弹窗表单 ========== */
.ls-netdisk-form { padding: 4px 0; }
.ls-netdisk-field { margin-bottom: 14px; }
.ls-netdisk-field:last-child { margin-bottom: 0; }
.ls-netdisk-field label { display: block; font-size: 13px; color: var(--ls-text-3, #666); margin-bottom: 6px; }
.ls-netdisk-field select,
.ls-netdisk-field input {
    width: 100%; height: 38px; padding: 0 12px;
    border: 1px solid var(--ls-border, #e5e7eb); border-radius: 8px;
    font-size: 14px; color: var(--ls-text, #333); background: var(--ls-bg, #f9fafb);
    outline: none; transition: border-color 0.15s; box-sizing: border-box;
}
.ls-netdisk-field select:focus,
.ls-netdisk-field input:focus { border-color: var(--ls-primary, #1a73e8); }
.ls-netdisk-field input::placeholder { color: var(--ls-text-4, #aaa); }

/* ========== 位置/标签/@用户 ========== */
.ls-pa-location-tag {
    display: none; align-items: center; gap: 5px; padding: 5px 0; font-size: 13px; color: var(--ls-primary);padding: 6px 8px;
}
.ls-pa-location-tag.ls-show { display: flex; }
.ls-pa-location-tag .ls-location-remove { cursor: pointer; color: var(--ls-text-4); font-size: 14px; }
.ls-pa-location-tag .ls-location-remove:hover { color: var(--ls-danger); }
.ls-pa-tag-tags { display: flex; flex-wrap: wrap; gap: 5px; padding: 6px 8px; }
.ls-pa-at-box { }

/* ========== 底部工具栏 ========== */
.ls-pa-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 10px 0 8px;
}
.ls-pa-toolbar .ls-action-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    color: var(--ls-text-3);
    font-size: 18px;
    transition: all 0.15s;
    position: relative;
}
.ls-pa-toolbar .ls-action-btn:hover { background: var(--ls-bg); color: var(--ls-primary); }
.ls-pa-toolbar .ls-action-btn.ls-active { color: var(--ls-primary); background: var(--ls-primary-light, rgba(var(--ls-primary-rgb), 0.08)); }
/* 工具按钮 tooltip */
.ls-pa-toolbar .ls-action-btn::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    background: var(--ls-text);
    color: var(--ls-card-bg);
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}
.ls-pa-toolbar .ls-action-btn:hover::after { opacity: 1; }

/* ========== 评论开关 ========== */
.ls-pa-comment-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid var(--ls-border);
    cursor: pointer;
    font-size: 13px;
    color: var(--ls-text-2);
    transition: all 0.15s;
    margin-left: auto;
    user-select: none;
}
.ls-pa-comment-toggle:hover { border-color: var(--ls-primary); color: var(--ls-primary); }
.ls-pa-comment-toggle.ls-closed { border-color: var(--ls-danger); color: var(--ls-danger); background: var(--ls-danger-light, #fff5f5); }
.ls-pa-comment-toggle i { font-size: 15px; }

/* ========== 权限设置区域 ========== */
.ls-pa-power-section {
    border-top: 1px solid var(--ls-border);
    margin: 0;
    padding: 16px 10px;
}
.ls-pa-power-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.ls-pa-power-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ls-text);
}
.ls-pa-power-title i {
    font-size: 16px;
    color: var(--ls-text-3);
}
.ls-pa-power-types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ls-pa-power-type {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--ls-border);
    cursor: pointer;
    font-size: 13px;
    color: var(--ls-text-2);
    background: var(--ls-card-bg);
    transition: all 0.15s;
    user-select: none;
}
.ls-pa-power-type i {
    font-size: 16px;
}
.ls-pa-power-type:hover { border-color: var(--ls-primary); color: var(--ls-primary); }
.ls-pa-power-type.ls-active {
    border-color: var(--ls-primary);
    background: var(--ls-primary-light, rgba(var(--ls-primary-rgb), 0.06));
    color: var(--ls-primary);
}
.ls-pa-power-tips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
}
.ls-pa-tip-header {
    width: 100%;
    font-size: 12px;
    color: var(--ls-text-3);
    display: flex;
    align-items: center;
    gap: 4px;
    padding-bottom: 4px;
}
.ls-pa-tip-header .remix-icon { font-size: 14px; }
.ls-pa-tip-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1;
    background: var(--ls-bg-2);
    color: var(--ls-text-2);
    cursor: default;
    position: relative;
}
.ls-pa-tip-item i { font-size: 14px; flex-shrink: 0; }
.ls-pa-tip-label { font-weight: 500; }
.ls-pa-tip-detail { display: none; }
/* 各类型配色 */
.ls-pa-tip-pay     { background: #fff3e0; color: #e65100; }
.ls-pa-tip-vip     { background: #fff8e1; color: #f57f17; }
.ls-pa-tip-verify  { background: #e3f2fd; color: #1565c0; }
.ls-pa-tip-exp     { background: #e8f5e9; color: #2e7d32; }
.ls-pa-tip-login   { background: #f3e5f5; color: #7b1fa2; }
.ls-pa-tip-comment { background: #e0f7fa; color: #00838f; }
.ls-pa-tip-fans    { background: #fce4ec; color: #c62828; }
.ls-pa-tip-password{ background: #efebe9; color: #4e342e; }
.ls-pa-tip-ad      { background: #e8eaf6; color: #283593; }
/* 序号标签 */
.ls-pa-tip-num {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ls-bg, #e8e8e8);
    color: var(--ls-text-3);
    font-size: 10px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
/* hover 显示详细说明 */
.ls-pa-tip-item:hover .ls-pa-tip-detail {
    display: block;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    background: var(--ls-text-1, #333);
    color: #fff;
    z-index: 10;
    pointer-events: none;
}
.ls-pa-tip-item:hover .ls-pa-tip-detail::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--ls-text-1, #333);
}

/* ========== 付费/密码详情 ========== */
.ls-pa-power-detail { display: none; margin-top: 12px; }
.ls-pa-power-detail.ls-show { display: block; }
.ls-pa-pay-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}
.ls-pa-pay-row:first-child { margin-top: 0; }
.ls-pa-pay-label { font-size: 13px; color: var(--ls-text-3); white-space: nowrap; min-width: 60px; }
.ls-pa-pay-select,
.ls-pa-pay-input,
.ls-pa-password-input {
    padding: 7px 12px;
    border: 1px solid var(--ls-border);
    border-radius: 8px;
    font-size: 13px;
    background: var(--ls-card-bg);
    color: var(--ls-text);
    outline: none;
    transition: border-color 0.15s;
}
.ls-pa-pay-select { min-width: 120px; cursor: pointer; }
.ls-pa-pay-input { width: 100px; text-align: center; }
.ls-pa-password-input { width: 180px; }
.ls-pa-pay-select:focus,
.ls-pa-pay-input:focus,
.ls-pa-password-input:focus { border-color: var(--ls-primary); }
.ls-pa-pay-range { font-size: 12px; color: var(--ls-text-4); }

/* ========== 隐藏内容编辑器 ========== */
.ls-pa-hidden-content { display: none; margin-top: 10px; }
.ls-pa-hidden-content.ls-show { display: block; }
.ls-pa-hidden-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--ls-text-4);
    margin-bottom: 6px;
}
.ls-pa-hidden-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px;
    padding: 5px 10px;
    border: 1px solid var(--ls-border);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    background: var(--ls-bg);
}
.ls-pa-hidden-editor {
    border: 1px solid var(--ls-border);
    border-radius: 0 0 6px 6px;
    padding: 12px 14px;
    min-height: 140px;
    overflow: hidden;
}
.ls-pa-hidden-editor .ProseMirror {
    outline: none;
    min-height: 100px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ls-text);
}
.ls-pa-hidden-editor .ProseMirror img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 4px 2px;
    cursor: pointer;
    display: inline-block;
    vertical-align: bottom;
}
.ls-pa-hidden-editor .ProseMirror img.ProseMirror-selectednode {
    outline: 2px solid var(--ls-primary);
    outline-offset: 2px;
}
.ls-pa-hidden-editor .ProseMirror video {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 4px 2px;
    cursor: pointer;
    display: inline-block;
    vertical-align: bottom;
}
.ls-pa-hidden-editor .ProseMirror video.ProseMirror-selectednode {
    outline: 2px solid var(--ls-primary);
    outline-offset: 2px;
}
.ls-pa-hidden-editor .ProseMirror pre {
    background: #f5f6f7;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 12px 16px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    overflow-x: auto;
    margin: 10px 0;
    color: #333;
}
.ls-pa-hidden-editor .ProseMirror pre code {
    color: inherit;
    background: none;
    font-size: inherit;
    padding: 0;
}
.ls-pa-hidden-editor .ProseMirror p.is-editor-empty:first-child::before {
    content: attr(data-placeholder);
    float: left;
    color: var(--ls-text-4);
    pointer-events: none;
    height: 0;
}
.ls-pa-hidden-bottom {
    display: flex;
    justify-content: flex-end;
    padding: 3px 0;
}
.ls-pa-hidden-count { font-size: 12px; color: var(--ls-text-4); }
.ls-pa-hidden-count em { font-style: normal; }
.ls-pa-hidden-content.ls-over .ls-pa-hidden-count { color: var(--ls-danger); }

/* ========== 颜色选择器 ========== */
.ls-pa-color-panel {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 100;
    min-width: 190px;
}
.ls-pa-color-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 3px;
}
.ls-pa-color-dot {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    cursor: pointer;
    transition: transform 0.1s;
    border: 1px solid rgba(0,0,0,0.06);
}
.ls-pa-color-dot:hover { transform: scale(1.15); }
.ls-pa-color-actions {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--ls-border);
    text-align: center;
}
.ls-pa-color-clear {
    font-size: 12px;
    color: var(--ls-text-4);
    cursor: pointer;
}
.ls-pa-color-clear:hover { color: var(--ls-danger); }

/* ========== 颜色指示器（已改为图标变色，隐藏） ========== */
.ls-pa-color-indicator {
    display: none;
}

/* ========== 下拉面板（字体/字号/行距） ========== */
.ls-pa-dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 100;
    min-width: 120px;
    max-height: 280px;
    overflow-y: auto;
}
.ls-pa-dropdown-item {
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    color: var(--ls-text-2);
    white-space: nowrap;
    transition: background 0.15s;
}
.ls-pa-dropdown-item:hover { background: var(--ls-bg-2); color: var(--ls-text); }
.ls-pa-dropdown-item.ls-active { color: var(--ls-primary); font-weight: 500; }

/* ========== 表格 ========== */
.ls-pa-editor .ProseMirror table {
    border-collapse: collapse;
    width: auto;
    min-width: 100%;
    margin: 12px 0;
    overflow: hidden;
}
.ls-pa-editor .ProseMirror th,
.ls-pa-editor .ProseMirror td {
    border: 1px solid var(--ls-border);
    padding: 6px 10px;
    min-width: 60px;
    vertical-align: top;
    position: relative;
}
.ls-pa-editor .ProseMirror th {
    background: var(--ls-bg-2);
    font-weight: 600;
}
.ls-pa-editor .ProseMirror .selectedCell::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(var(--ls-primary-rgb), 0.08);
    pointer-events: none;
}

/* ========== 表格选择器 ========== */
.ls-pa-table-picker {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 100;
}
.ls-pa-table-grid {
    display: grid;
    grid-template-columns: repeat(8, 20px);
    grid-template-rows: repeat(6, 20px);
    gap: 3px;
}
.ls-pa-table-cell {
    width: 20px;
    height: 20px;
    border: 1px solid var(--ls-border);
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.1s, border-color 0.1s;
}
.ls-pa-table-cell.ls-highlight {
    background: rgba(var(--ls-primary-rgb), 0.15);
    border-color: var(--ls-primary);
}
.ls-pa-table-label {
    text-align: center;
    font-size: 12px;
    color: var(--ls-text-4);
    margin-top: 6px;
}

/* ========== 表格浮动工具栏 ========== */
.ls-pa-table-toolbar {
    display: none;
    position: absolute;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    background: var(--ls-card-bg);
    border: 1px solid var(--ls-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 100;
    white-space: nowrap;
}
.ls-pa-table-tb-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 5px;
    cursor: pointer;
    color: var(--ls-text-3);
    font-size: 15px;
    transition: all 0.15s;
    flex-shrink: 0;
}
.ls-pa-table-tb-btn:hover {
    background: var(--ls-bg-2);
    color: var(--ls-text);
}
.ls-pa-table-tb-btn.ls-danger:hover {
    background: rgba(220,53,69,0.08);
    color: #dc3545;
}
.ls-pa-table-tb-sep {
    width: 1px;
    height: 16px;
    background: var(--ls-border);
    margin: 0 3px;
    flex-shrink: 0;
}
/* 列宽拖拽手柄 */
.ls-pa-editor .ProseMirror .column-resize-handle {
    position: absolute;
    right: -2px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--ls-primary);
    pointer-events: none;
    cursor: col-resize;
}
.ls-pa-editor .ProseMirror.resize-cursor {
    cursor: col-resize;
}

/* ========== 全屏模式 ========== */
.ls-pa-card.ls-pa-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    border-radius: 0;
    border: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ls-pa-card.ls-pa-fullscreen .ls-pa-title { padding: 14px 24px 0; flex-shrink: 0; }
.ls-pa-card.ls-pa-fullscreen .ls-pa-toolbar-main {
    position: static;
    flex-shrink: 0;
}
.ls-pa-card.ls-pa-fullscreen .ls-pa-editor {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* ========== 隐藏内容全屏 ========== */
.ls-pa-hidden-content.ls-pa-hidden-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    background: var(--ls-card-bg);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    border-radius: 0;
}
.ls-pa-hidden-content.ls-pa-hidden-fullscreen .ls-pa-hidden-label {
    padding: 12px 24px 0;
    flex-shrink: 0;
}
.ls-pa-hidden-content.ls-pa-hidden-fullscreen .ls-pa-hidden-toolbar {
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 5px 24px;
    flex-shrink: 0;
}
.ls-pa-hidden-content.ls-pa-hidden-fullscreen .ls-pa-hidden-editor {
    flex: 1;
    border: none;
    border-top: 1px solid var(--ls-border);
    border-radius: 0;
    padding: 20px 24px;
    overflow-y: auto;
    min-height: 0;
}
.ls-pa-hidden-content.ls-pa-hidden-fullscreen .ls-pa-hidden-bottom {
    padding: 6px 24px;
    border-top: 1px solid var(--ls-border);
    flex-shrink: 0;
}

/* ========== 标签样式 ========== */
.ls-tag-tag {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--ls-primary);
    background: rgba(var(--ls-primary-rgb), 0.06);
    cursor: default;
}
.ls-tag-tag .ls-tag-tag-remove {
    cursor: pointer;
    font-size: 12px;
    color: var(--ls-text-4);
    margin-left: 1px;
}
.ls-tag-tag .ls-tag-tag-remove:hover { color: var(--ls-danger); }

/* ========== 空状态 ========== */
.ls-pa-page .ls-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--ls-text-3);
}
.ls-pa-page .ls-empty i { font-size: 48px; margin-bottom: 10px; }
.ls-pa-page .ls-empty p { font-size: 14px; }

