#chat-page.chat-page--love-mi-support .chat-heartbeat-monitor,
#chat-page.chat-page--love-mi-support .chat-header-buttons {
    display: none !important;
}

#chat-page.chat-page--love-mi-support .chat-header-title-cluster {
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
}

#chat-page.chat-page--love-mi-support #chat-contact-name::after {
    content: "客服";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(212, 160, 160, .22);
    color: #7a4f55;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

#chat-page.chat-page--love-mi-support .chat-message.other-message .chat-message-avatar {
    background-color: rgba(255, 255, 255, .92);
    background-image: url("assets/e__op_______love_____love_2.5_love-mi-logo.png") !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    border: 1px solid rgba(212, 160, 160, .24);
}

#chat-page.chat-page--love-mi-support .chat-message.other-message .chat-message-avatar.transparent-avatar {
    color: transparent;
}

/* 长文阅读排版：老虎咪回复不限字数，整条单气泡展示，
   需要比普通聊天更松的行距/字距和更宽的气泡宽度 */
#chat-page.chat-page--love-mi-support .chat-message.other-message .chat-message-bubble {
    display: block;
    max-width: min(84vw, 400px, 100%);
    padding: 12px 14px;
    line-height: 1.72;
    letter-spacing: 0.015em;
}

#chat-page.chat-page--love-mi-support #chat-more-panel .chat-more-item.love-mi-support-more-hidden {
    display: none !important;
}

#chat-page.chat-page--love-mi-support #chat-more-panel .chat-more-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 240px;
    margin: 0 auto;
}

#chat-page.chat-page--love-mi-support #chat-more-panel .chat-more-item.love-mi-support-more-allowed .chat-more-icon {
    background:
        radial-gradient(circle at 24% 18%, rgba(255,255,255,.85), transparent 28%),
        linear-gradient(145deg, rgba(212,160,160,.24), rgba(123,184,212,.18));
    border: 1px solid rgba(95, 68, 72, .18);
}

#chat-page.chat-page--love-mi-support #chat-more-panel .chat-more-item.love-mi-support-more-allowed .chat-more-label {
    color: #5f4448;
    font-weight: 700;
}

#chat-page.chat-page--love-mi-support .chat-function-btn.receive-btn {
    overflow: visible;
    isolation: isolate;
}

#chat-page.chat-page--love-mi-support .chat-function-btn.receive-btn.love-mi-support-receiving {
    background: rgba(255, 255, 255, .92);
    color: #2f8b76;
    box-shadow:
        0 0 0 1px rgba(226, 244, 238, .95),
        0 4px 16px rgba(47, 139, 118, .18);
}

#chat-page.chat-page--love-mi-support .chat-function-btn.receive-btn.love-mi-support-receiving::after {
    content: "";
    position: absolute;
    inset: -7px;
    z-index: -1;
    border-radius: 999px;
    background:
        conic-gradient(
            from 0deg,
            rgba(47, 139, 118, 0),
            rgba(47, 139, 118, .18),
            rgba(212, 160, 160, .72),
            rgba(123, 184, 212, .42),
            rgba(47, 139, 118, 0)
        );
    animation: loveMiSupportReceiveRing 1s linear infinite;
    filter: drop-shadow(0 0 8px rgba(212, 160, 160, .25));
}

#chat-page.chat-page--love-mi-support .chat-function-btn.receive-btn.love-mi-support-receiving::before {
    border-color: rgba(47, 139, 118, .16);
    border-top-color: #2f8b76;
}

#chat-page.chat-page--love-mi-support .chat-function-btn.receive-btn.love-mi-support-receiving .chat-function-icon {
    opacity: 0;
}

@keyframes loveMiSupportReceiveRing {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    #chat-page.chat-page--love-mi-support .chat-function-btn.receive-btn.love-mi-support-receiving::after {
        animation-duration: 1.8s;
    }
}

/* ==================== 线上思维链折叠卡（全部线上聊天可用，非仅客服） ==================== */

#chat-page .chat-online-thinking-row {
    display: flex;
    justify-content: flex-start;
    padding: 2px 12px;
    margin: 4px 0;
}

#chat-page .chat-online-thinking-card {
    max-width: 86%;
    border-radius: 12px;
    background: rgba(246, 244, 252, 0.92);
    border: 1px solid rgba(140, 120, 190, 0.22);
    box-shadow: 0 3px 10px rgba(90, 70, 140, 0.08);
    overflow: hidden;
}

#chat-page .chat-online-thinking-summary {
    list-style: none;
    cursor: pointer;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #6a5a9e;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

#chat-page .chat-online-thinking-summary::-webkit-details-marker {
    display: none;
}

#chat-page .chat-online-thinking-summary::after {
    content: "展开";
    float: right;
    font-weight: 400;
    color: rgba(106, 90, 158, 0.65);
}

