/* Nadi Assistant (Tanya Vanessa): floating launcher + floating chat window. Look follows the owner's reference (2026-10-24):
   dark navy to violet window, the Vanessa illustration as the background, glass bubbles, round icon chips, white pill composer.
   The window keeps its own dark palette in both themes. Mobile first: full screen up to 480px, 380px floating window above. */
.hv-fab { position: fixed; z-index: 1180; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); display: none; align-items: center; gap: 10px; min-height: 56px; padding: 6px 18px 6px 6px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #141E63, #4B3FD0 60%, #168AF4); box-shadow: 0 12px 32px rgba(10, 16, 60, .45); transition: transform .15s, box-shadow .15s; }
.hv-fab.show { display: inline-flex; }
.hv-fab:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(10, 16, 60, .55); }
.hv-fab:focus-visible, .hv-send:focus-visible, .hv-chip:focus-visible, .hv-link:focus-visible, .hv-iconbtn:focus-visible { outline: 2px solid #6DB6FF; outline-offset: 2px; }
.hv-fab-t { font-size: 14px; font-weight: 700; line-height: 1.1; white-space: nowrap; }
.hv-fab-s { font-size: 11px; color: rgba(255, 255, 255, .78); line-height: 1.2; margin-top: 2px; white-space: nowrap; }
/* the PWA install card also lives bottom-right: stack the launcher above it, hide it while the window is open */
body:has(.pwa-install-banner.visible) .hv-fab { bottom: calc(104px + env(safe-area-inset-bottom)); }
body.hv-open .pwa-install-banner, body.hv-open .hv-fab { display: none !important; }

.hv-ava-wrap { position: relative; flex: 0 0 auto; width: 44px; height: 44px; }
.hv-ava { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #1B2A63; box-shadow: 0 0 0 2px rgba(255, 255, 255, .28); }
.hv-ava-wrap::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #22C55E; border: 2px solid #141E63; }

.hv-panel { position: fixed; z-index: 1200; inset: 0; width: 100%; height: 100dvh; display: none; flex-direction: column; color: #fff; overflow: hidden; isolation: isolate;
  background: linear-gradient(170deg, #0E1A4A 0%, #141E63 52%, #1C2380 100%); }
.hv-panel.open { display: flex; }
/* the illustration is the window background, anchored bottom, faded into the gradient on top and sides */
.hv-panel::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: min(100%, 62vw, 260px); z-index: -1; pointer-events: none; background: url('/images/vanessa-help.jpg') center bottom / cover no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 34%); mask-image: linear-gradient(to bottom, transparent 0, #000 34%); }
@media (min-width: 481px) {
  .hv-panel { inset: auto 16px 16px auto; width: 380px; height: min(620px, calc(100dvh - 32px)); border-radius: 24px; border: 1px solid rgba(255, 255, 255, .16); box-shadow: 0 24px 70px rgba(3, 6, 25, .55); }
  .hv-panel::before { height: 240px; }
}

.hv-head { display: flex; align-items: center; gap: 12px; padding: 14px 12px 8px 16px; }
.hv-head .hv-ava-wrap { width: 52px; height: 52px; }
.hv-head .hv-ava { box-shadow: 0 0 0 3px rgba(109, 182, 255, .55), 0 0 22px rgba(105, 87, 232, .55); }
.hv-head .hv-ava-wrap::after { width: 13px; height: 13px; }
.hv-head-t { font-size: 20px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.hv-head-s { font-size: 12.5px; color: rgba(255, 255, 255, .75); margin-top: 2px; }
.hv-iconbtn { margin-left: auto; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: rgba(255, 255, 255, .88); border-radius: 12px; cursor: pointer; }
.hv-iconbtn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.hv-iconbtn svg, .hv-send svg, .hv-chip-i svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.hv-log { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 14px 10px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.hv-msg { max-width: 92%; padding: 11px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.hv-msg.bot { align-self: flex-start; background: rgba(18, 28, 96, .72); border: 1px solid rgba(255, 255, 255, .16); border-top-left-radius: 6px; backdrop-filter: blur(8px); }
.hv-msg.bot.hello { font-size: 16.5px; line-height: 1.5; padding: 14px 16px; max-width: 100%; border-radius: 20px; background: rgba(255, 255, 255, .13); }
.hv-msg.me { align-self: flex-end; background: linear-gradient(135deg, #168AF4, #6957E8); color: #fff; border-top-right-radius: 6px; }
.hv-msg img { display: block; max-width: 100%; border-radius: 10px; margin-bottom: 6px; }
.hv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hv-link { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(109, 182, 255, .65); background: rgba(22, 138, 244, .20); color: #D8EBFF; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.hv-link:hover { background: rgba(22, 138, 244, .34); }
.hv-link.quiet { border-color: rgba(255, 255, 255, .30); background: transparent; color: rgba(255, 255, 255, .85); }
.hv-typing { align-self: flex-start; color: rgba(255, 255, 255, .75); font-size: 13px; padding: 2px 4px; }

.hv-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hv-chip { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px 8px 8px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .11); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.25; text-align: left; cursor: pointer; transition: background .15s, border-color .15s; }
.hv-chip:hover { background: rgba(255, 255, 255, .20); border-color: rgba(255, 255, 255, .32); }
.hv-chip-i { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #168AF4, #6957E8); color: #fff; }
.hv-chip-i svg { width: 17px; height: 17px; }

.hv-shot { display: none; align-items: center; gap: 8px; padding: 6px 16px 0; font-size: 12px; color: rgba(255, 255, 255, .85); }
.hv-shot.on { display: flex; }
.hv-shot img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }
.hv-form { display: flex; align-items: flex-end; gap: 6px; margin: 8px 12px 6px; padding: 6px 6px 6px 8px; background: #fff; border-radius: 28px; box-shadow: 0 10px 30px rgba(3, 6, 25, .35); }
.hv-form textarea { flex: 1; min-height: 44px; max-height: 120px; resize: none; padding: 12px 6px; border: 0; background: transparent; color: #0F172A; font-size: 16px; line-height: 1.3; }
.hv-form textarea::placeholder { color: #7B8AA5; }
.hv-form textarea:focus { outline: none; }
.hv-form:focus-within { box-shadow: 0 0 0 2px #6DB6FF, 0 10px 30px rgba(3, 6, 25, .35); }
.hv-form .hv-iconbtn { margin-left: 0; color: #5B6B8A; }
.hv-form .hv-iconbtn:hover { background: #EEF2FA; color: #0F172A; }
.hv-send { width: 44px; height: 44px; border: 0; border-radius: 50%; background: linear-gradient(135deg, #168AF4, #6957E8); color: #fff; cursor: pointer; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; }
.hv-send:disabled { opacity: .5; cursor: not-allowed; }
.hv-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 18px calc(10px + env(safe-area-inset-bottom)); font-size: 12px; color: rgba(255, 255, 255, .8); }
.hv-online { display: inline-flex; align-items: center; gap: 6px; }
.hv-online::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #22C55E; }
