/* ============================================================
   留资获客插件 · 留资弹窗样式
   配色与版式对齐「安心背调」设计稿（品牌红 #be1e2d / 圆角 20px / 渐变 CTA）
   所有类名以 lead- 开头，不污染宿主页面。
   页头、悬浮、咨询条、页脚引导、二维码入口由前台外壳（FrontService + style.css）渲染，
   本文件只保留 lead.js 组装的弹窗与提示条。
   ============================================================ */

:root {
    --lead-font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body.lead-lock { overflow: hidden; }

/* ---------- 留资弹窗 ---------- */
@keyframes leadFadeSlide { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.lead-modal {
    position: fixed; inset: 0; z-index: 1200; display: none;
    align-items: center; justify-content: center; padding: 20px;
    font-family: var(--lead-font, "PingFang SC", "Microsoft YaHei", sans-serif);
}
.lead-modal.is-open { display: flex; }
.lead-modal__mask { position: absolute; inset: 0; background: rgba(30, 20, 20, .55); backdrop-filter: blur(3px); }
.lead-modal__box {
    position: relative; display: grid; grid-template-columns: 1fr 1.1fr; width: 100%; max-width: 880px;
    max-height: 92vh; overflow: auto; background: #fff; border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .3); animation: leadFadeSlide .3s ease;
}
.lead-modal__close {
    position: absolute; top: 14px; right: 16px; z-index: 3; width: 34px; height: 34px;
    border: none; border-radius: 50%; background: rgba(0, 0, 0, .06); color: #5a5a5a;
    font-size: 20px; line-height: 1; cursor: pointer;
}
.lead-modal__close:hover { background: rgba(0, 0, 0, .12); }
.lead-modal__brand {
    background: linear-gradient(165deg, #d24a5a 0%, #e0707e 70%, #ea8794 100%);
    color: #fff; padding: 38px 32px; display: flex; flex-direction: column;
}
.lead-modal__logo { font-size: 22px; font-weight: 900; letter-spacing: .04em; }
.lead-modal__slogan { font-size: 12px; opacity: .75; margin: 4px 0 28px; letter-spacing: .2em; }
.lead-modal__brand h3 { font-size: 24px; line-height: 1.4; margin: 0 0 10px; color: #fff; }
.lead-modal__brand p { font-size: 14px; opacity: .85; margin: 0 0 26px; }
.lead-modal__list { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; opacity: .9; }
.lead-modal__form { padding: 36px 36px 30px; }
.lead-modal__title { font-size: 20px; font-weight: 800; color: #333; text-align: center; }
.lead-modal__title::before, .lead-modal__title::after { content: '〃'; color: #be1e2d; font-weight: 900; margin: 0 6px; }
.lead-modal__sub { text-align: center; color: #be1e2d; font-size: 13px; font-weight: 700; margin: 8px 0 22px; }
.lead-field { margin-bottom: 14px; }
.lead-field input, .lead-field select {
    width: 100%; padding: 12px 14px; border: 1px solid #ebebeb; border-radius: 10px;
    font-size: 14px; background: #fff; transition: .2s; font-family: inherit; color: #333;
}
.lead-field input:focus, .lead-field select:focus { border-color: #be1e2d; outline: none; box-shadow: 0 0 0 3px rgba(190, 30, 45, .1); }
.lead-field--code { display: flex; gap: 10px; }
.lead-field--code input { flex: 1; }
.lead-field--code button {
    flex-shrink: 0; padding: 0 16px; border: 1px solid #be1e2d; background: #fff; color: #be1e2d;
    border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; transition: .2s; font-family: inherit;
}
.lead-field--code button:hover { background: #f8eded; }
.lead-field--code button:disabled { border-color: #ebebeb; color: #8c8c8c; cursor: not-allowed; background: #fff; }
.lead-agree { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #5a5a5a; margin: 4px 0 16px; cursor: pointer; }
.lead-agree input { width: auto; }
.lead-agree a { color: #be1e2d; text-decoration: none; }
.lead-agree a:hover { text-decoration: underline; }
.lead-submit {
    width: 100%; padding: 14px; border: none; border-radius: 12px; background: #be1e2d; color: #fff;
    font-size: 16px; font-weight: 800; cursor: pointer; transition: .2s; font-family: inherit;
    box-shadow: 0 6px 18px rgba(190, 30, 45, .28);
}
.lead-submit:hover { background: #97182a; transform: translateY(-1px); }
.lead-submit:disabled { background: #ebebeb; color: #8c8c8c; cursor: not-allowed; box-shadow: none; transform: none; }
.lead-form-hint { text-align: center; font-size: 13px; color: #5a5a5a; margin-top: 14px; }
.lead-form-hint a { color: #be1e2d; font-weight: 700; text-decoration: none; }
.lead-form-hint a:hover { text-decoration: underline; }

/* ---------- toast ---------- */
.lead-toast {
    position: fixed; left: 50%; top: 24px; transform: translateX(-50%) translateY(-12px); z-index: 1300;
    background: rgba(35, 32, 32, .92); color: #fff; padding: 11px 20px; border-radius: 100px;
    font-size: 14px; opacity: 0; pointer-events: none; transition: .25s ease; max-width: 90vw;
    font-family: var(--lead-font, "PingFang SC", "Microsoft YaHei", sans-serif);
}
.lead-toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 响应式 ---------- */
@media (max-width: 760px) {
    .lead-modal__box { grid-template-columns: 1fr; max-width: 420px; }
    .lead-modal__brand { padding: 26px 24px; }
    .lead-modal__brand h3 { font-size: 20px; }
    .lead-modal__list { display: none; }
    .lead-modal__form { padding: 26px 22px; }
}
