/* Chat Composer — AI 对话成文 v1.8.0（对应 chat-composer.php / chat.js 1.8.0）
 * 结构：单行启动条（postbox 内）+ 浮动对话窗（JS 挂到 body，盖在编辑区上层）
 *       + 宣传页面预览浮层（生成中/引导/错误状态层盖在 iframe 上，不进聊天窗）
 * 对话窗：关闭钮在头部左上角，「总结」在头部右上角；照片加号/麦克风内嵌输入框右侧，
 *         麦克风录音中红色脉冲（JS 加 is-recording）+ 屏幕中央录音声波浮层（cc-rec-ind） */

/* ---------- 启动条 ---------- */

#cc-panel {
    background: #fff;
}

#cc-panel .cc-launcher {
    display: flex;
    align-items: center;
    gap: 8px;
}

#cc-launcher-input {
    flex: 1;
    min-width: 0;
    height: 34px;
    padding: 0 10px;
    font-size: 14px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    box-shadow: none;
    background: #f6f7f7;
}

#cc-launcher-input:focus {
    border-color: #07c160;
    box-shadow: 0 0 0 1px #07c160;
    background: #fff;
    outline: none;
}

/* 通用按钮（启动条与对话窗共用） */
.cc-btn {
    height: 34px;
    padding: 0 14px;
    font-size: 13px;
    line-height: 32px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
    flex: 0 0 auto;
}

.cc-btn:hover {
    border-color: #07c160;
    color: #07c160;
}

.cc-btn-primary {
    background: #07c160;
    border-color: #07c160;
    color: #fff;
}

.cc-btn-primary:hover {
    background: #06ad56;
    border-color: #06ad56;
    color: #fff;
}

.cc-btn:disabled,
.cc-btn:disabled:hover {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ---------- 浮动对话窗 ---------- */

#cc-overlay {
    position: fixed;
    top: 46px; /* 让出 WP 管理栏 */
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100050; /* 高于 admin bar (99999) */
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

#cc-overlay[hidden] {
    display: none;
}

.cc-dialog {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 680px;
    height: 100%;
    max-height: 640px;
    background: #ededed;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

/* 头部（微信聊天窗样式） */
.cc-dialog .cc-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 44px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.cc-dialog .cc-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.cc-dialog .cc-close {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 22px;
    line-height: 34px;
    cursor: pointer;
    border-radius: 6px;
}

.cc-dialog .cc-close:hover {
    background: #e5e5e5;
    color: #1f2937;
}

/* 头部右上角「总结」按钮（小一号，与左侧关闭钮对称，不挤占标题居中） */
.cc-dialog .cc-head-compose {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    height: 28px;
    line-height: 26px;
    padding: 0 10px;
    font-size: 12px;
}

/* 聊天流 */
#cc-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    background: #ededed;
    padding: 14px 0;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

/* 消息行 */
#cc-messages .cc-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 12px 14px;
}

#cc-messages .cc-row.cc-user {
    flex-direction: row-reverse;
}

/* 头像：图片铺满；无图时回退为色块文字（JS 控制） */
#cc-messages .cc-avatar {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    user-select: none;
    overflow: hidden;
}

#cc-messages .cc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#cc-messages .cc-row.cc-ai .cc-avatar {
    background: #07c160;
}

#cc-messages .cc-row.cc-user .cc-avatar {
    background: #5b7fff;
}

/* 头像 + 名字纵排列（AI 行名字在头像下方） */
#cc-messages .cc-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
}

#cc-messages .cc-msg {
    max-width: 72%;
    min-width: 0;
}

#cc-messages .cc-name {
    font-size: 10px;
    line-height: 1.2;
    color: #9ca3af;
    max-width: 48px;
    text-align: center;
    word-break: break-all;
    user-select: none;
}

/* 气泡 */
#cc-messages .cc-bubble {
    max-width: 100%; /* 宽度由外层 .cc-msg 控制 */
    padding: 9px 12px;
    font-size: 14px;
    line-height: 1.7;
    color: #1f2937;
    white-space: pre-wrap;
    word-break: break-word;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

#cc-messages .cc-row.cc-ai .cc-bubble {
    background: #fff;
    border-radius: 2px 8px 8px 8px;
}

#cc-messages .cc-row.cc-user .cc-bubble {
    background: #95ec69;
    border-radius: 8px 2px 8px 8px;
}

#cc-messages .cc-bubble.cc-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* 已读/未读回执（用户消息气泡下方小字） */
#cc-messages .cc-receipt {
    font-size: 11px;
    line-height: 1.4;
    color: #b0b0b0;
    text-align: right;
    margin: 2px 2px 0;
    user-select: none;
}

