#aai-root{--aai-ink:#29231f;--aai-muted:#746a63;--aai-cream:#fbf8f2;--aai-paper:#fffdf9;--aai-line:#e9e1d6;--aai-accent:#7d5a82;--aai-shadow:0 18px 60px rgba(32,25,20,.18);font-family:inherit}
#aai-launcher{position:fixed;right:22px;bottom:22px;z-index:99998;display:flex;align-items:center;gap:10px;min-height:60px;padding:10px 16px 10px 10px;border:1px solid var(--aai-line);border-radius:999px;background:rgba(255,253,249,.98);color:var(--aai-ink);box-shadow:0 16px 44px rgba(32,25,20,.20);cursor:pointer;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;backdrop-filter:blur(8px)}
#aai-panel{position:fixed;right:22px;bottom:22px;z-index:99999;width:min(390px,calc(100vw - 28px));height:min(650px,calc(100vh - 44px));background:var(--aai-paper);border:1px solid var(--aai-line);border-radius:22px;box-shadow:var(--aai-shadow);overflow:hidden;display:flex;flex-direction:column;color:var(--aai-ink)}
#aai-panel[hidden]{display:none}
.aai-header{display:flex;align-items:center;justify-content:space-between;padding:16px 17px;background:var(--aai-cream);border-bottom:1px solid var(--aai-line)}
.aai-header strong{display:block;font-size:15px}.aai-header span{display:block;color:var(--aai-muted);font-size:11px;margin-top:2px}
.aai-header-actions{display:flex;gap:5px}.aai-header-actions button{width:34px;height:34px;border:0;border-radius:50%;background:transparent;color:var(--aai-ink);font-size:21px;cursor:pointer}
.aai-messages{flex:1;overflow-y:auto;padding:16px;scroll-behavior:smooth}
.aai-msg{display:flex;margin:0 0 11px}.aai-msg>div{max-width:84%;padding:10px 12px;border-radius:15px;font-size:13.5px;line-height:1.48;white-space:normal}
.aai-assistant{justify-content:flex-start}.aai-assistant>div{background:#f3eee7;border-bottom-left-radius:5px}
.aai-user{justify-content:flex-end}.aai-user>div{background:var(--aai-accent);color:#fff;border-bottom-right-radius:5px}
.aai-quick{padding:0 13px 10px;display:flex;gap:7px;flex-wrap:wrap}.aai-quick[hidden]{display:none}
.aai-quick button{border:1px solid var(--aai-line);background:#fff;border-radius:999px;padding:7px 10px;font-size:11.5px;color:var(--aai-ink);cursor:pointer}
.aai-form{display:flex;gap:8px;padding:11px 12px;border-top:1px solid var(--aai-line);background:#fff}
.aai-form[hidden]{display:none}.aai-form textarea{flex:1;resize:none;max-height:100px;border:1px solid var(--aai-line);border-radius:14px;padding:10px 12px;outline:none;font:inherit;font-size:13px;color:var(--aai-ink);background:#fff}
.aai-form textarea:focus{border-color:#c9b7cc}.aai-form button{height:40px;min-width:76px;padding:0 14px;border:0;border-radius:999px;background:var(--aai-accent);color:#fff;font-size:12px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;flex:0 0 auto}
.aai-privacy{text-align:center;padding:0 8px 8px;color:#958a82;background:#fff;font-size:9.5px}
.aai-lead-form{margin:0 13px 11px;padding:13px;border:1px solid var(--aai-line);border-radius:15px;background:var(--aai-cream)}
.aai-lead-form[hidden]{display:none}.aai-lead-form p{font-size:12px;color:var(--aai-muted);margin:0 0 9px}
.aai-lead-form input,.aai-lead-form textarea{width:100%;box-sizing:border-box;border:1px solid var(--aai-line);border-radius:10px;background:#fff;padding:9px 10px;margin:0 0 7px;font:inherit;font-size:12px}
.aai-lead-form textarea{min-height:72px;resize:vertical}.aai-form-actions{display:flex;justify-content:flex-end;gap:7px}.aai-form-actions button{border:1px solid var(--aai-line);border-radius:999px;padding:7px 10px;background:#fff;cursor:pointer}.aai-form-actions button[type=submit]{background:var(--aai-accent);border-color:var(--aai-accent);color:#fff}
.aai-hp{position:absolute!important;left:-9999px!important;opacity:0!important;pointer-events:none!important}
.aai-typing>div{display:flex;gap:4px}.aai-typing span{width:6px;height:6px;border-radius:50%;background:#998f88;animation:aaiDot 1s infinite alternate}.aai-typing span:nth-child(2){animation-delay:.2s}.aai-typing span:nth-child(3){animation-delay:.4s}
@keyframes aaiDot{to{opacity:.25;transform:translateY(-2px)}}
@media(max-width:600px){#aai-launcher{right:14px;bottom:14px}#aai-panel{right:7px;bottom:7px;width:calc(100vw - 14px);height:min(720px,calc(100vh - 14px));border-radius:18px}}

.aai-msg .aai-link{display:inline-block;margin-top:5px;color:#69456f;text-decoration:underline;text-underline-offset:2px;font-weight:700;overflow-wrap:anywhere}
.aai-user .aai-link{color:#fff}
.aai-msg strong{font-weight:750}
.aai-form-actions button:disabled,.aai-form button:disabled{opacity:.55;cursor:not-allowed}

#aai-launcher:hover{transform:translateY(-2px);box-shadow:0 20px 54px rgba(32,25,20,.24);border-color:#d8c9db}
#aai-launcher:focus-visible{outline:3px solid rgba(125,90,130,.22);outline-offset:3px}
.aai-launcher-icon{width:40px;height:40px;border-radius:50%;background:linear-gradient(145deg,#8e6a94,#76547c);color:#fff;display:flex;align-items:center;justify-content:center;font-size:18px;flex:0 0 40px;box-shadow:inset 0 1px 0 rgba(255,255,255,.3)}
.aai-launcher-text{display:flex;flex-direction:column;align-items:flex-start;line-height:1.05;white-space:nowrap}
.aai-launcher-text strong{font-size:14px;font-weight:750;color:#2d2521;letter-spacing:.01em}
.aai-launcher-text small{font-size:10.5px;color:#81756e;margin-top:5px;letter-spacing:.01em}
.aai-header-brand{display:flex;align-items:center;gap:10px;min-width:0}
.aai-header-mark{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;flex:0 0 34px;background:linear-gradient(145deg,#f7efe8,#efe4f2);border:1px solid #e6dbe9;color:#7d5a82;font-weight:800;font-size:15px}
.aai-header-brand>div{min-width:0}
.aai-header-brand strong{display:block;font-size:14px;line-height:1.2}
.aai-header-brand span:not(.aai-header-mark){display:block;color:var(--aai-muted);font-size:10.5px;margin-top:3px;line-height:1.25}
@media(max-width:600px){#aai-launcher{right:14px;bottom:14px;padding:9px 13px 9px 9px;min-height:56px}.aai-launcher-icon{width:38px;height:38px;flex-basis:38px}.aai-launcher-text strong{font-size:13px}.aai-launcher-text small{display:none}}

.aai-header-avatar{width:36px;height:36px;border-radius:50%;object-fit:cover;display:block;flex:0 0 36px;border:1px solid #e7ddd2;box-shadow:0 2px 8px rgba(32,25,20,.08)}
.aai-launcher-icon svg,.aai-header-mark svg{display:block}
.aai-quick{align-items:center}
.aai-quick button{transition:background .15s ease,border-color .15s ease,transform .15s ease}
.aai-quick button:hover{background:#fbf6ef;border-color:#d9ccd9;transform:translateY(-1px)}
#aai-order-number[hidden]{display:none}
@media(max-width:600px){
  .aai-form button{min-width:68px;padding:0 12px}
  .aai-form textarea{min-height:42px}
}

/* v1.2: launcher follows site-specific Settings, no Arahuaca hardcoded purple. */
#aai-root .aai-launcher-icon{background:var(--aai-launcher-color,var(--aai-accent))}
#aai-root #aai-launcher:hover{border-color:var(--aai-launcher-color,var(--aai-accent))}
#aai-root #aai-launcher:focus-visible{outline-color:var(--aai-launcher-color,var(--aai-accent))}
#aai-root .aai-form textarea:focus{border-color:var(--aai-accent)}

.aai-lead-form [hidden]{display:none!important}.aai-lead-form{max-height:none;overflow:visible}

#aai-root .aai-smart-capture .aai-form-actions{display:flex;flex-direction:column;align-items:stretch;gap:4px}
#aai-root .aai-smart-capture .aai-form-actions button[type=submit]{order:-1;width:100%;min-height:42px;border-radius:10px;text-align:center;white-space:normal;line-height:1.3;padding:10px 12px;font-weight:600}
#aai-root .aai-smart-capture #aai-lead-cancel{background:transparent;border:0;border-radius:0;color:var(--aai-muted);text-align:center;font-size:12px;min-height:36px;padding:6px;white-space:normal;line-height:1.4}

/* Beta 6: one scroll region; preserve all existing form fields and actions. */
#aai-root .aai-messages{min-height:0;scroll-behavior:auto;overscroll-behavior:contain}
#aai-root .aai-header,#aai-root .aai-quick,#aai-root .aai-form,#aai-root .aai-privacy{flex-shrink:0}
#aai-root .aai-messages .aai-lead-form{margin:8px 0 4px;max-height:none;overflow:visible;position:relative}
#aai-root .aai-lead-title{display:block;font-size:14px;margin-bottom:5px}
#aai-root .aai-contact-summary{display:flex;align-items:center;gap:8px;background:#fff;border:1px solid var(--aai-line);border-radius:10px;padding:9px;margin-bottom:8px;font-size:12px;overflow-wrap:anywhere}
#aai-root .aai-contact-summary>div{flex:1;min-width:0}
#aai-root .aai-contact-summary button{background:#fff;color:var(--aai-accent);border:1px solid var(--aai-line);border-radius:8px;padding:7px;cursor:pointer}
#aai-root .aai-compact-contact input[name=name],#aai-root .aai-compact-contact input[name=email],#aai-root .aai-compact-contact input[name=phone],#aai-root .aai-compact-contact input[name=company]{display:none}
#aai-root .aai-lead-form textarea{min-height:48px;max-height:120px}
#aai-root .aai-smart-capture #aai-lead-cancel:not([hidden]){display:block;width:100%;border:1px solid var(--aai-line);border-radius:10px;background:#fff;min-height:40px}
@supports(height:100dvh){#aai-panel{height:min(650px,calc(100dvh - 44px))}@media(max-width:600px){#aai-panel{height:min(720px,calc(100dvh - 14px))}}}

#aai-root .aai-followup-consent{display:flex;align-items:flex-start;gap:8px;font-size:12px;line-height:1.45;margin:5px 0 10px;color:var(--aai-muted)}
#aai-root .aai-followup-consent input{width:16px;height:16px;flex:0 0 16px;margin:2px 0 0;padding:0;accent-color:var(--aai-accent)}
#aai-root .aai-followup-consent[hidden]{display:none!important}
