/*
 * 模块功能：定义易售乐统一线索表单、前端拼图验证和在线咨询浮层样式。
 * @author AI Assistant
 * @date 2026-08-18
 */

.apply-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.apply-field { display: grid; gap: 7px; color: #526277; font-size: 12px; font-weight: 700; }
.apply-field-wide { grid-column: 1 / -1; }
.apply-field input, .apply-field textarea { width: 100%; border: 1px solid #cedae7; border-radius: 8px; background: #f9fbfd; color: #16263a; font: inherit; font-weight: 400; }
.apply-field input { height: 44px; padding: 0 13px; }
.apply-field textarea { min-height: 78px; padding: 11px 13px; resize: vertical; }
.apply-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.apply-status { min-height: 20px; margin: 10px 0 0; color: #b42318; font-size: 12px; text-align: center; }
.apply-status.is-success { color: #087443; }

.lead-puzzle-overlay { position: fixed; z-index: 10020; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(10, 25, 47, .55); }
.lead-puzzle { position: relative; width: min(100%, 348px); padding: 23px; border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .3); }
.lead-puzzle h2 { margin: 0 32px 4px 0; font-size: 20px; }
.lead-puzzle p { margin: 0 0 15px; color: #68788d; font-size: 12px; }
.lead-puzzle-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; background: transparent; color: #526277; font-size: 25px; cursor: pointer; }
.lead-puzzle-canvas { position: relative; width: 300px; max-width: 100%; margin: 0 auto 13px; overflow: hidden; border-radius: 9px; }
.lead-puzzle-canvas canvas { display: block; width: 100%; height: auto; }
.lead-puzzle-piece { position: absolute; top: 58px; left: 0; width: 38px; height: 38px; border: 2px solid #1d4ed8; background: rgba(37, 99, 235, .72); box-shadow: 0 2px 8px rgba(30, 64, 175, .3); transition: transform .08s linear; }
.lead-puzzle input[type="range"] { width: 100%; accent-color: #386bf5; }
.lead-puzzle-status { display: block; margin-top: 8px; color: #68788d; font-size: 12px; text-align: center; }
.lead-puzzle-status.is-success { color: #087443; }

.lead-chat-root { position: fixed; z-index: 9980; right: 24px; bottom: 24px; font-family: inherit; }
.lead-chat-launcher { min-width: 104px; height: 46px; padding: 0 18px; border: 0; border-radius: 23px; background: #386bf5; color: #fff; box-shadow: 0 12px 30px rgba(56, 107, 245, .34); font-weight: 800; cursor: pointer; }
.lead-chat-panel { position: absolute; right: 0; bottom: 58px; width: min(360px, calc(100vw - 32px)); overflow: hidden; border: 1px solid #dbe4ef; border-radius: 16px; background: #fff; box-shadow: 0 24px 70px rgba(15, 35, 65, .25); }
.lead-chat-panel[hidden] { display: none; }
.lead-chat-panel > header { display: flex; align-items: center; justify-content: space-between; padding: 15px 17px; background: linear-gradient(135deg, #386bf5, #2455cc); color: #fff; }
.lead-chat-panel > header div { display: grid; gap: 2px; }
.lead-chat-panel > header strong { font-size: 15px; }
.lead-chat-panel > header span { color: rgba(255, 255, 255, .78); font-size: 11px; }
.lead-chat-panel > header button { border: 0; background: transparent; color: #fff; font-size: 24px; cursor: pointer; }
.lead-chat-welcome { margin: 12px 14px 0; padding: 10px 12px; border-radius: 10px; background: #f1f5fb; color: #526277; font-size: 12px; line-height: 1.6; }
.lead-chat-wechat { position: relative; margin: 9px 14px 0; border: 1px solid #d8eee2; border-radius: 10px; background: #f3fbf6; }
.lead-chat-wechat summary { display: flex; min-height: 38px; align-items: center; justify-content: space-between; padding: 0 11px; color: #087f4a; cursor: pointer; list-style: none; }
.lead-chat-wechat summary::-webkit-details-marker { display: none; }
.lead-chat-wechat summary span { font-size: 12px; font-weight: 800; }
.lead-chat-wechat summary small { color: #68788d; font-size: 10px; }
.lead-chat-wechat-card { position: absolute; z-index: 2; top: calc(100% + 7px); right: 0; left: 0; display: grid; grid-template-columns: 112px 1fr; align-items: center; gap: 13px; padding: 12px; border: 1px solid #d8eee2; border-radius: 11px; background: #fff; box-shadow: 0 16px 42px rgba(15, 35, 65, .2); }
.lead-chat-wechat-card > a, .lead-chat-wechat-card img { display: block; width: 112px; height: 112px; }
.lead-chat-wechat-card div { display: grid; gap: 5px; }
.lead-chat-wechat-card strong { color: #26384f; font-size: 13px; }
.lead-chat-wechat-card span { color: #68788d; font-size: 10px; line-height: 1.5; }
.lead-chat-wechat-card a { color: #087f4a; font-size: 11px; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.lead-chat-messages { display: flex; height: 240px; padding: 13px 14px; overflow-y: auto; flex-direction: column; gap: 9px; }
.lead-chat-message { align-self: flex-start; max-width: 84%; padding: 9px 11px; border-radius: 10px 10px 10px 3px; background: #eef3f9; color: #26384f; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.lead-chat-message.is-self { align-self: flex-end; border-radius: 10px 10px 3px 10px; background: #386bf5; color: #fff; }
.lead-chat-compose { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 11px; border-top: 1px solid #e5ebf2; }
.lead-chat-compose textarea { min-height: 54px; padding: 9px; border: 1px solid #cedae7; border-radius: 8px; font: inherit; resize: none; }
.lead-chat-compose button { align-self: stretch; padding: 0 14px; border: 0; border-radius: 8px; background: #386bf5; color: #fff; font-weight: 700; cursor: pointer; }
.lead-chat-compose button:disabled { opacity: .65; cursor: wait; }

@media (max-width: 640px) {
  .apply-fields { grid-template-columns: 1fr; }
  .apply-field-wide { grid-column: auto; }
  .lead-chat-root { right: 14px; bottom: 72px; }
  .lead-chat-panel { position: fixed; right: 12px; bottom: 126px; left: 12px; width: auto; }
}
