/* Khung chat trợ lý (v4). Nút nổi nằm trong nova-pages.css; tệp này chỉ có khung chat, nạp sau (không chặn hiển thị trang). Không !important. */
.nvchat{--c-ink:#202b3a;--c-paper:#f2f0e5;--c-card:#fffef8;--c-line:#c7c8b9;--c-navy:#173b77;--c-red:#bc352c;--c-yellow:#f5d54d;--c-muted:#5a6068;--c-font:'Be Vietnam Pro','Be Vietnam Pro Fallback',Arial,sans-serif;position:fixed;z-index:9600;right:14px;bottom:14px;width:380px;max-width:calc(100vw - 28px);height:min(580px,calc(100dvh - 28px));display:none;flex-direction:column;background:var(--c-card);color:var(--c-ink);border:1px solid var(--c-ink);box-shadow:0 18px 50px #202b3a47;overflow:hidden;font:400 15px/1.5 var(--c-font)}
.nvchat.is-open{display:flex}
.nvchat-head{display:flex;align-items:center;gap:10px;padding:12px 14px;background:var(--c-navy);color:#fff;border-bottom:4px solid var(--c-yellow)}
.nvchat-head strong{flex:1;font-size:16px;font-weight:800;letter-spacing:-.01em}
.nvchat-head small{display:block;font-weight:500;font-size:13px;color:#dbe3f2;letter-spacing:0}
.nvchat-close{flex:none;display:inline-flex;align-items:center;gap:6px;height:44px;padding:0 16px 0 12px;border:0;border-radius:0;background:var(--c-yellow);color:var(--c-navy);font:800 16px/1 var(--c-font);cursor:pointer}
.nvchat-close span{font-size:22px;line-height:1}
.nvchat-close:hover{background:#ffe37a}
.nvchat-close:focus-visible,.nvchat-form input:focus-visible,.nvchat-form button:focus-visible,.nvchat-chips button:focus-visible{outline:3px solid var(--c-red);outline-offset:2px}
.nvchat-log{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:8px;background:var(--c-paper);overscroll-behavior:contain}
.nvchat-msg{max-width:88%;padding:9px 12px;white-space:pre-wrap;word-break:break-word}
.nvchat-msg.is-bot{align-self:flex-start;background:var(--c-card);border:1px solid var(--c-line);border-left:4px solid var(--c-navy)}
.nvchat-msg.is-user{align-self:flex-end;background:var(--c-navy);color:#fff}
.nvchat-msg a{color:var(--c-navy);font-weight:700;text-decoration:underline;word-break:break-all}
.nvchat-msg.is-user a{color:#fff}
.nvchat-note{padding:0 12px 6px;background:var(--c-paper);font-size:13px;color:var(--c-muted)}
.nvchat-chips{display:flex;flex-wrap:wrap;gap:6px}
.nvchat-chips button{min-height:40px;padding:6px 12px;border:1px solid var(--c-navy);border-radius:0;background:transparent;color:var(--c-navy);font:600 14px var(--c-font);cursor:pointer}
.nvchat-chips button:hover{background:#e6e7d9}
.nvchat-typing{align-self:flex-start;padding:2px 6px;font-size:13px;color:var(--c-muted)}
.nvchat-help{display:flex;gap:14px;padding:6px 12px;background:var(--c-paper);border-top:1px solid var(--c-line);font-size:14px}
.nvchat-help a{display:inline-flex;align-items:center;min-height:36px;color:var(--c-ink);font-weight:700;text-decoration:underline}
.nvchat-form{display:flex;gap:8px;padding:10px;border-top:1px solid var(--c-ink);background:var(--c-card)}
.nvchat-form input{flex:1;min-width:0;height:46px;padding:0 12px;border:1px solid var(--c-line);border-radius:0;background:var(--c-card);color:inherit;font:400 16px var(--c-font)}
.nvchat-form input:focus{border-color:var(--c-navy)}
.nvchat-form button{height:46px;padding:0 20px;border:1px solid var(--c-red);border-radius:0;background:var(--c-red);color:#fff;font:800 16px var(--c-font);cursor:pointer}
.nvchat-form button:hover:not(:disabled){background:#a12b23}
.nvchat-form button:disabled{opacity:.55;cursor:default}
html.nvchat-lock,html.nvchat-lock body{overflow:hidden;overscroll-behavior:none}
@media (max-width:760px){
  .nvchat{inset:0;width:auto;max-width:none;height:100dvh;border:0}
  .nvchat-head{padding:12px 14px;padding-top:max(12px,env(safe-area-inset-top))}
  .nvchat-close{height:48px;padding:0 18px 0 14px;font-size:17px}
  .nvchat-log{padding:14px 12px;gap:10px}
  .nvchat-msg{max-width:92%;font-size:16px}
  .nvchat-chips button{min-height:44px;padding:8px 14px}
  .nvchat-help{gap:0;padding:0;font-size:15px}
  .nvchat-help a{flex:1;justify-content:center;min-height:48px;padding:0 8px;text-decoration:none}
  .nvchat-help a+a{border-left:1px solid var(--c-line)}
  .nvchat-form{padding:10px 10px calc(10px + env(safe-area-inset-bottom))}
  .nvchat-form button{min-width:72px}
}
@media (prefers-reduced-motion:no-preference){
  .nvchat.is-open{animation:nvchat-in .18s ease-out}
  @keyframes nvchat-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
}
