/* WorthDegree AI 顾问 — 对话 UI（与站点青绿主题一致） */

.advisor-wrap { max-width: 760px; margin: 0 auto; }

/* 会话头部 */
.advisor-head {
  display:flex; justify-content:space-between; align-items:center; gap:12px;
  padding:14px 18px; background:var(--card,#fff); border:1px solid var(--border,#cdeee7);
  border-radius:12px 12px 0 0; border-bottom:none;
}
.advisor-head .who { display:flex; align-items:center; gap:10px; font-weight:700; color:var(--primary-dark,#0a5041); }
.advisor-head .who .dot {
  width:10px; height:10px; border-radius:50%; background:#14b8a6; box-shadow:0 0 0 3px rgba(20,184,166,.25);
}
.advisor-head .who small { display:block; font-weight:500; font-size:11px; color:var(--text-secondary,#5b8a85); }
.advisor-head .actions { display:flex; gap:8px; }
.advisor-head .actions button {
  font-size:12px; padding:6px 12px; border-radius:8px; border:1px solid var(--border,#cdeee7);
  background:#fff; color:var(--text-secondary,#5b8a85); cursor:pointer;
}
.advisor-head .actions button:hover { border-color:var(--primary,#0891B2); color:var(--primary,#0891B2); }

/* 对话区 */
.chat-box {
  height:52vh; min-height:340px; overflow-y:auto; padding:18px;
  background:var(--card,#fff); border:1px solid var(--border,#cdeee7);
  display:flex; flex-direction:column; gap:14px;
}
.msg { max-width:86%; padding:12px 16px; border-radius:14px; font-size:14.5px; line-height:1.65; white-space:pre-wrap; word-break:break-word; }
.msg.user { align-self:flex-end; background:var(--primary,#0891B2); color:#fff; border-bottom-right-radius:4px; }
.msg.ai { align-self:flex-start; background:#f0fdfa; color:#134e4a; border:1px solid #cdeee7; border-bottom-left-radius:4px; }
.msg.ai .src-note { display:block; margin-top:8px; padding-top:8px; border-top:1px dashed #cdeee7; font-size:11.5px; color:#5b8a85; }
.msg.streaming { opacity:.85; }
.msg .cursor { display:inline-block; width:8px; height:15px; background:#14b8a6; vertical-align:-2px; animation:wdblink 1s infinite; margin-left:2px; }
@keyframes wdblink { 50% { opacity:0; } }

/* 输入区 */
.chat-input-row { display:flex; gap:10px; padding:12px; background:var(--card,#fff); border:1px solid var(--border,#cdeee7); border-radius:0 0 12px 12px; border-top:none; }
.chat-input-row textarea {
  flex:1; resize:none; min-height:48px; max-height:140px; padding:12px 14px; font-size:14.5px; font-family:inherit;
  border:1px solid var(--border,#cdeee7); border-radius:10px; outline:none; color:var(--text,#134e4a); background:#fff;
}
.chat-input-row textarea:focus { border-color:var(--primary,#0891B2); }
.chat-input-row button {
  align-self:flex-end; padding:12px 20px; border:none; border-radius:10px; background:var(--primary,#0891B2); color:#fff;
  font-weight:600; font-size:14px; cursor:pointer;
}
.chat-input-row button:disabled { opacity:.5; cursor:not-allowed; }

/* 免费额度提示条 */
.tier-bar { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:8px 14px; font-size:12.5px; color:#5b8a85; }
.tier-bar .free-left b { color:#0d9488; }

/* 解锁面板 */
.unlock-panel {
  margin-top:14px; padding:22px; border-radius:14px; text-align:center;
  background:linear-gradient(135deg,#f0fdfa,#e0f7f3); border:1px solid #99e6d5;
}
.unlock-panel h4 { color:#0a5041; margin-bottom:6px; font-size:17px; }
.unlock-panel .price { font-size:30px; font-weight:800; color:#0d9488; margin:8px 0 2px; }
.unlock-panel .price small { font-size:13px; font-weight:500; color:#5b8a85; }
.unlock-panel ul { list-style:none; text-align:left; max-width:380px; margin:14px auto; font-size:13.5px; color:#134e4a; line-height:2; }
.unlock-panel ul li::before { content:"✓ "; color:#0d9488; font-weight:700; }
.unlock-panel .btn-row { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.demo-note { margin-top:10px; font-size:12px; color:#0d9488; background:#e6faf6; border-radius:8px; padding:6px 10px; display:inline-block; }

/* 危机热线常驻条 */
.crisis-bar {
  margin-top:12px; padding:10px 14px; border-radius:10px; font-size:12px; line-height:1.6;
  background:#fff7ed; border:1px solid #fed7aa; color:#9a3412; text-align:center;
}

/* 表单（问诊五问） */
.intake-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.intake-grid .span2 { grid-column:span 2; }
@media (max-width:640px) { .intake-grid { grid-template-columns:1fr; } .intake-grid .span2 { grid-column:span 1; } }

/* 海报弹窗 */
.poster-modal-overlay {
  position:fixed; inset:0; background:rgba(10,80,65,.55); backdrop-filter:blur(6px);
  display:none; align-items:center; justify-content:center; z-index:1000; padding:20px;
}
.poster-modal-overlay.active { display:flex; }
.poster-modal {
  background:#fff; border-radius:16px; padding:24px; max-width:560px; width:100%;
  max-height:92vh; overflow-y:auto; text-align:center;
}
.poster-modal h3 { color:#0a5041; margin-bottom:4px; }
.poster-modal .sub { font-size:13px; color:#5b8a85; margin-bottom:14px; }
.poster-tabs { display:flex; gap:8px; justify-content:center; margin-bottom:14px; }
.poster-tabs button {
  padding:7px 16px; border-radius:20px; border:1px solid #cdeee7; background:#fff; font-size:13px; cursor:pointer; color:#134e4a;
}
.poster-tabs button.active { background:#0f766e; color:#fff; border-color:#0f766e; }
#posterPreviewBox { display:flex; justify-content:center; margin-bottom:14px; }
#posterPreviewBox canvas { max-width:100%; height:auto; border-radius:12px; box-shadow:0 8px 28px rgba(15,118,110,.35); }
.poster-actions { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.poster-actions .btn { cursor:pointer; }
.poster-actions .hint { width:100%; font-size:11.5px; color:#5b8a85; margin-top:10px; }
