/* ============================================================
   MODULE 11 — Chat (buyer ↔ seller)
   Scoped under .sh-chat*. Floating panel, bottom-right.
   ============================================================ */
.sh-chat{position:fixed;right:20px;bottom:20px;width:340px;max-width:92vw;z-index:1100;
  background:#fff;border:1px solid var(--sh-line);border-radius:16px;box-shadow:0 20px 60px rgba(10,16,35,.3);
  display:none;flex-direction:column;overflow:hidden;max-height:74vh}
.sh-chat.open{display:flex;animation:sh-chat-pop .2s ease}
@keyframes sh-chat-pop{from{transform:translateY(16px);opacity:0}to{transform:none;opacity:1}}
.sh-chat__head{display:flex;align-items:center;gap:8px;padding:12px 14px;background:var(--sh-navy);color:#fff}
.sh-chat__title{font-weight:800;font-size:14px}
.sh-chat__sub{font-size:11px;opacity:.8}
.sh-chat__tenure{display:inline-block;margin-top:4px;font-size:10.5px;font-weight:700;background:rgba(255,255,255,.16);color:#fff;border-radius:20px;padding:2px 9px}
.sh-chat__x{margin-left:auto;border:0;background:transparent;color:#fff;font-size:22px;cursor:pointer;line-height:1}

/* product context box */
.sh-chat__ctx{display:flex;gap:10px;align-items:center;padding:10px 14px;border-bottom:1px solid var(--sh-line);background:var(--sh-bg-soft);position:relative}
.sh-chat__ctx img{width:46px;height:46px;border-radius:8px;object-fit:cover;background:#fff;flex:0 0 auto}
.sh-chat__ctx .nm{font-size:13px;font-weight:700;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sh-chat__ctx .pr{font-size:13px;font-weight:800;color:var(--sh-navy)}
.sh-chat__ctx-x{position:absolute;top:6px;right:8px;border:0;background:transparent;color:var(--sh-muted);font-size:15px;cursor:pointer}
.sh-chat__ctx-x:hover{color:var(--sh-red)}
.sh-chat__intent{margin:0;padding:8px 14px;font-size:12px;font-weight:800;color:#9a4b00;
  background:linear-gradient(90deg,rgba(232,181,61,.25),rgba(232,181,61,.08));border-bottom:1px solid var(--sh-line);
  animation:sh-intent-glow 1.6s ease-in-out infinite}
@keyframes sh-intent-glow{0%,100%{box-shadow:inset 0 0 0 rgba(232,181,61,0)}50%{box-shadow:inset 0 0 18px rgba(232,181,61,.4)}}

.sh-chat__thread{flex:1;overflow-y:auto;padding:12px 14px;display:flex;flex-direction:column;gap:8px;background:#fff;min-height:140px}
.sh-msg{max-width:82%;padding:8px 12px;border-radius:14px;font-size:13.5px;line-height:1.4}
.sh-msg--buyer{align-self:flex-end;background:var(--sh-navy);color:#fff;border-bottom-right-radius:4px}
.sh-msg--seller{align-self:flex-start;background:var(--sh-bg-soft);color:var(--sh-ink);border-bottom-left-radius:4px}
.sh-msg--order{align-self:stretch;max-width:100%;background:rgba(31,170,89,.1);border:1px solid rgba(31,170,89,.35);color:#137a3e;font-weight:600}
.sh-msg__ts{display:block;font-size:10px;opacity:.6;margin-top:3px}
.sh-chat__empty{color:var(--sh-muted);font-size:12.5px;text-align:center;margin:auto}

.sh-chat__form{display:flex;gap:8px;padding:10px 12px;border-top:1px solid var(--sh-line)}
.sh-chat__form input{flex:1;border:1px solid var(--sh-line);border-radius:20px;padding:9px 14px;font-size:13.5px;font-family:inherit;outline:0}
.sh-chat__form input:focus{border-color:var(--sh-navy)}
.sh-chat__form button{border:0;background:var(--sh-navy);color:#fff;border-radius:20px;padding:0 16px;font-weight:700;cursor:pointer;font-family:inherit}
.sh-chat__form button:hover{background:var(--sh-navy-2)}

/* floating reopen launcher */
.sh-chat-fab{position:fixed;right:20px;bottom:20px;z-index:1090;width:56px;height:56px;border-radius:50%;
  background:var(--sh-navy);color:#fff;border:0;cursor:pointer;font-size:24px;box-shadow:var(--sh-shadow);display:none}
.sh-chat-fab.show{display:flex;align-items:center;justify-content:center}
.sh-chat-fab__dot{position:absolute;top:6px;right:6px;width:12px;height:12px;border-radius:50%;background:var(--sh-red);border:2px solid #fff;display:none}
.sh-chat-fab__dot.show{display:block}
