/* ==========================================================================
   客服会话页：基础结构沿用 /static/style.css（与 old/style.css 完全一致），
   本文件只补充布局容器、首屏卡片、消息细节与三套皮肤差异。
   ========================================================================== */

html,
body {
    height: 100%;
}

body {
    background-color: #d8d8d8;
}

.service {
    background-color: #f3f3f3;
}

@media (min-width: 768px) {
    body {
        background-color: #cfcfcf;
    }
    .service {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    }
}

/* ---------- 头部 ---------- */

.msg-head {
    z-index: 2;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 48px;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
}

.msg-head > span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg-head .head-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 auto;
}

.msg-head .head-logo {
    height: 22px;
    width: auto;
    max-width: 96px;
    margin-left: 6px;
    background-color: #fafafa;
    flex: 0 1 auto;
}

/* ---------- 消息区 ---------- */

.msg-box {
    -webkit-overflow-scrolling: touch;
    overflow-x: hidden;
}

.msg-box p {
    margin-top: 0;
}

.msg .img1 img,
.msg .img2 img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.msg .content span {
    display: inline-block;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.msg .content .msg-image {
    display: block;
    max-width: 180px;
    max-height: 220px;
    width: auto;
    height: auto;
    border-radius: 4px;
}

.msg-system {
    margin: 8px 0;
    color: #999;
    font-size: 12px;
    text-align: center;
}

.welcome-msg {
    margin-bottom: 10px;
}

/* ---------- 首屏卡片 ---------- */

.first-card {
    max-width: 340px;
    margin: 24px auto 12px;
    padding: 10px 8px;
    box-sizing: border-box;
    background-color: #fff;
    border: 1px solid #f1eded;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.name-card {
    position: relative;
    padding-top: 14px;
    text-align: center;
}

.name-avatar {
    position: absolute;
    left: 50%;
    top: -22px;
    width: 52px;
    height: 52px;
    padding: 4px;
    box-sizing: border-box;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    transform: translateX(-50%);
    overflow: hidden;
}

.name-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.name-title {
    margin: 8px 0 6px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.name-channels {
    display: flex;
    margin-top: 4px;
}

.name-channel {
    flex: 1;
    min-width: 0;
    padding: 4px 2px;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: center;
    cursor: pointer;
}

.name-channel:active {
    opacity: 0.6;
}

.name-channel i {
    display: inline-block;
    width: 22px;
    height: 22px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.nc-name {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #333;
}

.nc-desc {
    display: block;
    margin-top: 1px;
    font-size: 10px;
    color: #999;
}

.first-banner {
    margin: 0 0 10px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #fff;
}

.first-banner img {
    display: block;
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.first-banner--jym img {
    height: auto;
    max-height: 110px;
    object-fit: contain;
}

/* ---------- 快捷问题 ---------- */

.quick-cards {
    display: flex;
    gap: 8px;
    padding: 2px 0 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.quick-cards::-webkit-scrollbar {
    display: none;
}

.quick-card {
    flex: 0 0 auto;
    padding: 4px;
    border: 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font: inherit;
    color: #555;
    font-size: 12px;
    line-height: 1.2;
    cursor: pointer;
    text-align: center;
}

.quick-card:active {
    opacity: 0.7;
}

.quick-card img {
    display: block;
    width: 76px;
    height: 76px;
    border-radius: 6px;
    object-fit: cover;
}

.quick-card span {
    display: block;
    margin-top: 4px;
}

.quick-card--text {
    padding: 8px 10px;
    max-width: 120px;
    border-radius: 999px;
    background-color: #fff;
    color: #666;
    border: 1px solid #ececec;
}

.quick-card--feedback img {
    width: 120px;
    height: auto;
    max-height: 60px;
    object-fit: contain;
    border-radius: 4px;
}

/* ---------- 输入区 ---------- */

.msg-post {
    position: relative;
    flex: 0 0 auto;
    align-items: flex-end;
}

.msg-post textarea {
    height: 38px;
    min-height: 38px;
    max-height: 96px;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.msg-post label {
    cursor: pointer;
    user-select: none;
    z-index: 1;
}

.msg-post label .iconfont {
    color: #090c84;
}

.msg-post input[type="button"] {
    flex: 0 0 auto;
    height: 38px;
    border: 0;
    -webkit-appearance: none;
}

/* ---------- 皮肤：闲小蜜 ---------- */

.skin-xianyu {
    background-color: #e9e9e9;
}

.skin-xianyu .msg-head {
    background-color: #efefef;
}

.skin-xianyu .msg-box {
    background-color: #f3f3f3;
}

/* ---------- 皮肤：转转 ---------- */

.skin-zhuanzhuan {
    background-color: #f3f3f3;
}

.skin-zhuanzhuan .msg-head {
    background-color: #f3ebeb;
}

.skin-zhuanzhuan .msg-head .head-avatar {
    width: 34px;
    height: 34px;
}

.skin-zhuanzhuan .msg-box {
    background-color: #f3f3f3;
}

.skin-zhuanzhuan .msg-post {
    background-color: #fafafa;
}

.skin-zhuanzhuan .msg-post textarea {
    padding: 8px 37px 8px 14px;
    background-color: #fff;
    border: 1px solid #fff;
    border-radius: 30px;
}

.skin-zhuanzhuan .msg-post label {
    right: 78px;
}

.skin-zhuanzhuan .msg-post label .iconfont {
    color: #b0b0b0;
}

.skin-zhuanzhuan .msg-post input[type="button"] {
    background-color: #fff;
    color: #000;
    border: 1px solid #000;
    border-radius: 4px;
}

/* ---------- 皮肤：交易猫 ---------- */

.skin-jiaoyimao {
    background-color: #ededed;
}

.skin-jiaoyimao .msg-head {
    background-color: #efefef;
}

.skin-jiaoyimao .msg-box {
    background-color: #f3f3f3;
}

.skin-jiaoyimao .name-card--jym {
    max-width: 240px;
    margin-top: 20px;
}

.skin-jiaoyimao .first-banner--jym {
    margin-bottom: 12px;
}

.skin-jiaoyimao .msg-post {
    background-color: #e3e3e3;
}

.skin-jiaoyimao .msg-post input[type="button"] {
    background-color: #ff9800;
}
