/* ============================================================
   陕西中恒钛航 — 右侧「钛材采购助手」（新版客服侧）v11
   ------------------------------------------------------------
   替换原来的 电话/在线咨询/QQ/微信 四件套
   设计原则：客服侧不只是"联系"，而是把 selector 已有的
   【选型 / 现货 / 对比 / 询价 / 进度】能力统一暴露出来
   配色：深空蓝 #0A2540 + 钛橙 #E67E22
   ============================================================ */
.zh-asst {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1200;
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    user-select: none;
}
.zh-asst * { box-sizing: border-box; }

/* ---------- 主栏 ---------- */
.zh-asst-bar {
    width: 62px;
    background: linear-gradient(180deg, #0A2540 0%, #0d2e4f 100%);
    box-shadow: -3px 0 14px rgba(10, 37, 64, .32);
    border-radius: 9px 0 0 9px;
    overflow: hidden;
}
.zh-asst-bar ul { margin: 0; padding: 0; list-style: none; }
.zh-asst-bar li {
    height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    border-bottom: 1px solid rgba(139, 157, 195, .14);
    transition: background .25s ease;
    position: relative;
}
.zh-asst-bar li:last-child { border-bottom: 0; }
.zh-asst-bar li:hover { background: rgba(230, 126, 34, .92); }
.zh-asst-bar li svg {
    width: 21px; height: 21px; display: block;
    fill: #c8d3e3; transition: fill .25s ease;
}
.zh-asst-bar li span {
    font-size: 10.5px; line-height: 1; color: #c8d3e3;
    letter-spacing: .5px; transition: color .25s ease;
}
.zh-asst-bar li:hover svg { fill: #fff; }
.zh-asst-bar li:hover span { color: #fff; }
/* 主推项：询价 */
.zh-asst-bar li.key {
    background: linear-gradient(180deg, #E67E22, #d35400);
}
.zh-asst-bar li.key svg { fill: #fff; }
.zh-asst-bar li.key span { color: #fff; font-weight: 700; }
.zh-asst-bar li.key:hover { background: linear-gradient(180deg, #d35400, #b8470a); }
/* 返回顶部：矮一点 */
.zh-asst-bar li.mini { height: 42px; }
.zh-asst-bar li.mini svg { width: 18px; height: 18px; }

/* ---------- 悬停展开的小气泡 ---------- */
.zh-asst-bar li .tip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%) translateX(6px);
    background: #16222A;
    color: #fff;
    font-size: 12.5px;
    padding: 7px 12px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
    box-shadow: 0 4px 14px rgba(10, 37, 64, .3);
}
.zh-asst-bar li .tip::after {
    content: "";
    position: absolute;
    right: -5px; top: 50%; margin-top: -4px;
    border-left: 5px solid #16222A;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}
.zh-asst-bar li:hover .tip { opacity: 1; transform: translateY(-50%) translateX(0); }
.zh-asst-bar li.key .tip { background: #E67E22; }
.zh-asst-bar li.key .tip::after { border-left-color: #E67E22; }

/* ---------- 弹层（询价 / 微信 / 进度） ---------- */
.zh-pop-mask {
    position: fixed; inset: 0;
    background: rgba(10, 37, 64, .5);
    z-index: 1201;
    display: none;
    opacity: 0;
    transition: opacity .22s ease;
}
.zh-pop-mask.show { display: block; opacity: 1; }
.zh-pop {
    position: fixed;
    right: 82px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    z-index: 1202;
    width: 330px;
    max-height: 84vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(10, 37, 64, .3);
    display: none;
    opacity: 0;
    transition: opacity .24s ease, transform .24s ease;
}
.zh-pop.show { display: block; opacity: 1; transform: translateY(-50%) translateX(0); }
.zh-pop-hd {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px 12px;
    background: linear-gradient(135deg, #0A2540, #16375c);
    border-radius: 12px 12px 0 0;
}
.zh-pop-hd b { font-size: 15px; color: #fff; letter-spacing: 1px; }
.zh-pop-hd .x {
    width: 24px; height: 24px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .14); color: #fff;
    font-size: 15px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.zh-pop-hd .x:hover { background: #E67E22; }
.zh-pop-bd { padding: 16px; }

/* 询价摘要（★ 关键：把"我在看什么"带进询价） */
.zh-q-sum {
    background: #F8FAFC;
    border: 1px solid #E6E9EE;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
    font-size: 12.5px;
    color: #3A4756;
    line-height: 1.8;
}
.zh-q-sum .r { display: flex; gap: 8px; }
.zh-q-sum .r em {
    flex: 0 0 52px; font-style: normal; color: #8B9DC3;
}
.zh-q-sum .r span { color: #16222A; font-weight: 600; }
.zh-q-sum .r span.none { color: #8B9DC3; font-weight: 400; }

.zh-q-fm { margin-bottom: 12px; }
.zh-q-fm label {
    display: block; font-size: 12px; color: #8B9DC3;
    margin-bottom: 5px; letter-spacing: .5px;
}
.zh-q-fm input, .zh-q-fm textarea {
    width: 100%; padding: 8px 10px;
    border: 1px solid #E1E6EC; border-radius: 6px;
    font-size: 13px; color: #16222A; font-family: inherit;
    transition: border-color .22s;
}
.zh-q-fm input:focus, .zh-q-fm textarea:focus {
    outline: none; border-color: #E67E22;
}
.zh-q-fm textarea { height: 62px; resize: vertical; line-height: 1.6; }
.zh-q-fm .row { display: flex; gap: 8px; }
.zh-q-fm .row > div { flex: 1; }

.zh-q-tip {
    font-size: 11.5px; color: #8B9DC3; line-height: 1.7;
    padding: 8px 0 12px; text-align: justify;
}
.zh-q-btns { display: flex; gap: 8px; }
.zh-q-btns button {
    flex: 1; height: 40px; border: 0; border-radius: 6px;
    font-size: 14px; font-weight: 600; font-family: inherit;
    cursor: pointer; letter-spacing: .5px; transition: all .25s;
}
.zh-q-btns .p1 { background: #E67E22; color: #fff; }
.zh-q-btns .p1:hover { background: #d35400; }
.zh-q-btns .p2 { background: #0A2540; color: #fff; }
.zh-q-btns .p2:hover { background: #16375c; }

/* 二维码区 */
.zh-qr {
    width: 178px; height: 178px; margin: 0 auto 12px;
    padding: 8px; border: 1px solid #E6E9EE; border-radius: 8px;
}
.zh-qr svg { width: 100%; height: 100%; display: block; }
.zh-qr img { width: 100%; height: 100%; display: block; }
.zh-pop-bd p.zh-note {
    font-size: 12.5px; color: #6B7480; line-height: 1.75;
    margin: 0 0 12px; text-align: justify;
}
.zh-pop-bd p.zh-note b { color: #0A2540; }

/* 提交成功态 */
.zh-ok { text-align: center; padding: 14px 0 4px; }
.zh-ok .ic {
    width: 54px; height: 54px; margin: 0 auto 12px;
    border-radius: 50%; background: #EAF7EF;
    display: flex; align-items: center; justify-content: center;
}
.zh-ok .ic svg { width: 28px; height: 28px; fill: #2E9E5B; }
.zh-ok b { display: block; font-size: 15.5px; color: #0A2540; margin-bottom: 6px; }
.zh-ok p { font-size: 12.5px; color: #6B7480; line-height: 1.75; margin: 0 0 14px; }
.zh-ok .no {
    display: inline-block; padding: 6px 14px; margin-bottom: 14px;
    background: #FFF4E8; border: 1px dashed #E67E22; border-radius: 5px;
    font-size: 13px; color: #d35400; font-weight: 700; letter-spacing: 1px;
}

/* 快捷入口列表（选型/现货/对比/进度 的落地页） */
.zh-links { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.zh-links a {
    display: flex; align-items: center; gap: 8px;
    padding: 11px 12px; border: 1px solid #E6E9EE; border-radius: 8px;
    font-size: 13px; color: #16222A; text-decoration: none;
    transition: all .24s ease;
}
.zh-links a:hover { border-color: #E67E22; background: #FFF7EF; }
.zh-links a svg { width: 18px; height: 18px; fill: #E67E22; flex-shrink: 0; }
.zh-links a i { font-style: normal; font-size: 11px; color: #8B9DC3; display: block; }

/* ============================================================
   移动端：右侧竖栏太挤 → 改为右下角悬浮球 + 上滑面板
   ============================================================ */
@media screen and (max-width: 768px) {
    .zh-asst { right: 10px; top: auto; bottom: 74px; transform: none; }
    .zh-asst-bar {
        width: 52px;
        border-radius: 26px;
        box-shadow: 0 6px 20px rgba(10, 37, 64, .34);
    }
    .zh-asst-bar li { height: 46px; }
    .zh-asst-bar li span { display: none; }
    .zh-asst-bar li svg { width: 20px; height: 20px; }
    .zh-asst-bar li.mini { height: 38px; }
    /* 移动端精简为 4 项：询价 / 现货 / 电话 / 顶部 */
    .zh-asst-bar li.m-hide { display: none; }
    .zh-asst-bar li .tip { display: none; }
    .zh-pop {
        right: 10px; left: 10px; width: auto;
        top: 50%; transform: translateY(-50%) scale(.96);
    }
    .zh-pop.show { transform: translateY(-50%) scale(1); }
    .zh-links { grid-template-columns: 1fr; }
}