#cc-messages .cc-receipt.is-read {
    color: #07c160;
}

/* “对方正在输入”三点跳动 */
#cc-messages .cc-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 20px;
}

#cc-messages .cc-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #b9b9b9;
    animation: cc-bounce 1.2s infinite ease-in-out;
}

#cc-messages .cc-typing span:nth-child(2) {
    animation-delay: 0.15s;
}

#cc-messages .cc-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes cc-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* 输入框包裹层：textarea + 右侧内嵌工具按钮（照片加号、麦克风） */
.cc-dialog .cc-inputwrap {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
}

.cc-dialog .cc-input-tools {
    position: absolute;
    right: 5px;
    bottom: 3px;
    display: flex;
    align-items: center;
}

.cc-dialog .cc-tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
}

.cc-dialog .cc-tool-btn:hover {
    color: #07c160;
    background: #f0fdf4;
}

.cc-dialog .cc-tool-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* 录音中：麦克风红色脉冲 */
.cc-dialog .cc-tool-btn.is-recording {
    color: #ef4444;
    background: #fef2f2;
    animation: cc-rec-pulse 1.2s ease-in-out infinite;
}

@keyframes cc-rec-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

/* 录音指示浮层（JS 懒创建挂 body）：录音时屏幕中央显示，微信风格黑块 + 声波条。
 * 声波条高度 = scaleY(0.15 + --cc-vol × 系数)，--cc-vol 由 JS 按 RMS 实时写入；
 * 纯指示不挡手势，桌面手机统一显示 */
.cc-rec-ind {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 100070; /* 高于预览浮层（100060） */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 140px;
    padding: 22px 0 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    pointer-events: none;
}

.cc-rec-ind[hidden] {
    display: none;
}

.cc-rec-waves {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 46px;
}

.cc-rec-waves span {
    width: 5px;
    height: 44px;
    border-radius: 3px;
    background: #07c160;
    transform: scaleY(calc(0.15 + var(--cc-vol, 0) * var(--cc-w, 1)));
    transform-origin: center;
    transition: transform 100ms ease-out;
}

/* 中间高两边低：音量相同也呈山峰形 */
.cc-rec-waves span:nth-child(1) { --cc-w: 0.55; }
.cc-rec-waves span:nth-child(2) { --cc-w: 0.82; }
.cc-rec-waves span:nth-child(3) { --cc-w: 1; }
.cc-rec-waves span:nth-child(4) { --cc-w: 0.82; }
.cc-rec-waves span:nth-child(5) { --cc-w: 0.55; }

.cc-rec-text {
    font-size: 13px;
    opacity: 0.85;
}

/* 照片消息：多图网格；纯图片时气泡透明无边距（微信样式） */
#cc-messages .cc-bubble .cc-imgs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    margin-top: 6px;
}

#cc-messages .cc-bubble .cc-imgs a {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.06);
}

#cc-messages .cc-bubble .cc-imgs img {
    display: block;
    width: 100%;
    height: 110px;
    object-fit: cover;
}

#cc-messages .cc-bubble.cc-img-only {
    padding: 0;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
    border-radius: 8px;
}

#cc-messages .cc-bubble.cc-img-only .cc-imgs {
    margin-top: 0;
    grid-template-columns: 1fr;
}

#cc-messages .cc-bubble.cc-img-only .cc-imgs img {
    height: auto;
    max-height: 220px;
    min-height: 0;
    border-radius: 8px;
}

/* 输入条 */
.cc-dialog .cc-inputbar {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #e0e0e0;
    background: #f7f7f7;
}

/* 手机端微信式输入条控件（语音/键盘切换、按住说话、右侧加号）：
 * 电脑端一律隐藏（电脑端加号在输入框外左侧） */
.cc-dialog .cc-mode-btn,
.cc-dialog .cc-hold,
.cc-dialog .cc-plus-btn {
    display: none;
}

/* 电脑端加号：输入框外左侧图标按钮（手机端走右侧 #cc-plus） */
.cc-dialog .cc-photo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #6b6f76;
    cursor: pointer;
}

.cc-dialog .cc-photo-btn:hover {
    background: #ececec;
    color: #191919;
}

.cc-dialog #cc-input {
    flex: 1;
    resize: none;
    /* 40 = 一行文字(21) + 上下内边距(14) + 边框(2) + 余量；
     * 低于此值单行即溢出，右缘（麦克风旁）会冒出垂直滚动条 */
    min-height: 40px;
    max-height: 110px;
    padding: 7px 44px 7px 10px; /* 右侧留出内嵌麦克风按钮空间 */
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    box-shadow: none;
    background: #fff;
}

.cc-dialog #cc-input:focus {
    border-color: #07c160;
    box-shadow: 0 0 0 1px #07c160;
    outline: none;
}

