/* ============================================================
   投资沧州·云向导 - 智能帮办悬浮聊天窗
   ============================================================ */

/* 悬浮入口按钮 */
.chat-launcher {
    position: fixed;
    right: 26px;
    bottom: 34px;
    z-index: 998;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(110deg, #2e6fe8, #3d85ee);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(47, 111, 232, .4);
    transition: transform .2s, box-shadow .2s;
    user-select: none;
}

.chat-launcher:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(47, 111, 232, .5); }

.chat-launcher i { font-size: 18px; }

/* 聊天面板 */
.chat-panel {
    position: fixed;
    right: 26px;
    bottom: 94px;
    z-index: 999;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 540px;
    max-height: calc(100vh - 130px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(20, 50, 120, .25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #eef2f8;
}

.chat-panel.open { display: flex; animation: chatIn .22s ease; }

@keyframes chatIn {
    from { opacity: 0; transform: translateY(14px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* 头部 */
.chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(110deg, #1c47c4, #2f8fe9);
    color: #fff;
    flex-shrink: 0;
}

.chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.chat-avatar.sm { width: 30px; height: 30px; font-size: 13px; background: #e9f1fe; color: #2f6fe8; }

.chat-header-info { flex: 1; }

.chat-title { font-size: 15px; font-weight: 600; }

.chat-sub { font-size: 11px; color: rgba(255, 255, 255, .85); margin-top: 2px; display: flex; align-items: center; }

.chat-sub .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    margin-right: 5px;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, .25);
}

.chat-close, .chat-action {
    border: 0;
    background: none;
    color: rgba(255, 255, 255, .85);
    font-size: 16px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.chat-action { font-size: 14px; display: flex; align-items: center; justify-content: center; text-decoration: none; }

.chat-close:hover, .chat-action:hover { background: rgba(255, 255, 255, .15); color: #fff; }

/* ============================================================
   智能帮办独立页面（全屏舞台）
   ============================================================ */

/* 面包屑（独立页自带，避免依赖 guide.css） */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 2px 0;
    font-size: 13px;
    color: #98a1b3;
}

.breadcrumb a { color: #67718a; }

.breadcrumb a:hover { color: #2f6fe8; }

.breadcrumb > i { font-size: 11px; color: #c0c6d4; }

.breadcrumb span { color: #333; }

.chat-stage {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 22px;
    margin-top: 18px;
    margin-bottom: 34px;
    align-items: stretch;
}

/* 左侧介绍栏 */
.chat-side {
    background: linear-gradient(170deg, #1c47c4 0%, #2e6fe8 60%, #3d85ee 100%);
    border-radius: 14px;
    color: #fff;
    padding: 26px 22px;
    display: flex;
    flex-direction: column;
}

.chat-side-head { display: flex; align-items: center; gap: 12px; }

.chat-side-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.chat-side-name { font-size: 18px; font-weight: 700; }

.chat-side-role { font-size: 12px; color: rgba(255, 255, 255, .82); margin-top: 3px; }

.chat-side-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: rgba(255, 255, 255, .9);
    background: rgba(255, 255, 255, .12);
    border-radius: 999px;
    padding: 6px 12px;
    margin: 18px 0 6px;
    width: fit-content;
}

.chat-side-status .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, .3);
}

.chat-side-title { font-size: 14px; font-weight: 600; margin: 18px 0 10px; }

.chat-side-list { list-style: none; }

.chat-side-list li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13px;
    color: rgba(255, 255, 255, .92);
    line-height: 1.6;
    padding: 7px 0;
}

.chat-side-list li i { margin-top: 3px; color: rgba(255, 255, 255, .75); font-size: 12px; }

.chat-side-hot { margin-top: 14px; }

.hot-q {
    display: block;
    font-size: 12.5px;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    padding: 7px 13px;
    margin-bottom: 9px;
    cursor: pointer;
    transition: background .2s;
}

.hot-q:hover { background: rgba(255, 255, 255, .25); }

.chat-side-phone {
    margin-top: auto;
    padding-top: 18px;
    font-size: 13px;
    color: rgba(255, 255, 255, .9);
    border-top: 1px solid rgba(255, 255, 255, .18);
}

.chat-side-phone i { margin-right: 6px; }

.chat-side-phone b { font-size: 16px; letter-spacing: .5px; }

/* 右侧全屏面板：覆盖悬浮态定位 */
.chat-panel-full {
    position: static !important;
    display: flex;
    width: auto;
    height: 680px;
    max-height: calc(100vh - 220px);
    box-shadow: 0 8px 28px rgba(30, 80, 180, .1);
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .chat-stage { grid-template-columns: 1fr; }
    .chat-side { display: none; }
    .chat-panel-full { height: 600px; }
}

/* 消息区 */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px 8px;
    background: #f5f8fd;
}

.chat-row { display: flex; gap: 8px; margin-bottom: 14px; align-items: flex-start; }

.chat-row.user { flex-direction: row-reverse; }

.chat-bubble {
    max-width: 78%;
    padding: 10px 13px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-row.bot .chat-bubble {
    background: #fff;
    color: #333;
    border: 1px solid #eef1f7;
    border-top-left-radius: 3px;
    box-shadow: 0 2px 8px rgba(30, 80, 180, .05);
}

.chat-row.user .chat-bubble {
    background: linear-gradient(110deg, #2e6fe8, #3d85ee);
    color: #fff;
    border-top-right-radius: 3px;
}

/* 机器人消息中的链接 */
.chat-row.bot .chat-bubble a {
    color: #2e6fe8;
    text-decoration: underline;
    word-break: break-all;
}

.chat-row.bot .chat-bubble a:hover { color: #1a56c8; }

.chat-row.bot .chat-avatar.sm { margin-top: 2px; }

/* 打字指示 */
.chat-typing { display: inline-flex; gap: 4px; padding: 4px 2px; }

.chat-typing i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #b9c6e0;
    animation: typing 1.2s infinite ease-in-out;
}

.chat-typing i:nth-child(2) { animation-delay: .2s; }
.chat-typing i:nth-child(3) { animation-delay: .4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: .5; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* 快捷短语 */
.chat-quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px 38px; }

.chat-quick a {
    font-size: 12px;
    color: #2f6fe8;
    background: #fff;
    border: 1px solid #cfe0fb;
    border-radius: 999px;
    padding: 5px 12px;
    cursor: pointer;
    transition: background .2s;
}

.chat-quick a:hover { background: #e9f1fe; }

/* 输入区 */
.chat-input {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 10px 12px;
    border-top: 1px solid #eef1f6;
    background: #fff;
    flex-shrink: 0;
}

.chat-input textarea {
    flex: 1;
    border: 1px solid #dfe5ef;
    border-radius: 8px;
    resize: none;
    outline: none;
    padding: 9px 12px;
    font-size: 13.5px;
    font-family: inherit;
    line-height: 1.5;
    max-height: 88px;
    color: #333;
    transition: border-color .2s;
}

.chat-input textarea:focus { border-color: #2f6fe8; }

.chat-input button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(110deg, #2e6fe8, #3d85ee);
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity .2s;
}

.chat-input button:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 560px) {
    .chat-launcher-txt { display: none; }
    .chat-launcher { padding: 0; width: 48px; justify-content: center; }
    .chat-panel { right: 12px; bottom: 76px; }
}
