/* Vihan Assist — free text + voice assistant */
.va-launcher {
  position: fixed;
  z-index: 180;
  right: 20px;
  bottom: 76px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 13px 8px 9px;
  border: 1px solid rgba(134, 194, 255, 0.4);
  border-radius: 999px;
  background: linear-gradient(135deg, #1457ce, #082c6b);
  color: #fff;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 620;
  box-shadow: 0 12px 35px rgba(0, 25, 70, 0.4);
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
}
.va-launcher:hover { transform: translateY(-2px); box-shadow: 0 16px 42px rgba(0, 25, 70, 0.5); }
.va-launcher .va-dot { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: rgba(255,255,255,.14); }
.va-launcher svg { width: 17px; height: 17px; }
.va-launcher .va-live { width: 5px; height: 5px; margin-left: 2px; border-radius: 50%; background: #78f0c0; box-shadow: 0 0 8px #78f0c0; }

.va-panel {
  position: fixed;
  z-index: 190;
  right: 20px;
  bottom: 127px;
  display: flex;
  flex-direction: column;
  width: min(372px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 155px));
  border: 1px solid rgba(136, 181, 243, 0.28);
  border-radius: 19px;
  background: #071425;
  color: #edf5ff;
  box-shadow: 0 28px 75px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(.985);
  transform-origin: bottom right;
  transition: opacity .16s, visibility .16s, transform .16s;
}
.va-panel.is-open { opacity: 1; visibility: visible; transform: none; }
.va-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 12px; border-bottom: 1px solid rgba(136, 181, 243, 0.15); background: radial-gradient(circle at 85% 0%, rgba(48, 128, 255, .28), transparent 64%); }
.va-head-avatar { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 10px; background: #e9f3ff; color: #0a2a5c; flex: 0 0 auto; }
.va-head-avatar svg { width: 19px; height: 19px; }
.va-head > div { flex: 1; min-width: 0; }
.va-head strong { display: block; font-size: 0.85rem; font-weight: 650; letter-spacing: -0.02em; }
.va-head small { display: flex; align-items: center; gap: 5px; margin-top: 2px; color: #9bb2cf; font-size: 0.57rem; }
.va-head small:before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #6ce2b8; }
.va-head-actions { display: flex; gap: 3px; }
.va-icon-btn { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #9bb2cf; cursor: pointer; }
.va-icon-btn:hover { border-color: rgba(136, 181, 243, 0.24); color: #fff; }
.va-icon-btn.is-on { color: #6ce2ff; background: rgba(108, 226, 255, 0.08); }
.va-icon-btn svg { width: 15px; height: 15px; }
.va-body { flex: 1; overflow-y: auto; padding: 15px 14px 8px; scrollbar-width: thin; }
.va-message { display: flex; gap: 7px; margin-bottom: 12px; align-items: flex-end; }
.va-message.user { justify-content: flex-end; }
.va-avatar { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 7px; background: rgba(108, 226, 255, .09); color: #6ce2ff; flex: 0 0 auto; }
.va-avatar svg { width: 13px; height: 13px; }
.va-bubble { max-width: 82%; padding: 9px 11px; border-radius: 11px 11px 11px 3px; background: rgba(255, 255, 255, .065); color: #dbe8f8; font-size: 0.72rem; line-height: 1.58; white-space: pre-line; overflow-wrap: anywhere; }
.va-message.user .va-bubble { border-radius: 11px 11px 3px 11px; background: #2168e8; color: #fff; }
.va-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 2px 14px 10px; }
.va-chip { padding: 5px 8px; border: 1px solid rgba(136, 181, 243, 0.23); border-radius: 999px; background: transparent; color: #adc3df; font: inherit; font-size: 0.57rem; cursor: pointer; }
.va-chip:hover { border-color: #6ce2ff; color: #fff; }
.va-form { display: flex; align-items: flex-end; gap: 5px; padding: 9px 10px calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(136, 181, 243, 0.15); background: rgba(3, 10, 21, .55); }
.va-form textarea { flex: 1; min-height: 35px; max-height: 94px; padding: 9px 10px; border: 1px solid rgba(136, 181, 243, 0.23); border-radius: 9px; background: rgba(255,255,255,.045); color: #eff6ff; font: inherit; font-size: 0.72rem; line-height: 1.45; resize: none; outline: 0; }
.va-form textarea:focus { border-color: #6ce2ff; box-shadow: 0 0 0 3px rgba(108, 226, 255, .09); }
.va-form textarea::placeholder { color: #7f96b3; }
.va-send, .va-mic { display: grid; place-items: center; width: 35px; height: 35px; border: 0; border-radius: 9px; background: #2168e8; color: #fff; cursor: pointer; flex: 0 0 auto; }
.va-send svg, .va-mic svg { width: 16px; height: 16px; }
.va-mic { border: 1px solid rgba(136, 181, 243, 0.23); background: transparent; color: #b5c9e2; }
.va-mic.is-listening { border-color: #ff7d7d; background: rgba(255, 85, 85, .13); color: #ff9d9d; animation: va-pulse 1.2s infinite; }
.va-mic[hidden] { display: none; }
.va-note { padding: 0 14px 8px; color: #7189a7; font-size: 0.51rem; line-height: 1.4; }
.va-status { padding: 0 14px 8px; color: #9bb2cf; font-size: 0.57rem; }
.va-panel[data-lang="hi"] .va-bubble, .va-panel[data-lang="te"] .va-bubble { font-size: 0.74rem; }
@keyframes va-pulse { 50% { box-shadow: 0 0 0 7px rgba(255, 90, 90, .08); } }
@media (max-width: 560px) {
  .va-launcher { right: 13px; bottom: 72px; padding: 7px 11px 7px 7px; font-size: .65rem; }
  .va-panel { right: 8px; bottom: 120px; width: calc(100vw - 16px); height: min(540px, calc(100vh - 145px)); border-radius: 15px; }
  .va-form textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .va-panel, .va-launcher { transition: none; }
  .va-mic.is-listening { animation: none; }
}
@media (max-width: 560px) {
  .va-launcher { width: 45px; height: 45px; padding: 0; justify-content: center; border-radius: 50%; }
  .va-launcher > span:nth-child(2), .va-launcher .va-live { display: none; }
  .va-launcher .va-dot { width: 29px; height: 29px; background: transparent; }
}
