/* VORA Administrative Assistant 2.1.8 — premium, scoped conversation design.
   Visual changes are intentionally isolated to .vxa-chat and .vxa-nexa-view.
   NEXA Support cases, three-panel desk, ratings and Service Quality are untouched. */
.vxa-chat {
  --vxa-navy:#112746;
  --vxa-midnight:#101f3b;
  --vxa-purple:#62409e;
  --vxa-gold:#dbac4f;
  --vxa-cyan:#1aa9c6;
  --vxa-ink:#1b304f;
  --vxa-muted:#586a81;
  --vxa-border:#cddbeb;
  --vxa-shadow:0 24px 58px rgba(17,33,65,.20);
  color:var(--vxa-ink);
  font-family:inherit;
  isolation:isolate;
}
.vxa-chat [hidden]{display:none!important}
.vxa-chat *, .vxa-chat *::before, .vxa-chat *::after {box-sizing:border-box}
.vxa-chat button,.vxa-chat textarea{font-family:inherit}
.vxa-chat button{cursor:pointer}
.vxa-chat button:focus-visible,.vxa-chat textarea:focus-visible,.vxa-chat a:focus-visible {
  outline:3px solid #16b5d2;outline-offset:3px
}

/* Compact public launcher, independent of existing NEXA Support button. */
/* Give the launcher clear breathing room above phone navigation. */
.vxa-float{position:fixed;left:20px;bottom:34px;z-index:2500;max-width:calc(100vw - 20px)}
.vxa-chat .vxa-trigger {
  display:inline-flex;align-items:center;justify-content:center;min-height:46px;
  padding:12px 18px;max-width:min(315px,calc(100vw - 28px));
  border:1.5px solid #efcc78;border-radius:999px;
  background:linear-gradient(125deg,#122945 0%,#403270 66%,#6b3987 100%);
  color:#fff;font-size:clamp(11px,1.6vw,13px);font-weight:800;
  line-height:1.28;text-align:center;letter-spacing:.007em;white-space:normal;
  box-shadow:0 3px 0 rgba(255,219,139,.30) inset,0 10px 30px rgba(22,34,78,.26),0 0 0 4px rgba(246,220,161,.09);
  transition:transform .2s ease,box-shadow .2s ease,filter .2s ease;
}
.vxa-chat .vxa-trigger:hover{transform:translateY(-2px);filter:brightness(1.09);box-shadow:0 16px 38px rgba(22,34,78,.31),0 0 0 5px rgba(246,220,161,.18)}
.vxa-chat .vxa-trigger[aria-expanded="true"]{border-color:#d2edff;box-shadow:0 0 0 4px rgba(32,171,203,.18),0 13px 35px rgba(27,37,77,.29)}
/* Always take the chat panel out of launcher flow. This keeps the launcher
   anchored rather than forcing it upward as the conversation grows. */
.vxa-chat .vxa-public-panel.vxa-panel{
  position:absolute;left:0;bottom:calc(100% + 13px);
  width:min(490px,calc(100vw - 24px));
  height:min(730px,calc(100dvh - 112px));
  max-height:min(730px,calc(100dvh - 112px));
}
.vxa-chat .vxa-public-panel .vxa-chat-messages{
  flex:1 1 0;min-height:0;max-height:none;overflow-y:auto;
}

/* Premium frame: clearly defined gold outline, soft inner edge, readable surfaces. */
.vxa-chat .vxa-panel{
  position:relative;display:flex;flex-direction:column;min-height:475px;
  overflow:hidden;border:2px solid #d5b66b;border-radius:23px;
  background:#f7faff;
  box-shadow:var(--vxa-shadow),0 0 0 5px rgba(234,210,157,.12);
}
.vxa-chat .vxa-panel::before{
  content:"";position:absolute;inset:0;pointer-events:none;border-radius:21px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.78);z-index:3;
}
.vxa-chat .vxa-panel-head{
  position:relative;display:flex;align-items:center;gap:13px;flex:none;
  padding:19px 18px;min-height:100px;overflow:hidden;
  background:linear-gradient(115deg,#112a4b 2%,#28315e 55%,#5e357f 100%);
  border-bottom:2px solid rgba(224,181,85,.72);color:white;
}
.vxa-chat .vxa-panel-head::before{
  content:"✦";display:grid;place-items:center;flex:none;
  width:43px;height:43px;border-radius:15px;
  background:linear-gradient(145deg,rgba(242,202,108,.30),rgba(15,180,217,.24));
  border:1px solid rgba(255,230,174,.65);color:#ffe5a5;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 6px 18px rgba(0,0,0,.20);
  font-size:25px;position:relative;z-index:1;
}
.vxa-chat .vxa-panel-head::after{
  content:"";position:absolute;right:-85px;top:-110px;width:270px;height:270px;
  border-radius:50%;pointer-events:none;
  background:radial-gradient(circle,rgba(152,118,216,.38) 0%,rgba(71,150,194,.12) 48%,transparent 70%);
}
.vxa-chat .vxa-panel-head > div{flex:1;min-width:0;position:relative;z-index:1}
.vxa-chat .vxa-panel-head p{margin:0 0 5px;color:#aee5f3;font-size:10px;font-weight:850;letter-spacing:.15em;line-height:1.4}
.vxa-chat .vxa-panel-head h2{margin:0;color:#fff;font-size:clamp(15px,2.1vw,19px);font-weight:850;line-height:1.18;letter-spacing:-.012em;text-wrap:balance}
.vxa-chat .vxa-panel-head small{display:block;margin-top:6px;color:#f6ddb0;font-size:11px;line-height:1.45;font-weight:600}
.vxa-chat .vxa-x{
  position:relative;z-index:2;display:grid;place-items:center;flex:none;
  width:34px;height:34px;border:1px solid rgba(242,232,255,.5);border-radius:11px;
  background:rgba(255,255,255,.13);color:#fff;font-size:23px;line-height:1;
  transition:background .2s ease,transform .2s ease
}
.vxa-chat .vxa-x:hover{background:rgba(255,255,255,.27);transform:rotate(4deg)}
.vxa-chat .vxa-notice{
  display:flex;align-items:flex-start;gap:9px;flex:none;margin:0;
  padding:10px 17px 11px;border-bottom:1px solid #d8e4f3;
  background:linear-gradient(90deg,#e9f5fb,#f7f9ff 65%,#faf5ff);
  color:#365576;font-size:11.5px;font-weight:550;line-height:1.55;
}
.vxa-chat .vxa-notice::before{
  content:"◆";font-size:10px;line-height:1.7;color:#227b9e;flex:none;
}

/* Conversation canvas. */
.vxa-chat .vxa-chat-messages {
  display:flex;flex:1;flex-direction:column;gap:16px;
  min-height:175px;max-height:420px;overflow-y:auto;overscroll-behavior:contain;
  padding:23px 19px 20px;scroll-behavior:smooth;
  background:
    radial-gradient(ellipse at 8% 1%,rgba(68,171,215,.10),transparent 44%),
    radial-gradient(ellipse at 92% 95%,rgba(155,109,219,.10),transparent 45%),
    radial-gradient(#dce6f3 .55px,transparent .55px),
    linear-gradient(145deg,#f8fbff,#f3f6fd);
  background-size:auto,auto,18px 18px,auto;
  scrollbar-width:thin;scrollbar-color:#b9c7dd transparent;
}
.vxa-chat .vxa-chat-messages::-webkit-scrollbar{width:7px}
.vxa-chat .vxa-chat-messages::-webkit-scrollbar-thumb{background:#b9c7dd;border:2px solid #f6f9fd;border-radius:10px}
.vxa-chat .vxa-bubble{
  position:relative;align-self:flex-start;width:fit-content;
  max-width:min(91%,800px);min-width:170px;
  padding:14px 17px 15px 68px;
  /* Premium full-perimeter framing; not a top-only gold accent. */
  border:2px solid #c7a051;border-radius:20px 20px 20px 8px;
  background:linear-gradient(155deg,#fff 0%,#fff 62%,#f2f7ff 100%);
  box-shadow:0 0 0 3px rgba(222,189,112,.16),0 10px 26px rgba(17,48,88,.13),0 2px 0 rgba(255,255,255,.92) inset;
  color:#203b56;white-space:normal;overflow-wrap:anywhere;
  animation:vxa-bubble-in .24s ease both;
}
.vxa-chat .vxa-bubble-assistant::before,.vxa-chat .vxa-bubble-user::before{
  content:"✦";position:absolute;left:15px;top:14px;
  display:grid;place-items:center;width:37px;height:37px;border-radius:12px;
  background:linear-gradient(145deg,#153a64,#65479a);
  border:1px solid #c9a96c;color:#ffe6a6;font-size:22px;
  box-shadow:0 4px 9px rgba(26,41,77,.16);
}
.vxa-chat .vxa-bubble-assistant{border-color:#c7a051}
.vxa-chat .vxa-bubble-user{
  align-self:flex-end;padding:14px 65px 15px 17px;
  border:2px solid #d4ac63;
  border-radius:20px 20px 8px 20px;
  background:linear-gradient(135deg,#173c65,#47377a 75%,#5b3787);
  box-shadow:0 0 0 3px rgba(120,81,167,.16),0 10px 28px rgba(41,42,111,.23),0 1px 0 rgba(255,255,255,.15) inset;
  color:#fff;
}
.vxa-chat .vxa-bubble-user::before{
  content:"●";left:auto;right:15px;top:13px;
  background:linear-gradient(145deg,#fff1cb,#eed197);border:1px solid #d3b075;
  color:#314a72;font-size:14px;
}
.vxa-chat .vxa-message-meta{display:flex;gap:12px;align-items:baseline;justify-content:space-between;margin-bottom:6px;min-width:0}
.vxa-chat .vxa-message-meta strong{
  margin:0!important;display:block;font-size:11.5px;font-weight:850;line-height:1.36;
  letter-spacing:.005em;color:#234d76;overflow-wrap:normal;
}
.vxa-chat .vxa-message-time{
  margin-left:auto;font-size:10px;flex:none;white-space:nowrap;font-weight:650;color:#788ba2;
}
.vxa-chat .vxa-bubble-user .vxa-message-meta strong{color:#f9e3b9}
.vxa-chat .vxa-bubble-user .vxa-message-time{color:#c7d6f5}
.vxa-chat .vxa-bubble .vxa-body{
  color:#1d3653;font-size:13px;line-height:1.72;overflow-wrap:anywhere;min-width:0;
}
.vxa-chat .vxa-bubble-user .vxa-body{color:#fff;white-space:pre-wrap}
.vxa-chat .vxa-bubble .vxa-body p{margin:0;font-size:inherit;line-height:inherit;color:inherit}
.vxa-chat .vxa-bubble .vxa-rich{white-space:normal}
.vxa-chat .vxa-bubble .vxa-rich p{margin:0 0 11px}
.vxa-chat .vxa-bubble .vxa-rich > :last-child{margin-bottom:0}
.vxa-chat .vxa-bubble .vxa-rich strong{display:inline;color:inherit;font-size:inherit;font-weight:800;margin:0}
.vxa-chat .vxa-bubble .vxa-rich em{font-style:italic}
.vxa-chat .vxa-bubble .vxa-rich ul,.vxa-chat .vxa-bubble .vxa-rich ol{
  margin:5px 0 12px;padding-left:23px;list-style-position:outside
}
.vxa-chat .vxa-bubble .vxa-rich ul{list-style:disc}
.vxa-chat .vxa-bubble .vxa-rich ol{list-style:decimal}
.vxa-chat .vxa-bubble .vxa-rich li{display:list-item;margin:4px 0;padding:0;line-height:inherit;font-size:inherit}
.vxa-chat .vxa-bubble .vxa-rich h4,.vxa-chat .vxa-bubble .vxa-rich h5,.vxa-chat .vxa-bubble .vxa-rich h6{
  margin:12px 0 7px;color:#263e68;font-size:14px;font-weight:850;line-height:1.38
}
.vxa-chat .vxa-bubble .vxa-rich code{
  font-size:.91em;padding:2px 5px;border:1px solid #d8e6f3;
  border-radius:6px;background:#ecf3fb;color:#255077;
}
.vxa-chat .vxa-bubble .vxa-rich .vxa-answer-link{
  display:inline;color:#075c91;font-weight:750;font-size:inherit;
  text-decoration:underline;text-decoration-color:#76b8cf;text-underline-offset:3px;overflow-wrap:anywhere;
}
.vxa-chat .vxa-bubble .vxa-rich .vxa-answer-link:hover{color:#59438a;text-decoration-color:currentColor}
.vxa-chat .vxa-loading{border-color:#a8c9db;background:linear-gradient(110deg,#fff,#f0f8ff)}
.vxa-chat .vxa-loading .vxa-body::after{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;margin-left:5px;background:#24acc4;box-shadow:9px 0 #a5b4d8,18px 0 #d6bb86;vertical-align:middle;animation:vxa-thinking 1.2s ease-in-out infinite}
.vxa-chat .vxa-error{border-color:#d89a9a;background:#fff6f6}

/* Server-approved links and explicit action cards. */
.vxa-chat .vxa-chat-links{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 4px}
.vxa-chat .vxa-chat-links a{
  display:inline-flex;align-items:center;gap:6px;padding:9px 12px;
  border:1px solid #97cce0;border-radius:12px;text-decoration:none;
  color:#185978;background:#eaf8fe;font-size:11.5px;font-weight:800;
  box-shadow:0 3px 8px rgba(37,106,137,.07);transition:transform .2s,background .2s;
}
.vxa-chat .vxa-chat-links a::after{content:"↗";font-size:13px}
.vxa-chat .vxa-chat-links a:hover{background:#d5f1ff;transform:translateY(-1px)}
.vxa-chat .vxa-action-confirm{
  margin:3px 0;padding:17px;display:flex;flex-wrap:wrap;align-items:center;gap:10px;
  border:1.5px solid #d6b774;border-left:5px solid #b88b36;border-radius:16px;
  background:linear-gradient(130deg,#fffdf5,#f6f3ff);
  box-shadow:0 6px 18px rgba(58,47,98,.09);color:#243953;
}
.vxa-chat .vxa-action-confirm > strong,.vxa-chat .vxa-action-confirm > p{flex-basis:100%;margin:0;line-height:1.5}
.vxa-chat .vxa-action-confirm > strong{font-size:14px;color:#394271;font-weight:850}
.vxa-chat .vxa-action-confirm > p{font-size:12px}
.vxa-chat .vxa-action-cancel{
  border:1px solid #b5c3d1;border-radius:11px;background:white;color:#2f4a6b;
  padding:10px 13px;font-size:12px;font-weight:700
}
.vxa-chat .vxa-action-cancel:hover{background:#edf2fa}

/* Prompt chips and composer — separate visual surfaces, spacious but compact. */
.vxa-chat .vxa-quick{
  display:flex;flex:none;gap:8px;flex-wrap:wrap;padding:12px 16px;
  border-top:1px solid #dce6f1;background:#f8faff;
}
.vxa-chat .vxa-quick button{
  padding:9px 12px;border:1px solid #c9b8de;border-radius:999px;
  background:linear-gradient(135deg,#fbf9ff,#f0effb);color:#493a77;
  box-shadow:0 1px 0 #fff inset;font-size:11.5px;font-weight:750;line-height:1.35;
  transition:transform .18s,box-shadow .18s,background .18s;
}
.vxa-chat .vxa-quick button:hover{transform:translateY(-1px);background:#e8e4f8;box-shadow:0 5px 12px rgba(86,65,144,.10)}
.vxa-chat .vxa-form{
  display:flex;flex:none;align-items:flex-end;gap:10px;
  padding:14px 15px 15px;
  border-top:1px solid #d8e3f0;background:linear-gradient(145deg,#f0f6fd,#f8f8ff);
}
.vxa-chat .vxa-form textarea{
  flex:1;min-width:0;min-height:47px;max-height:150px;resize:vertical;
  padding:12px 13px;border:1.5px solid #b8cde1;border-radius:13px;
  background:#fff;color:#19324f;line-height:1.5;font-size:13px;
  box-shadow:0 1px 0 rgba(255,255,255,.9),0 2px 8px rgba(29,51,82,.05);
  transition:border-color .18s,box-shadow .18s;
}
.vxa-chat .vxa-form textarea::placeholder{color:#77879c;opacity:1}
.vxa-chat .vxa-form textarea:focus{border-color:#329db8;box-shadow:0 0 0 3px rgba(31,162,188,.13);outline:none}
.vxa-chat .vxa-send{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;
  min-width:79px;min-height:47px;padding:11px 14px;
  border:1px solid #286a96;border-radius:13px;
  background:linear-gradient(120deg,#12617f,#3e4a91 65%,#65418a);
  color:#fff;font-size:12.5px;font-weight:800;line-height:1.2;
  box-shadow:0 5px 13px rgba(29,73,120,.21),inset 0 1px 0 rgba(255,255,255,.20);
  transition:transform .18s,filter .18s,box-shadow .18s;
}
.vxa-chat .vxa-send::after{content:"➤";font-size:12px;opacity:.87}
.vxa-chat .vxa-send:hover:not(:disabled){transform:translateY(-1px);filter:brightness(1.06);box-shadow:0 8px 17px rgba(29,73,120,.26)}
.vxa-chat .vxa-send:disabled{opacity:.65;cursor:wait;transform:none}
.vxa-chat .vxa-human-handoff{
  display:flex;align-items:center;justify-content:center;gap:8px;flex:none;
  margin:0 14px 13px;padding:11px 13px;border-radius:12px;
  border:1px solid #81c7d8;background:linear-gradient(115deg,#e7f9fb,#e9f4ff);
  color:#155472;font-weight:800;font-size:12px;line-height:1.45;
}
.vxa-chat .vxa-human-handoff::before{content:"↗";font-size:17px}
.vxa-chat .vxa-human-handoff:hover{background:#d9f4fa}

/* Admin chat is a distinct workspace, never a replacement for the Support desk. */
.vxa-nexa-view{padding:12px 0}
.vxa-nexa-view .vxa-chat .vxa-panel{max-width:1140px;min-height:min(690px,78vh);margin:auto;border-radius:24px}
.vxa-nexa-view .vxa-chat .vxa-chat-messages{max-height:520px;min-height:300px;padding:24px 25px}
.vxa-nexa-view .vxa-chat .vxa-bubble{max-width:min(85%,870px)}
.vxa-nexa-view .vxa-chat .vxa-panel-head{min-height:103px;padding:20px 25px}
.vxa-nexa-view .vxa-chat .vxa-panel-head h2{font-size:20px}
.vxa-nexa-view .vxa-chat .vxa-bubble .vxa-body{font-size:13.5px}
.vxa-nexa-view .vxa-chat .vxa-quick{padding:14px 24px}
.vxa-nexa-view .vxa-chat .vxa-form{padding:17px 24px}

@keyframes vxa-bubble-in{from{opacity:.35;transform:translateY(7px)}to{opacity:1;transform:none}}
@keyframes vxa-thinking{50%{opacity:.35;transform:translateY(-3px)}}
@media (max-width:640px){
  .vxa-float{left:10px;bottom:calc(32px + env(safe-area-inset-bottom, 0px))}
  /* 2.1.6: Content-sized panel on phones. It grows as the conversation grows,
     but cannot occupy the whole empty PWA screen. Viewport JS positions it
     inside the ACTUAL visible area, above the software keyboard. */
  .vxa-chat .vxa-public-panel.vxa-panel {
    position:fixed;z-index:1;left:8px;right:8px;
    top:var(--vxa-ui-top, max(24px, env(safe-area-inset-top, 0px)));bottom:auto;
    width:calc(100vw - 16px);height:fit-content;
    max-height:var(--vxa-ui-max-height, min(76dvh, 640px));
    min-height:0;border-radius:17px;
  }
  .vxa-chat .vxa-public-panel .vxa-chat-messages {
    flex:0 1 auto;min-height:0!important;
    max-height:calc(var(--vxa-ui-max-height, 640px) - 190px)!important;
    overflow-y:auto;overscroll-behavior:contain;
  }
  .vxa-chat .vxa-panel{border-radius:17px}
  /* When the keyboard opens, preserve the conversation area instead of reserving
     space for shortcuts and a second support button. They return on blur. */
  .vxa-public-panel:focus-within .vxa-quick,
  .vxa-public-panel:focus-within .vxa-human-handoff{display:none}
  .vxa-public-panel:focus-within .vxa-notice{display:none}
  .vxa-public-panel:focus-within .vxa-panel-head{min-height:65px;padding-block:9px}
  .vxa-public-panel:focus-within .vxa-panel-head small{display:none}
  .vxa-chat .vxa-panel-head{min-height:84px;padding:14px 12px;gap:9px}
  .vxa-chat .vxa-panel-head::before{width:36px;height:36px;font-size:21px;border-radius:11px}
  .vxa-chat .vxa-panel-head h2{font-size:15px}
  .vxa-chat .vxa-panel-head small{font-size:10px}
  .vxa-chat .vxa-chat-messages,.vxa-nexa-view .vxa-chat .vxa-chat-messages{padding:14px 11px;gap:13px;max-height:47dvh}
  .vxa-chat .vxa-public-panel .vxa-chat-messages{max-height:none;min-height:0;padding:16px 14px;gap:15px}
  .vxa-chat .vxa-bubble,.vxa-nexa-view .vxa-chat .vxa-bubble{max-width:100%;min-width:0;padding:13px 13px 14px 52px;border-radius:17px 17px 17px 7px}
  .vxa-chat .vxa-bubble-user{padding:12px 51px 13px 11px!important;border-radius:17px 17px 7px 17px!important}
  .vxa-chat .vxa-bubble::before{width:29px;height:29px;left:11px;top:11px;font-size:17px;border-radius:10px}
  .vxa-chat .vxa-bubble-user::before{left:auto;right:11px}
  .vxa-chat .vxa-bubble .vxa-body,.vxa-nexa-view .vxa-chat .vxa-bubble .vxa-body{font-size:13px;line-height:1.65}
  .vxa-chat .vxa-message-meta{flex-wrap:wrap;gap:4px}
  .vxa-chat .vxa-message-meta strong{font-size:10.7px}
  .vxa-chat .vxa-message-time{font-size:9px}
  .vxa-chat .vxa-quick{gap:6px;padding:10px 12px}
  .vxa-chat .vxa-quick button{padding:8px 10px;font-size:10.5px}
  .vxa-chat .vxa-form,.vxa-nexa-view .vxa-chat .vxa-form{padding:12px 11px;gap:8px}
  .vxa-chat .vxa-form textarea{font-size:12px;padding:10px;min-height:43px}
  .vxa-chat .vxa-send{min-width:65px;min-height:43px;padding:8px 10px;font-size:11.5px}
  .vxa-nexa-view .vxa-chat .vxa-panel{min-height:440px;border-radius:17px}
  .vxa-nexa-view .vxa-chat .vxa-panel-head{padding:15px 12px}
  .vxa-nexa-view .vxa-chat .vxa-panel-head h2{font-size:15px}
}
@media (max-width:390px){
  .vxa-chat .vxa-panel-head p{font-size:9px;letter-spacing:.06em}
  .vxa-chat .vxa-panel-head h2{font-size:14px}
  .vxa-chat .vxa-panel-head::before{width:32px;height:32px}
  .vxa-chat .vxa-message-time{display:none}
  .vxa-chat .vxa-x{width:30px;height:30px}
}
@media (prefers-reduced-motion:reduce){
  .vxa-chat *{animation:none!important;transition:none!important;scroll-behavior:auto!important}
}
@media (forced-colors:active){
  .vxa-chat .vxa-panel,.vxa-chat .vxa-bubble,.vxa-chat button{border:1px solid CanvasText}
}


/* 2.1.4: Public desktop reading comfort. More canvas, less chrome.
   Only the public assistant is changed; Admin NEXA is deliberately untouched. */
@media (min-width:641px){
  .vxa-chat .vxa-public-panel.vxa-panel{
    width:min(700px,calc(100vw - 32px));
    height:min(850px,calc(100dvh - 108px));
    max-height:min(850px,calc(100dvh - 108px));
  }
  .vxa-chat .vxa-public-panel .vxa-panel-head{
    min-height:80px;padding:12px 18px;gap:12px;
  }
  .vxa-chat .vxa-public-panel .vxa-panel-head::before{
    width:38px;height:38px;border-radius:12px;font-size:23px;
  }
  .vxa-chat .vxa-public-panel .vxa-panel-head h2{font-size:18px}
  .vxa-chat .vxa-public-panel .vxa-notice{
    padding:8px 16px;line-height:1.4;font-size:11px;
  }
  .vxa-chat .vxa-public-panel .vxa-chat-messages{
    flex:1 1 0;min-height:0;max-height:none;
    padding:18px 19px 20px;gap:15px;
  }
  .vxa-chat .vxa-public-panel .vxa-bubble{max-width:min(94%,860px)}
  .vxa-chat .vxa-public-panel .vxa-bubble .vxa-body{font-size:14px;line-height:1.68}
  .vxa-chat .vxa-public-panel .vxa-quick{padding:8px 13px;gap:7px}
  .vxa-chat .vxa-public-panel .vxa-quick button{padding:7px 11px}
  .vxa-chat .vxa-public-panel .vxa-form{padding:9px 12px;gap:9px}
  .vxa-chat .vxa-public-panel .vxa-form textarea{
    height:58px;min-height:45px;max-height:145px;
  }
  .vxa-chat .vxa-public-panel .vxa-send{min-height:46px}
  .vxa-chat .vxa-public-panel .vxa-human-handoff{
    margin:0 12px 10px;padding:8px 11px;
  }
}
/* Keep the floating entry point above the phone's bottom browser/navigation chrome. */
@media (max-width:640px){
  .vxa-chat.vxa-float{
    bottom:calc(90px + env(safe-area-inset-bottom,0px));
  }
}


/* 2.1.5 — Public chat: reading first, compact non-conversation controls.
   Scope is restricted to the floating public assistant; NEXA Support and Admin
   chat layouts are deliberately unchanged. */
.vxa-chat .vxa-public-panel.vxa-panel .vxa-quick {
  display:flex;flex:none;flex-wrap:nowrap;align-items:center;
  gap:6px;padding:6px 11px;min-height:38px;
  overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;
}
.vxa-chat .vxa-public-panel.vxa-panel .vxa-quick button {
  flex:0 0 auto;white-space:nowrap;min-height:29px;
  padding:6px 10px;font-size:11px;line-height:1.15;
}
.vxa-chat .vxa-public-panel.vxa-panel .vxa-form {
  padding:8px 11px;gap:8px;align-items:center;
}
.vxa-chat .vxa-public-panel.vxa-panel .vxa-form textarea {
  height:47px;min-height:43px;max-height:96px;
  padding:10px 12px;font-size:13px;line-height:1.4;
}
.vxa-chat .vxa-public-panel.vxa-panel .vxa-send {
  flex:0 0 auto;min-height:43px;min-width:70px;
  padding:8px 11px;
}
.vxa-chat .vxa-public-panel.vxa-panel .vxa-human-handoff {
  flex:0 0 auto;align-self:stretch;min-height:32px;
  margin:0 11px 9px;padding:6px 11px;
  border-radius:11px;font-size:11px;line-height:1.25;
}
.vxa-chat .vxa-public-panel.vxa-panel .vxa-human-handoff::before {
  font-size:12px;
}
.vxa-chat .vxa-public-panel.vxa-panel .vxa-notice {
  padding:7px 13px;font-size:10.5px;line-height:1.4;
}
.vxa-chat .vxa-public-panel.vxa-panel .vxa-chat-messages {
  flex:1 1 0;min-height:0;max-height:none;overflow-y:auto;
}
@media (min-width:641px){
  .vxa-chat .vxa-public-panel.vxa-panel .vxa-panel-head {
    min-height:80px;padding:12px 17px;
  }
  .vxa-chat .vxa-public-panel.vxa-panel .vxa-chat-messages {
    padding:15px 17px;gap:12px;
  }
}
@media (max-width:640px){
  .vxa-chat .vxa-public-panel.vxa-panel .vxa-panel-head {
    min-height:78px;padding:10px 12px;
  }
  /* Keep the assistant title on screen while the keyboard is open. */
  .vxa-chat .vxa-public-panel.vxa-panel:focus-within .vxa-panel-head {
    min-height:62px;padding:8px 12px;
  }
  .vxa-chat .vxa-public-panel.vxa-panel .vxa-panel-head h2 {
    font-size:clamp(13px,3.7vw,15px);line-height:1.18;
  }
  .vxa-chat .vxa-public-panel.vxa-panel .vxa-chat-messages {
    padding:12px;gap:12px;
    flex:0 1 auto;min-height:0!important;
    max-height:calc(var(--vxa-ui-max-height, 640px) - 190px)!important;
  }
  .vxa-chat .vxa-public-panel.vxa-panel .vxa-quick {
    min-height:35px;padding:5px 9px;gap:5px;
  }
  .vxa-chat .vxa-public-panel.vxa-panel .vxa-quick button {
    min-height:27px;padding:5px 9px;font-size:10.5px;
  }
  .vxa-chat .vxa-public-panel.vxa-panel .vxa-form {
    padding:7px 9px;gap:7px;
  }
  .vxa-chat .vxa-public-panel.vxa-panel .vxa-form textarea {
    height:43px;min-height:42px;max-height:82px;
    font-size:13px;
  }
  .vxa-chat .vxa-public-panel.vxa-panel .vxa-human-handoff {
    min-height:30px;margin:0 9px 7px;
    padding:5px 9px;font-size:10.5px;
  }
  .vxa-chat.vxa-float {bottom:calc(90px + env(safe-area-inset-bottom, 0px));}
  /* Keyboard focus hides only optional controls, never the heading/title. */
  .vxa-chat .vxa-public-panel.vxa-panel:focus-within .vxa-quick,
  .vxa-chat .vxa-public-panel.vxa-panel:focus-within .vxa-human-handoff {
    display:none;
  }
}


/* 2.1.7 — Android installed PWA: keep the whole conversation visible while
   editing. Non-editing chat remains compact; the keyboard-open panel uses
   the visible viewport, with the composer anchored after a scrolling transcript.
   Strictly scoped to public VORA Administrative Assistant on phones. */
@media (max-width:640px) {
  .vxa-chat.vxa-float .vxa-public-panel.vxa-panel:focus-within {
    height:var(--vxa-ui-max-height, calc(100dvh - 64px));
    max-height:var(--vxa-ui-max-height, calc(100dvh - 64px));
    min-height:0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  .vxa-chat.vxa-float .vxa-public-panel.vxa-panel:focus-within .vxa-panel-head {
    flex:0 0 auto;
  }
  .vxa-chat.vxa-float .vxa-public-panel.vxa-panel:focus-within .vxa-chat-messages {
    flex:1 1 0!important;
    min-height:0!important;
    max-height:none!important;
    overflow-y:auto;
    overscroll-behavior:contain;
  }
  .vxa-chat.vxa-float .vxa-public-panel.vxa-panel:focus-within .vxa-form {
    flex:0 0 auto;
    position:relative;
    z-index:1;
    background:#f7faff;
  }
}

/* 2.1.8 — installed Android PWA status-bar and keyboard safety.
   Compact, bottom-anchored public assistant; independent of NEXA Admin and
   main VORA navigation. No system-bar overlap and no oversized blank canvas. */
@media (max-width:640px) {
  .vxa-chat.vxa-float .vxa-public-panel.vxa-panel {
    top:var(--vxa-ui-top, 68px);
    bottom:auto;
    height:fit-content;
    max-height:var(--vxa-ui-max-height, calc(100dvh - 80px));
    min-height:0;
    overscroll-behavior:contain;
  }
  .vxa-chat.vxa-float .vxa-public-panel.vxa-panel:focus-within {
    height:fit-content;
    max-height:var(--vxa-ui-max-height, calc(100dvh - 80px));
    min-height:0;
  }
  .vxa-chat.vxa-float .vxa-public-panel.vxa-panel .vxa-chat-messages {
    flex:0 1 auto!important;
    min-height:0!important;
    max-height:calc(var(--vxa-ui-max-height, 640px) - 245px)!important;
    overflow-y:auto;
  }
  .vxa-chat.vxa-float .vxa-public-panel.vxa-panel:focus-within .vxa-chat-messages {
    flex:0 1 auto!important;
    min-height:0!important;
    max-height:calc(var(--vxa-ui-max-height, 640px) - 145px)!important;
    overflow-y:auto;
  }
  .vxa-chat.vxa-float .vxa-public-panel.vxa-panel .vxa-x {
    min-width:42px;min-height:42px;
    touch-action:manipulation;
    z-index:10;
  }
}