#chat-page .chat-online-thinking-card[open] .chat-online-thinking-summary::after {
    content: "收起";
}

#chat-page .chat-online-thinking-body {
    padding: 4px 12px 10px;
    font-size: 12px;
    line-height: 1.55;
    color: #55496e;
    white-space: pre-wrap;
    word-break: break-word;
    border-top: 1px dashed rgba(140, 120, 190, 0.22);
    max-height: 320px;
    overflow-y: auto;
}

/* ==================== 客服工具箱弹窗与菜单 ==================== */

.love-mi-support-modal .love-mi-support-modal-content {
    max-width: 360px;
    width: calc(100% - 32px);
    max-height: 78vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.love-mi-support-modal .modal-body {
    overflow-y: auto;
    overflow-x: hidden;
}

.love-mi-support-modal .love-mi-support-modal-footer,
.love-mi-support-modal .modal-footer {
    display: flex;
    align-items: stretch;
    gap: 10px;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 12px 16px 16px;
    border-top: 1px solid #f0f0f0;
    box-sizing: border-box;
}

.love-mi-support-modal .modal-footer .btn-cancel,
.love-mi-support-modal .modal-footer .btn-save {
    flex: 1 1 0;
    width: auto;
    max-width: none;
    height: 42px;
    min-height: 42px;
    margin: 0;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    line-height: 42px;
    cursor: pointer;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.love-mi-support-modal .modal-footer .btn-cancel {
    background: #f3f3f5 !important;
    color: #333 !important;
    border: 1px solid #e6e6ea !important;
}

.love-mi-support-modal .modal-footer .btn-save {
    background: #07C160 !important;
    color: #fff !important;
    border: 1px solid #07C160 !important;
}

.love-mi-support-modal-hint {
    font-size: 12px;
    line-height: 1.6;
    color: #8a7f88;
    margin: 0 0 10px;
}

.love-mi-support-picker {
    position: relative;
}

.love-mi-support-picker-trigger {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    padding: 10px 36px 10px 12px;
    border: 1px solid rgba(95, 68, 72, 0.16);
    border-radius: 10px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238a7f88' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: #5f4448;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.love-mi-support-picker.is-open .love-mi-support-picker-trigger {
    border-color: rgba(47, 139, 118, 0.45);
}

.love-mi-support-picker-panel {
    display: none;
    margin-top: 6px;
    max-height: 180px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(95, 68, 72, 0.14);
    border-radius: 10px;
    background: #fff;
}

.love-mi-support-picker.is-open .love-mi-support-picker-panel {
    display: block;
}

.love-mi-support-picker-option {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid #f3f1f2;
    background: transparent;
    color: #5f4448;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

.love-mi-support-picker-option:last-child {
    border-bottom: none;
}

.love-mi-support-picker-option.is-active {
    background: #e8f5e8;
    color: #1f7a4d;
    font-weight: 600;
}

.love-mi-support-lib-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.love-mi-support-lib-empty {
    font-size: 13px;
    line-height: 1.7;
    color: #9a8f98;
    padding: 18px 8px;
    text-align: center;
}

.love-mi-support-lib-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(95, 68, 72, 0.12);
}

.love-mi-support-lib-item.is-locked {
    background: rgba(244, 240, 244, 0.9);
}

.love-mi-support-lib-item-main {
    min-width: 0;
    flex: 1 1 auto;
}

.love-mi-support-lib-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #5f4448;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.love-mi-support-lib-item-meta {
    display: flex;
    gap: 6px;
    margin-top: 3px;
    flex-wrap: wrap;
}

.love-mi-support-lib-badge {
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(95, 68, 72, 0.08);
    color: #8a7f88;
}

.love-mi-support-lib-badge.is-active {
    background: rgba(47, 139, 118, 0.12);
    color: #2f8b76;
    font-weight: 700;
}

.love-mi-support-lib-item-actions {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
    align-items: center;
}

.love-mi-support-lib-btn {
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(95, 68, 72, 0.18);
    background: rgba(255, 255, 255, 0.92);
    color: #5f4448;
    cursor: pointer;
}

.love-mi-support-lib-btn.is-danger {
    color: #b0524e;
    border-color: rgba(176, 82, 78, 0.28);
}

.love-mi-support-lib-locked-tip {
    font-size: 11px;
    color: #b3a8b0;
}

.love-mi-support-edit-textarea {
    min-height: 180px;
    resize: vertical;
    font-size: 13px;
    line-height: 1.6;
}

.love-mi-support-mcp-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(95, 68, 72, 0.12);
    font-size: 13px;
    color: #5f4448;
    cursor: pointer;
}

.love-mi-support-mcp-row input {
    flex: 0 0 auto;
}
