/**
 * 移动端客服系统样式
 */

/* 底部导航栏客服按钮 */
.cs-mobile-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    position: relative;
    padding: 5px 0;
}

.cs-mobile-button .layui-icon {
    font-size: 22px;
    margin-bottom: 2px;
}

.cs-mobile-button span {
    font-size: 12px;
}

/* 新消息提示点 */
.cs-mobile-new-msg-dot {
    position: absolute;
    top: 5px;
    right: 15px;
    width: 8px;
    height: 8px;
    background-color: #FF5722;
    border-radius: 50%;
}

/* 全屏客服面板 */
.cs-mobile-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f8f8f8;
    z-index: 99999 !important;
    display: flex;
    flex-direction: column;
}

/* 面板头部 */
.cs-mobile-header {
    display: flex;
    align-items: center;
    height: 50px;
    background-color: #1E9FFF;
    color: #fff;
    padding: 0 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cs-mobile-back {
    margin-right: 15px;
    font-size: 18px;
}

.cs-mobile-title {
    flex: 1;
    font-size: 16px;
    text-align: center;
    margin-right: 25px;
}

/* 消息容器 */
.cs-mobile-message-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background-color: #f8f8f8;
}

/* 面板底部 */
.cs-mobile-footer {
    height: 50px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    background-color: #fff;
    box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
}

/* 输入框 */
.cs-mobile-input {
    flex: 1;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e6e6e6;
    border-radius: 18px;
    margin-right: 10px;
    outline: none;
    font-size: 14px;
}

/* 发送按钮 */
.cs-mobile-send-btn {
    width: 36px;
    height: 36px;
    background-color: #1E9FFF;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 消息项 */
.cs-mobile-message-item {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

/* 用户消息靠右 */
.cs-mobile-message-right {
    flex-direction: row-reverse;
}

/* 消息头像 */
.cs-mobile-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 10px;
    background-color: #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-mobile-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 默认头像，避免依赖外部文件 */
.cs-mobile-message-right .cs-mobile-message-avatar::before {
    content: "\e770";
    font-family: layui-icon !important;
    font-size: 24px;
    color: #666;
}

.cs-mobile-message-left .cs-mobile-message-avatar::before {
    content: "\e626";
    font-family: layui-icon !important;
    font-size: 24px;
    color: #1E9FFF;
}

/* 消息内容 */
.cs-mobile-message-content {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-all;
}

/* 系统消息样式 */
.cs-mobile-message-left .cs-mobile-message-content {
    background-color: #fff;
    color: #333;
    border-top-left-radius: 3px;
}

/* 用户消息样式 */
.cs-mobile-message-right .cs-mobile-message-content {
    background-color: #1E9FFF;
    color: #fff;
    border-top-right-radius: 3px;
}

/* 当客服面板打开时禁止滚动 */
body.cs-mobile-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* 底部导航栏样式 */
.footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-color: #fff;
    display: flex;
    border-top: 1px solid #eee;
    z-index: 1000;
}

/* 移动端底部导航栏的客服图标 */
.nav-ico.cs-ico {
    background-image: url('data:image/svg+xml;utf8,<svg t="1616636790724" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2412" width="32" height="32"><path d="M512 0C229.23 0 0 229.23 0 512s229.23 512 512 512 512-229.23 512-512S794.77 0 512 0z m-104.1 716.83c-55.87 0-101.16-45.29-101.16-101.16h67.42c0 18.65 15.11 33.74 33.74 33.74s33.74-15.09 33.74-33.74h67.42c-0.01 55.87-45.28 101.16-101.16 101.16z m323.39-73.32H528.34c-0.05 0.09-0.11 0.17-0.16 0.25a101.24 101.24 0 0 1-85.84 47.9c-55.87 0-101.16-45.29-101.16-101.16h-28.4c-9.65 0-17.46-7.83-17.46-17.48V399.25c0-9.65 7.81-17.48 17.46-17.48h28.4v-38.94c0-74.19 15.16-114.55 120.16-114.55 51.57 0 111.23 12.24 111.23 74.82 0 24.9-20.2 45.09-45.09 45.09-24.9 0-45.1-20.2-45.1-45.09v-10.69c0-9.65-7.82-17.48-17.46-17.48-9.65 0-17.48 7.83-17.48 17.48v89.35h294.8c9.65 0 17.47 7.83 17.47 17.48v173.77c-0.01 9.67-7.82 17.49-17.47 17.49z" p-id="2413" fill="%23888888"></path></svg>');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
}

.cs-mobile-guess-inline-list {
    margin-top: 8px;
}
.cs-mobile-guess-inline-btn {
    background: #f2f8fc;
    color: #009688;
    border-radius: 4px;
    padding: 6px 12px;
    margin: 4px 0;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    text-align: left;
    display: block;
}
.cs-mobile-guess-inline-btn:active,
.cs-mobile-guess-inline-btn:hover {
    background: #e0f7fa;
}

.cs-mobile-guess-index {
    color: #b0b0b0;
    font-size: 14px;
    margin-right: 6px;
}