/* 悦来电官网 - 在线咨询访客端 */
.yldChatBtn {
    position: fixed;
    right: 28px;
    bottom: 130px;
    z-index: 900;
    display: flex;
    align-items: center;
    height: 52px;
    padding: 0 20px 0 16px;
    background: #002870;
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(0, 40, 112, .28);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    font-family: PingFang SC, "Microsoft YaHei", sans-serif;
    user-select: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.yldChatBtn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 40, 112, .36); }
.yldChatBtn svg { width: 22px; height: 22px; margin-right: 8px; fill: #fff; }

.yldChatPanel {
    position: fixed;
    right: 28px;
    bottom: 196px;
    z-index: 901;
    width: 360px;
    height: 600px;
    max-height: calc(100vh - 220px);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: PingFang SC, "Microsoft YaHei", sans-serif;
}
.yldChatPanel.show { display: flex; }

/* 头部 */
.yldChatHead {
    flex: none;
    height: 64px;
    background: #0B2B6B;
    color: #fff;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.yldHeadTitle { font-size: 16px; font-weight: 600; line-height: 22px; }
.yldHeadSub {
    font-size: 12px;
    line-height: 16px;
    margin-top: 4px;
    color: rgba(255, 255, 255, .82);
    display: flex;
    align-items: center;
}
.yldDot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00B42A;
    margin-right: 6px;
    flex: none;
}
.yldDot.off { background: #86909C; }
.yldChatClose {
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: rgba(255, 255, 255, .85);
    padding: 4px;
}
.yldChatClose:hover { color: #fff; }

/* 消息区 */
.yldChatBody {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px 8px;
    background: #fff;
}
.yldChatBody::-webkit-scrollbar { width: 6px; }
.yldChatBody::-webkit-scrollbar-thumb { background: #DCDFE6; border-radius: 3px; }
.yldDayLine { text-align: center; font-size: 12px; color: #A9AEB8; margin-bottom: 14px; }

.yldMsgRow { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.yldMsgRow.self { flex-direction: row-reverse; }
.yldAvatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #E8EEF7;
    color: #002870;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.yldBubble {
    max-width: 76%;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
    background: #F2F3F5;
    color: #1D2129;
}
.yldMsgRow.self .yldBubble { background: #0B2B6B; color: #fff; }
.yldMsgRow.pending .yldBubble { opacity: .65; }

.yldSysLine { text-align: center; color: #86909C; font-size: 12px; margin: 8px 0 12px; }

/* 离线提示 */
.yldChatNotice {
    flex: none;
    display: none;
    padding: 0 16px 14px;
    font-size: 12px;
    line-height: 18px;
    color: #86909C;
    text-align: center;
    background: #fff;
}
.yldChatNotice.show { display: block; }
.yldChatNotice a { color: #002870; font-weight: 600; text-decoration: none; }
.yldChatNotice a:hover { text-decoration: underline; }

/* 留言表单 */
.yldLeaveForm { display: none; flex: none; padding: 12px 16px 16px; border-top: 1px solid #F2F3F5; }
.yldLeaveForm.show { display: block; }
.yldField { position: relative; margin-bottom: 10px; }
.yldField svg {
    position: absolute;
    left: 11px;
    top: 12px;
    width: 16px;
    height: 16px;
    fill: #C9CDD4;
    pointer-events: none;
}
.yldField input {
    display: block;
    width: 100%;
    height: 40px;
    border: 1px solid #E5E6EB;
    border-radius: 4px;
    padding: 0 10px 0 34px;
    font-size: 13px;
    color: #1D2129;
    background: #fff;
    outline: none;
    font-family: inherit;
}
.yldField textarea {
    display: block;
    width: 100%;
    height: 96px;
    border: 1px solid #E5E6EB;
    border-radius: 4px;
    padding: 10px 10px 10px 34px;
    font-size: 13px;
    line-height: 20px;
    color: #1D2129;
    background: #fff;
    outline: none;
    resize: none;
    font-family: inherit;
}
.yldField input::placeholder, .yldField textarea::placeholder { color: #C9CDD4; }
.yldField input:focus, .yldField textarea:focus { border-color: #002870; }
.yldLeaveSubmit {
    display: block;
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 4px;
    background: #0B2B6B;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    font-family: inherit;
}
.yldLeaveSubmit:disabled { opacity: .7; cursor: default; }

/* 输入区 */
.yldChatFoot { flex: none; padding: 10px 14px 12px; border-top: 1px solid #F2F3F5; background: #fff; position: relative; }
.yldQuick { display: flex; gap: 8px; margin-bottom: 10px; }
.yldQuick span {
    font-size: 12px;
    line-height: 22px;
    padding: 0 10px;
    color: #002870;
    background: #F5F8FF;
    border: 1px solid #DCE6F5;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}
.yldQuick span:hover { background: #EDF3FE; border-color: #002870; }

.yldChatInput {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    border: 1px solid #E5E6EB;
    border-radius: 999px;
    padding: 4px 4px 4px 14px;
    background: #fff;
}
.yldChatInput:focus-within { border-color: #002870; }
.yldChatInput textarea {
    flex: 1;
    height: 32px;
    max-height: 84px;
    resize: none;
    border: 0;
    outline: none;
    padding: 6px 0;
    font-size: 14px;
    line-height: 20px;
    background: transparent;
    font-family: inherit;
    color: #1D2129;
}
.yldChatInput textarea::placeholder { color: #C9CDD4; }
.yldEmojiBtn {
    flex: none;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
}
.yldEmojiBtn:hover { background: #F2F3F5; }
.yldEmojiPanel {
    display: none;
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 84px;
    max-height: 230px;
    overflow-y: auto;
    padding: 8px;
    background: #fff;
    border: 1px solid #E5E6EB;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    z-index: 5;
}
.yldEmojiPanel.show { display: grid; }
.yldEmojiPanel span {
    font-size: 19px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    border-radius: 4px;
    user-select: none;
}
.yldEmojiPanel span:hover { background: #F2F3F5; }
.yldChatSend {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    background: #002870;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.yldChatSend svg { width: 14px; height: 14px; fill: #fff; }
.yldChatSend:active { opacity: .85; }

.yldChatStatusLine {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #86909C;
}
.yldStatusLeft { display: inline-flex; align-items: center; }
.yldStatusLeft i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00B42A;
    margin-right: 5px;
    display: inline-block;
}
.yldStatusLeft i.off { background: #C9CDD4; }
.yldHotline {
    display: inline-flex;
    align-items: center;
    color: #002870;
    font-weight: 600;
    text-decoration: none;
}
.yldHotline:hover { text-decoration: underline; }
.yldHotline svg { width: 12px; height: 12px; fill: #002870; margin-right: 4px; }

@media screen and (max-width: 1024px) {
    .yldChatBtn { right: 16px; bottom: 100px; height: 46px; padding: 0 16px 0 12px; font-size: 13px; }
    .yldChatBtn svg { width: 18px; height: 18px; margin-right: 6px; }
    .yldChatPanel {
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        max-height: none;
        border-radius: 0;
    }
}
