/* 한성협 공용 위젯 — 플로팅 AI 챗봇 + 문의폼 (index/consult 공용, 자체 완결형) */
:root{ --hsw-navy:#0e1a2b; --hsw-navy2:#16273d; --hsw-gold:#c6a15b; --hsw-gold2:#b08b45; --hsw-red:#d6483b; --hsw-line:#e7e2d8; --hsw-ink:#1a1f27; --hsw-gray:#6b7480; }
.hsw-sans{ font-family:"Pretendard",-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo",sans-serif; }

/* ===== 플로팅 챗봇 ===== */
.hsw-fab{ position:fixed; right:20px; bottom:20px; z-index:9998; background:linear-gradient(135deg,var(--hsw-gold),var(--hsw-gold2)); color:var(--hsw-navy); border:none; border-radius:999px; padding:14px 20px; font-weight:800; font-size:15px; box-shadow:0 10px 26px rgba(14,26,43,.28); cursor:pointer; display:flex; align-items:center; gap:8px; font-family:inherit; }
.hsw-fab:hover{ filter:brightness(1.04); transform:translateY(-2px); }
.hsw-fab .dot{ width:8px; height:8px; border-radius:50%; background:#2ecc71; box-shadow:0 0 0 3px rgba(46,204,113,.25); }
@media (max-width:620px){ .hsw-fab{ right:14px; bottom:70px; padding:12px 16px; font-size:14px; } }

.hsw-panel{ position:fixed; right:20px; bottom:20px; z-index:9999; width:360px; max-width:calc(100vw - 28px); height:520px; max-height:calc(100vh - 40px); background:#fff; border-radius:18px; box-shadow:0 24px 60px rgba(14,26,43,.35); display:none; flex-direction:column; overflow:hidden; border:1px solid var(--hsw-line); }
.hsw-panel.open{ display:flex; }
.hsw-head{ background:var(--hsw-navy); color:#fff; padding:16px 18px; display:flex; align-items:center; justify-content:space-between; }
.hsw-head b{ font-size:16px; } .hsw-head span{ font-size:12px; color:#9fb0c4; display:block; margin-top:2px; }
.hsw-x{ background:transparent; border:none; color:#cdd6e1; font-size:22px; cursor:pointer; line-height:1; }
.hsw-body{ flex:1; overflow-y:auto; padding:16px; background:#f7f6f2; display:flex; flex-direction:column; gap:10px; }
.hsw-msg{ max-width:82%; padding:11px 14px; border-radius:14px; font-size:14.5px; line-height:1.55; white-space:pre-wrap; word-break:keep-all; }
.hsw-msg.bot{ align-self:flex-start; background:#fff; border:1px solid var(--hsw-line); color:var(--hsw-ink); border-bottom-left-radius:4px; }
.hsw-msg.user{ align-self:flex-end; background:var(--hsw-navy); color:#fff; border-bottom-right-radius:4px; }
.hsw-msg.typing{ color:var(--hsw-gray); font-style:italic; }
.hsw-quick{ display:flex; flex-wrap:wrap; gap:6px; padding:0 16px 10px; background:#f7f6f2; }
.hsw-quick button{ background:#fff; border:1px solid var(--hsw-line); color:var(--hsw-navy); border-radius:999px; padding:7px 12px; font-size:12.5px; cursor:pointer; font-family:inherit; }
.hsw-quick button:hover{ border-color:var(--hsw-gold); }
.hsw-inrow{ display:flex; gap:8px; padding:12px; border-top:1px solid var(--hsw-line); background:#fff; }
.hsw-inrow input{ flex:1; border:1px solid var(--hsw-line); border-radius:999px; padding:11px 15px; font-size:14px; outline:none; font-family:inherit; }
.hsw-inrow input:focus{ border-color:var(--hsw-gold); }
.hsw-send{ background:var(--hsw-gold); color:var(--hsw-navy); border:none; border-radius:999px; padding:0 18px; font-weight:800; cursor:pointer; font-family:inherit; }

/* ===== 문의폼 ===== */
.hsw-form{ max-width:520px; margin:0 auto; background:#fff; border:1px solid var(--hsw-line); border-radius:16px; padding:26px 24px; box-shadow:0 12px 30px rgba(14,26,43,.08); text-align:left; }
.hsw-form h3{ font-size:20px; font-weight:800; margin:0 0 6px; color:var(--hsw-ink); text-align:center; }
.hsw-form p.sub{ font-size:14px; color:var(--hsw-gray); text-align:center; margin:0 0 18px; }
.hsw-form label{ display:block; font-size:13px; font-weight:700; color:var(--hsw-navy); margin:12px 0 6px; }
.hsw-form input, .hsw-form textarea{ width:100%; border:1px solid var(--hsw-line); border-radius:10px; padding:12px 14px; font-size:15px; outline:none; font-family:inherit; box-sizing:border-box; }
.hsw-form input:focus, .hsw-form textarea:focus{ border-color:var(--hsw-gold); }
.hsw-form textarea{ min-height:90px; resize:vertical; }
.hsw-form .submit{ width:100%; margin-top:18px; background:linear-gradient(135deg,var(--hsw-red),#bf3b2f); color:#fff; border:none; border-radius:10px; padding:15px; font-size:16px; font-weight:800; cursor:pointer; font-family:inherit; }
.hsw-form .submit:hover{ filter:brightness(1.05); }
.hsw-form .submit:disabled{ opacity:.6; cursor:default; }
.hsw-form .result{ margin-top:14px; text-align:center; font-size:14px; font-weight:600; }
.hsw-form .result.ok{ color:#2e7d32; } .hsw-form .result.err{ color:var(--hsw-red); }
.hsw-form .note{ margin-top:10px; font-size:12px; color:var(--hsw-gray); text-align:center; }