/* 移动端（编辑页窄屏）：对话窗只占下半屏（贴底弹出，上方露出编辑页遮罩区）。
 * 不能用 vh 定高：手机浏览器 vh 按地址栏收起时的大视口计算，
 * 键盘弹起/地址栏展开后实际视口变小，窗口会超出屏幕。
 * overlay 本身 fixed 铺满视口，dialog 用百分比高度跟随实际可视区。 */
@media (max-width: 600px) {
    #cc-overlay {
        top: 0;
        padding: 0;
        align-items: flex-end; /* 对话窗贴底，只占下半屏 */
    }

    .cc-dialog {
        max-width: none;
        height: 58%;
        max-height: none;
        border-radius: 14px 14px 0 0;
        transition: height 0.2s ease;
    }

    #cc-messages .cc-msg {
        max-width: 84%;
    }

    /* ---------- 手机端整体放大一号：文字、头像、输入栏、按钮 ---------- */

    /* 标题栏（手机空间宝贵，收窄腾出聊天区） */
    .cc-dialog .cc-head {
        height: 42px;
    }

    .cc-dialog .cc-title {
        font-size: 17px;
    }

    .cc-dialog .cc-close {
        width: 34px;
        height: 34px;
        font-size: 22px;
        line-height: 34px;
    }

    /* 「总结」按钮：比下方 .cc-btn 通用规则更高特异性，
     * 防止 height:44px/font-size:15px 覆盖；矮身+大字更醒目 */
    .cc-dialog .cc-head .cc-head-compose {
        height: 28px;
        line-height: 26px;
        padding: 0 14px;
        font-size: 16px;
    }

    /* 消息区 */
    #cc-messages {
        padding: 16px 0;
    }

    #cc-messages .cc-row {
        gap: 10px;
        margin: 14px 12px;
    }

    #cc-messages .cc-avatar {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        border-radius: 5px;
        font-size: 15px;
    }

    #cc-messages .cc-name {
        font-size: 11px;
        max-width: 56px;
    }

    #cc-messages .cc-bubble {
        padding: 10px 13px;
        font-size: 16px;
    }

    /* 已读/未读回执 */
    #cc-messages .cc-receipt {
        font-size: 12px;
    }

    /* ---------- 手机端微信式输入条 ----------
     * 左：语音/键盘切换；中：输入框（语音模式下变「按住 说话」）；
     * 右：加号发照片；内嵌工具与发送按钮隐藏（键盘回车发送） */
    .cc-dialog .cc-inputbar {
        gap: 6px;
        padding: 8px 10px 12px;
    }

    .cc-dialog #cc-input {
        min-height: 44px;
        padding: 9px 12px;
        font-size: 16px;
    }

    /* 隐藏电脑端控件：左侧加号、输入框内嵌工具、发送按钮 */
    .cc-dialog .cc-photo-btn,
    .cc-dialog .cc-input-tools,
    .cc-dialog #cc-send {
        display: none;
    }

    /* 左侧语音/键盘切换 */
    .cc-dialog .cc-mode-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: 36px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 6px;
        background: transparent;
        color: #7a7e87;
        cursor: pointer;
    }

    .cc-dialog .cc-mode-btn:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

    /* 图标切换：打字模式显麦克风，语音模式显键盘 */
    .cc-dialog .cc-mode-btn .cc-ic-kb {
        display: none;
    }

    .cc-dialog .cc-mode-btn.is-voice .cc-ic-mic {
        display: none;
    }

    .cc-dialog .cc-mode-btn.is-voice .cc-ic-kb {
        display: block;
    }

    /* 语音模式：输入框让位给「按住 说话」 */
    .cc-dialog .cc-hold {
        display: none;
        flex: 1;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0;
        border: 1px solid #d9dce1;
        border-radius: 6px;
        background: #eef0f3;
        color: #191919;
        font-size: 16px;
        line-height: 42px;
        cursor: pointer;
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none; /* 防长按弹出系统菜单 */
    }

    .cc-dialog .cc-hold.is-recording {
        background: #dfe2e7;
    }

    .cc-dialog .cc-inputbar.cc-voice .cc-hold {
        display: flex;
    }

    .cc-dialog .cc-inputbar.cc-voice #cc-input {
        display: none;
    }

    /* 右侧加号：发照片（替代发送按钮） */
    .cc-dialog .cc-plus-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: 36px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 6px;
        background: transparent;
        color: #7a7e87;
        cursor: pointer;
    }

    .cc-dialog .cc-plus-btn:disabled {
        opacity: 0.45;
        cursor: not-allowed;
    }

    /* 照片消息放大一号 */
    #cc-messages .cc-bubble .cc-imgs img {
        height: 130px;
    }

    /* 宣传页面预览：手机上铺满全屏 */
    .cc-preview {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }

    .cc-dialog .cc-btn {
        height: 44px;
        padding: 0 16px;
        font-size: 15px;
        line-height: 42px;
    }

    /* 软键盘弹出（JS 监听 visualViewport 加 cc-kb，并把浮层精确限高到
     * 键盘上方可视区）：对话窗占满可视区，聊天区自动收缩，
     * 输入条始终贴在键盘上沿，键盘收起自动恢复下半屏 */
    #cc-overlay.cc-kb {
        align-items: stretch;
    }

    #cc-overlay.cc-kb .cc-dialog {
        height: 100%;
    }
}

