/* ===== 新功能样式：上传进度提示 / 引用消息 / 我的收藏 / 自定义表情包 ===== */

/* 上传进度常驻提示（顶部居中，模仿聊天顶部 toast，直到完成才消失） */
#uploadProgressTip {
    position: fixed;
    top: 74px;
    left: 50%;
    transform: translateX(-50%) translateY(-16px);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 8px;
    z-index: 3000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}
#uploadProgressTip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* 输入框上方的引用提示条 */
#quoteBar {
    display: none;
    align-items: center;
    gap: 8px;
    margin: 6px 12px 0;
    padding: 6px 10px;
    background: #f2f6f3;
    border-left: 3px solid var(--primary, #07C160);
    border-radius: 6px;
    font-size: 12px;
    color: #666;
}
#quoteBar .quote-bar-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#quoteBar i { cursor: pointer; color: #999; font-size: 16px; }

/* 消息气泡上方的引用块 */
.msg-quote {
    max-width: 260px;
    margin-bottom: 4px;
    padding: 5px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-left: 3px solid var(--primary, #07C160);
    border-radius: 6px;
    font-size: 12px;
    color: #777;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
/* 自己的消息：引用块用白底深字，保证在绿色气泡/灰色背景上都清晰可见 */
.msg-item.self .msg-quote {
    background: rgba(255, 255, 255, 0.95);
    color: #666;
    border-left: 3px solid var(--primary, #07C160);
}
.msg-item.self .msg-quote .msg-quote-name { color: #333; }
.msg-quote .msg-quote-name { font-weight: 600; margin-right: 6px; }

/* 点击引用跳转后原消息闪烁高亮 */
.quote-jump-flash { animation: quoteFlash 1.6s ease; border-radius: 12px; }
@keyframes quoteFlash {
    0%, 60% { background: rgba(7, 193, 96, 0.15); }
    100% { background: transparent; }
}

/* ===== 我的收藏 ===== */
.favorites-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 30px;
}
.fav-item {
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.fav-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.fav-text {
    font-size: 14px;
    color: #333;
    white-space: pre-wrap;
    word-break: break-word;
    background: #f7f7f7;
    border-radius: 8px;
    padding: 8px 10px;
}
.fav-image { text-align: center; }
.fav-image img { max-width: 100%; max-height: 320px; border-radius: 8px; cursor: pointer; }
.fav-del-btn {
    margin-top: 8px;
    border: none;
    background: none;
    color: #ff5c7a;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 0;
}
.fav-del-btn:hover { opacity: 0.75; }

/* ===== 自定义表情包面板（爱心图标，一行 5 个） ===== */
.custom-emoji-panel {
    display: none;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #eee;
    background: #fafafa;
    position: relative;
    max-height: 260px;
    overflow-y: auto;
}
.custom-emoji-cell {
    position: relative;
    aspect-ratio: 1;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.custom-emoji-cell img { width: 100%; height: 100%; object-fit: cover; }
.custom-emoji-cell.add {
    border: 1.5px dashed #ccc;
    color: #bbb;
    font-size: 24px;
}
.custom-emoji-cell.add:hover { border-color: var(--primary, #07C160); color: var(--primary, #07C160); }
.custom-emoji-del {
    position: absolute;
    top: 2px;
    right: 2px;
    color: #e74c3c;
    font-size: 15px;
    background: rgba(255,255,255,0.85);
    border-radius: 50%;
}
.custom-emoji-count {
    position: absolute;
    top: 6px;
    right: 12px;
    font-size: 11px;
    color: #aaa;
}
