.av-chat{max-width:560px;margin:30px auto;font-family:Manrope,Arial,sans-serif;font-size:15px;line-height:1.4;color:#10202a;background:#fff;border:1px solid #eadfd2;border-radius:24px;box-shadow:0 18px 45px rgba(16,32,42,.08);overflow:hidden;display:flex;flex-direction:column}
.av-chat *{box-sizing:border-box}

/* Floating site-wide widget (auto-injected via wp_footer) */
.av-chat-widget{position:fixed;bottom:calc(24px + env(safe-area-inset-bottom));right:calc(24px + env(safe-area-inset-right));z-index:99999;font-family:Manrope,Arial,sans-serif}
.av-chat-toggle{width:60px;height:60px;border-radius:50%;background:#e97800;border:none;color:#fff;font-size:26px;cursor:pointer;box-shadow:0 10px 30px rgba(16,32,42,.3);display:flex;align-items:center;justify-content:center;transition:.15s}
.av-chat-toggle:hover{transform:scale(1.06)}
/* max-height keeps the whole panel inside the viewport (it grows upward from the
   toggle button) so on short windows the header/starters never get pushed off
   the top of the screen — only the message thread inside shrinks and scrolls.
   The panel itself must be a flex container (not just its .av-chat child) —
   otherwise height:100% on .av-chat has no definite parent height to resolve
   against, flex-shrink never kicks in, and the thread never actually scrolls. */
.av-chat-panel{position:absolute;bottom:76px;right:0;width:380px;max-width:calc(100vw - 32px);max-height:calc(100vh - 96px);display:none;overflow:hidden}
.av-chat-panel.av-chat-open{display:flex;flex-direction:column}
.av-chat-panel .av-chat{margin:0;max-width:none;max-height:none;flex:1 1 auto;min-height:0}
.av-chat-panel .av-chat-head,
.av-chat-panel .av-chat-starters,
.av-chat-panel .av-chat-form{flex:0 0 auto}
.av-chat-panel .av-chat-thread{max-height:none;min-height:0;flex:1 1 auto}
.av-chat-panel .av-chat-form{padding:12px 16px}
.av-chat-panel .av-chat-send{padding:12px 16px}

@media (max-width:480px){
  .av-chat-widget{bottom:calc(16px + env(safe-area-inset-bottom));right:calc(16px + env(safe-area-inset-right))}
  .av-chat-panel{width:calc(100vw - 32px);right:-8px;max-height:calc(100vh - 88px)}
}

.av-chat-head{display:flex;align-items:center;gap:12px;padding:18px 20px;background:#fff8ef;border-bottom:1px solid #eadfd2}
.av-chat-avatar{font-size:22px;width:44px;height:44px;flex:0 0 44px;display:flex;align-items:center;justify-content:center;background:#fff;border-radius:50%;border:1px solid #eadfd2}
.av-chat-head strong{display:block;font-size:17px;color:#10202a}
.av-chat-head p{margin:2px 0 0;font-size:13px;color:#69757c}

.av-chat-starters{display:flex;flex-wrap:wrap;gap:8px;padding:14px 20px;border-bottom:1px solid #eadfd2}
.av-chat-panel .av-chat-starters{max-height:150px;overflow-y:auto}
/* Rounded-rect, not a full pill: a pill shape looks odd once the question text wraps to two lines. */
.av-chat-chip{border:1.5px solid #e2d4c5;background:#fff;border-radius:12px;padding:8px 14px;font-size:13px;font-weight:700;line-height:1.35;color:#24333b;cursor:pointer;transition:.18s;text-align:left}
.av-chat-chip:hover{border-color:#e97800;color:#e97800}

.av-chat-thread{flex:1;min-height:280px;max-height:480px;overflow-y:auto;padding:18px 20px;display:flex;flex-direction:column;gap:12px;background:#fffdf9}
.av-chat-thread:empty::before{content:"Pick a question above or type your own to get started.";color:#9aa3a8;font-size:13px}

.av-msg{max-width:88%;padding:12px 16px;border-radius:16px;font-size:14px;line-height:1.5}
.av-msg-user{align-self:flex-end;background:#e97800;color:#fff;border-bottom-right-radius:4px}
.av-msg-bot{align-self:flex-start;background:#fff;border:1px solid #eadfd2;border-bottom-left-radius:4px}
.av-msg-bot p{margin:0 0 8px}
.av-msg-bot p:last-child{margin-bottom:0}

.av-msg-typing{display:flex;gap:5px;align-items:center;padding:14px 16px}
.av-msg-typing span{width:7px;height:7px;border-radius:50%;background:#c7b8a4;display:inline-block;animation:avTypingBounce 1.1s infinite ease-in-out}
.av-msg-typing span:nth-child(2){animation-delay:.15s}
.av-msg-typing span:nth-child(3){animation-delay:.3s}
@keyframes avTypingBounce{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-4px);opacity:1}}

/* Markup rendered by AVoyager_Question_Engine::render_html(), shown inside .av-msg-bot */
.av-qa-card{font-size:14px}
.av-qa-question{display:none}
.av-qa-headline{font-weight:800;margin:0 0 8px;color:#10202a}
.av-qa-narrative{background:#fff8ef;border:1px solid #eadfd2;border-left:4px solid #e97800;border-radius:8px;padding:10px 12px;margin:0 0 10px;font-weight:600;color:#10202a}
.av-qa-facts{list-style:none;margin:0 0 10px;padding:0;display:grid;gap:4px}
.av-qa-facts li strong{color:#24333b}
.av-qa-overnight,.av-qa-safety{background:#fff3df;border-radius:10px;padding:10px 12px;margin:8px 0;color:#7a4a00}
.av-qa-faqs{margin-top:12px;border-top:1px solid #eadfd2;padding-top:10px}
.av-qa-faqs ul{margin:6px 0 0;padding-left:18px}
.av-qa-faqs li{margin-bottom:8px}
.av-qa-cta{margin-top:10px}
.av-qa-cta a{color:#e97800;font-weight:800;text-decoration:none}
.av-qa-cta a:hover{text-decoration:underline}

.av-lead-card{border-color:#e97800!important;background:#fff8ef!important}
.av-lead-row{margin-bottom:8px}
.av-lead-row input{width:100%;border:1px solid #dccfc0;border-radius:10px;padding:10px 12px;font-family:inherit;font-size:14px;background:#fff}
.av-lead-card .av-lead-submit{border:none;background:#e97800;color:#fff;font-weight:800;border-radius:10px;padding:10px 16px;cursor:pointer}
.av-lead-status{margin:8px 0 0;font-size:13px;color:#23a455}
.av-lead-status.av-lead-error{color:#dc2626}

.av-chat-form{display:flex;gap:10px;padding:14px 20px;border-top:1px solid #eadfd2;background:#fff}
.av-chat-input{flex:1 1 auto;min-width:0;border:1px solid #dccfc0;border-radius:999px;padding:12px 18px;font-family:inherit;font-size:14px}
.av-chat-input:focus{outline:none;border-color:#e97800}
.av-chat-send{flex:0 0 auto;white-space:nowrap;border:none;background:#e97800;color:#fff;font-family:inherit;font-size:14px;font-weight:800;border-radius:999px;padding:12px 22px;cursor:pointer}
.av-chat-send:hover{background:#cf6a00}

@media(max-width:600px){
  .av-chat{margin:16px;border-radius:18px}
  .av-chat-thread{max-height:60vh}
}