/* ---------- 右下角客服浮标 + 提示泡泡 ---------- */

#cc-fab {
    position: fixed;
    right: 18px;
    bottom: 26px;
    z-index: 99900; /* 高于页面内容，低于对话窗浮层（100050） */
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid #fff;
    padding: 0;
    background: #07c160;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    transition: transform 0.15s ease;
}

/* 呼吸光圈，持续吸引注意 */
#cc-fab::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 3px solid rgba(7, 193, 96, 0.6);
    animation: cc-fab-pulse 2.2s ease-out infinite;
    pointer-events: none;
}

#cc-fab:hover {
    transform: scale(1.06);
}

#cc-fab img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    pointer-events: none;
}

#cc-fab-bubble {
    position: absolute;
    right: 4px;
    bottom: 68px;
    width: 224px;
    padding: 11px 30px 11px 13px;
    background: linear-gradient(135deg, #10d570, #06a352);
    border-radius: 14px;
    box-shadow: 0 6px 22px rgba(7, 193, 96, 0.5);
    font-size: 14px;
    line-height: 1.65;
    color: #fff;
    text-align: left;
    cursor: pointer;
    animation: cc-fab-in 0.35s ease 0.6s both, cc-fab-wiggle 3s ease 2.4s infinite;
    transform-origin: 100% 100%; /* 从指向 FAB 的箭头处摆动 */
}

#cc-fab-bubble strong {
    font-size: 15px;
}

#cc-fab-bubble b {
    color: #ffe66d; /* 黄色高亮关键字 */
    font-style: normal;
}

#cc-fab-bubble::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 18px;
    width: 12px;
    height: 12px;
    background: #06a352; /* 贴近渐变末端 */
    border-radius: 2px;
    transform: rotate(45deg);
}

#cc-fab-bubble-close {
    position: absolute;
    top: 2px;
    right: 6px;
    padding: 2px 4px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

#cc-fab-bubble-close:hover {
    color: #fff;
}

@keyframes cc-fab-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes cc-fab-pulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* 周期性小幅摆动，勾住视线 */
@keyframes cc-fab-wiggle {
    0%, 8%, 100% { transform: rotate(0); }
    3% { transform: rotate(-2.5deg); }
    5.5% { transform: rotate(2.5deg); }
}

/* ---------- 宣传页面预览浮层 ---------- */

#cc-preview-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100060; /* 高于对话窗浮层（100050） */
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#cc-preview-overlay[hidden] {
    display: none;
}

.cc-preview {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 480px; /* 与生成页面的手机版式一致 */
    height: 100%;
    max-height: 860px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 56px rgba(0, 0, 0, 0.35);
}

.cc-preview-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 46px;
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.cc-preview-close {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 22px;
    line-height: 34px;
    cursor: pointer;
    border-radius: 6px;
}

.cc-preview-close:hover {
    background: #e5e5e5;
    color: #1f2937;
}

/* JS 用 hidden 属性切换状态，显式防自定义 display 覆盖 */
#cc-preview-overlay [hidden] {
    display: none !important;
}

/* 预览主体：iframe + 状态层（生成中/引导/错误提示） */
.cc-preview-body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
}

#cc-preview-frame {
    flex: 1 1 auto;
    width: 100%;
    border: 0;
    background: #fff;
}

.cc-preview-status {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    background: #fff;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.7;
    text-align: center;
}

.cc-preview-spinner {
    display: block;
    width: 26px;
    height: 26px;
    border: 3px solid #e5e7eb;
    border-top-color: #07c160;
    border-radius: 50%;
    animation: cc-spin 0.8s linear infinite;
}

@keyframes cc-spin {
    to { transform: rotate(360deg); }
}

.cc-preview-foot {
    flex: 0 0 auto;
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #e0e0e0;
    background: #f7f7f7;
}

.cc-preview-foot .cc-btn {
    flex: 1;
    height: 40px;
    line-height: 38px;
}
