.npc-bubble{position:fixed;right:18px;bottom:18px;z-index:99998;display:flex;align-items:center;gap:8px;background:#c0392b;color:#fff;padding:12px 16px;border-radius:40px;box-shadow:0 6px 20px rgba(0,0,0,.25);cursor:pointer;font:600 15px/1 -apple-system,Segoe UI,Roboto,Arial,sans-serif;animation:npcpop .4s ease}
.npc-bubble .npc-ico{font-size:20px}
.npc-bubble.npc-hide{display:none}
@keyframes npcpop{from{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}
.npc-panel{position:fixed;right:18px;bottom:18px;z-index:99999;width:350px;max-width:calc(100vw - 24px);height:520px;max-height:calc(100vh - 40px);background:#fff;border-radius:16px;box-shadow:0 12px 40px rgba(0,0,0,.3);display:none;flex-direction:column;overflow:hidden;font:14px/1.5 -apple-system,Segoe UI,Roboto,Arial,sans-serif}
.npc-panel.npc-open{display:flex}
.npc-head{background:#c0392b;color:#fff;padding:14px 16px;display:flex;justify-content:space-between;align-items:center}
.npc-head b{font-size:15px}
.npc-head small{display:block;opacity:.85;font-size:12px;margin-top:2px}
.npc-close{background:transparent;border:0;color:#fff;font-size:24px;line-height:1;cursor:pointer;padding:0 4px}
.npc-body{flex:1;overflow-y:auto;padding:14px;background:#f5f6f8}
.npc-msg{max-width:82%;padding:9px 12px;border-radius:14px;margin-bottom:8px;word-wrap:break-word}
.npc-bot{background:#fff;border:1px solid #eceff1;border-bottom-left-radius:4px}
.npc-user{background:#c0392b;color:#fff;margin-left:auto;border-bottom-right-radius:4px}
.npc-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.npc-chip{background:#fff;border:1.5px solid #c0392b;color:#c0392b;padding:8px 12px;border-radius:20px;cursor:pointer;font-size:13px;font-weight:600}
.npc-chip:hover{background:#c0392b;color:#fff}
.npc-inline,.npc-form{background:#fff;border:1px solid #eceff1;border-radius:12px;padding:10px;margin-bottom:8px;display:flex;flex-direction:column;gap:8px}
.npc-inline{flex-direction:row}
.npc-form input[type=text],.npc-form input[type=tel],.npc-inline input{width:100%;padding:9px 10px;border:1px solid #d0d5da;border-radius:8px;font-size:14px}
.npc-hp{position:absolute;left:-9999px;width:1px;height:1px}
.npc-consent{display:flex;gap:8px;align-items:flex-start;font-size:12px;color:#555}
.npc-consent input{margin-top:3px}
.npc-send,.npc-submit{background:#c0392b;color:#fff;border:0;border-radius:8px;padding:10px;font-weight:600;cursor:pointer;font-size:14px}
.npc-send{padding:9px 14px;white-space:nowrap}
.npc-submit:disabled{opacity:.6}
.npc-err{color:#c0392b;font-size:12px;min-height:14px}
.npc-quick{display:flex;gap:6px;padding:8px;border-top:1px solid #eceff1;background:#fff}
.npc-q{flex:1;text-align:center;padding:9px 6px;border-radius:8px;font-size:13px;font-weight:600;text-decoration:none;color:#fff}
.npc-call{background:#27ae60}.npc-zalo{background:#0068ff}.npc-mess{background:#0084ff}
@media(max-width:400px){.npc-panel{right:6px;bottom:6px;width:calc(100vw - 12px)}}

/* v1.3: ô nhập chat 2 chiều */
.npc-live-bar{display:flex;gap:6px;padding:8px;border-top:1px solid #eceff1;background:#fff}
.npc-live-in{flex:1;padding:9px 10px;border:1px solid #d0d5da;border-radius:8px;font-size:14px;min-width:0}
.npc-live-send{background:#c0392b;color:#fff;border:0;border-radius:8px;padding:9px 16px;font-weight:600;cursor:pointer;font-size:14px;white-space:nowrap}

/* inline form [npchat_form] */
.npc-inlineform{border:2px solid #c0392b;border-radius:14px;padding:18px;margin:22px 0;background:#fff7f6;font:14px/1.5 -apple-system,Segoe UI,Roboto,Arial,sans-serif;max-width:560px}
.npc-if-title{font-size:18px;font-weight:700;color:#c0392b;margin-bottom:4px}
.npc-if-sub{color:#555;font-size:13px;margin-bottom:12px}
.npc-inlineform input[type=text],.npc-inlineform input[type=tel]{width:100%;padding:11px 12px;border:1px solid #d0d5da;border-radius:9px;font-size:15px;margin-bottom:9px;box-sizing:border-box}
.npc-if-consent{display:flex;gap:8px;align-items:flex-start;font-size:12px;color:#666;margin-bottom:10px}
.npc-if-consent input{margin-top:3px}
.npc-if-btn{width:100%;background:#c0392b;color:#fff;border:0;border-radius:9px;padding:13px;font-size:16px;font-weight:700;cursor:pointer}
.npc-if-btn:disabled{opacity:.6}
.npc-if-msg{color:#c0392b;font-size:12px;min-height:14px;margin-top:6px}
.npc-if-ok{color:#27ae60;font-weight:600;font-size:15px;padding:8px 0}

/* sticky mobile bar */
.npc-sticky{display:none}
@media(max-width:767px){
 .npc-sticky{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:99997;background:#fff;box-shadow:0 -3px 14px rgba(0,0,0,.15)}
 .npc-sticky a,.npc-sticky button{flex:1;text-align:center;padding:12px 4px;font:600 14px/1 -apple-system,Segoe UI,Roboto,Arial,sans-serif;text-decoration:none;border:0;cursor:pointer}
 .npc-sticky a:first-child{background:#27ae60;color:#fff}
 .npc-sticky a:nth-child(2){background:#0068ff;color:#fff}
 .npc-sticky .npc-sb-quote{background:#c0392b;color:#fff}
 .npc-bubble{bottom:60px}
}

/* exit popup */
.npc-pop-ov{position:fixed;inset:0;z-index:100000;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;padding:16px;animation:npcfade .25s ease}
@keyframes npcfade{from{opacity:0}to{opacity:1}}
.npc-pop{position:relative;background:#fff;border-radius:16px;max-width:400px;width:100%;padding:24px;font:14px/1.5 -apple-system,Segoe UI,Roboto,Arial,sans-serif;box-shadow:0 20px 60px rgba(0,0,0,.35)}
.npc-pop-x{position:absolute;top:8px;right:12px;background:transparent;border:0;font-size:26px;line-height:1;cursor:pointer;color:#999}
.npc-pop-h{font-size:20px;font-weight:800;color:#c0392b;margin-bottom:6px;padding-right:20px}
.npc-pop-s{color:#555;font-size:13px;margin-bottom:14px}
.npc-pop input[type=text],.npc-pop input[type=tel]{width:100%;padding:12px;border:1px solid #d0d5da;border-radius:9px;font-size:15px;margin-bottom:9px;box-sizing:border-box}
.npc-pop-ck-l{display:flex;gap:8px;align-items:flex-start;font-size:12px;color:#666;margin-bottom:12px}
.npc-pop-ck-l input{margin-top:3px}
.npc-pop-btn{width:100%;background:#c0392b;color:#fff;border:0;border-radius:9px;padding:14px;font-size:16px;font-weight:700;cursor:pointer}
.npc-pop-btn:disabled{opacity:.6}
.npc-pop-msg{color:#c0392b;font-size:12px;min-height:14px;margin-top:6px}
