/* Ambler AI chat bubble. Navy to match the site. Sits above the v16 mobile sticky bar. */
.ambler-chat{position:fixed;right:20px;bottom:20px;z-index:40;font-family:"Source Sans 3",system-ui,sans-serif;color:#1b2430}
.ambler-chat button,.ambler-chat input,.ambler-chat textarea{font-family:inherit}
.ambler-chat-launch{width:56px;height:56px;border:0;border-radius:50%;background:#1f3047;color:#fff;cursor:pointer;box-shadow:0 8px 24px rgba(21,34,52,.28);display:grid;place-items:center;padding:0}
.ambler-chat-launch:hover{background:#3a5576}
.ambler-chat-launch svg{width:26px;height:26px;fill:none;stroke:#fff;stroke-width:2}
.ambler-chat-launch[aria-expanded="true"]{display:none}
.ambler-chat-panel{display:none;width:min(360px,calc(100vw - 24px));height:min(520px,calc(100vh - 120px));background:#fff;border:1px solid #d5dde7;border-radius:12px;box-shadow:0 16px 40px rgba(21,34,52,.22);flex-direction:column;overflow:hidden}
.ambler-chat-panel.open{display:flex}
.ambler-chat-head{background:#1f3047;color:#fff;padding:14px 14px 14px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.ambler-chat-head h2{font-family:"Source Serif 4",Georgia,serif;font-size:1.05rem;font-weight:700;margin:0;color:#fff;letter-spacing:0}
.ambler-chat-head p{margin:2px 0 0;font-size:.82rem;color:#c9d8ec}
.ambler-chat-close{background:transparent;border:0;color:#fff;font-size:1.4rem;line-height:1;cursor:pointer;padding:4px 8px;border-radius:4px}
.ambler-chat-close:hover{background:rgba(255,255,255,.12)}
.ambler-chat-log{flex:1;overflow:auto;padding:16px 14px;background:#f6f8fb;display:flex;flex-direction:column;gap:10px}
.ambler-chat-msg{max-width:85%;padding:10px 12px;border-radius:10px;font-size:.95rem;line-height:1.45;white-space:pre-wrap}
.ambler-chat-msg.bot{align-self:flex-start;background:#fff;border:1px solid #d5dde7;color:#1b2430}
.ambler-chat-msg.user{align-self:flex-end;background:#1f3047;color:#fff;border:1px solid #1f3047}
.ambler-chat-msg.busy{color:#5b6878;font-style:italic;border-style:dashed}
.ambler-chat-formwrap{padding:12px 14px 14px;background:#fff;border-top:1px solid #d5dde7}
.ambler-chat-compose{display:flex;gap:8px;align-items:flex-end}
.ambler-chat-compose textarea{flex:1;resize:none;min-height:42px;max-height:96px;border:1px solid #d5dde7;border-radius:6px;padding:8px 10px;font-size:.95rem;color:#1b2430}
.ambler-chat-compose textarea:focus{outline:2px solid #3a5576;outline-offset:1px}
.ambler-chat-send{background:#1f3047;color:#fff;border:0;border-radius:6px;padding:10px 14px;font-weight:600;cursor:pointer;font-size:.95rem}
.ambler-chat-send:hover{background:#3a5576}
.ambler-chat-send:disabled{opacity:.6;cursor:not-allowed}
.ambler-chat-handoff{background:#fff;border:1px solid #d5dde7;border-radius:8px;padding:12px;margin-top:4px;align-self:stretch;max-width:none}
.ambler-chat-handoff p{margin:0 0 10px;font-size:.92rem;color:#1b2430}
.ambler-chat-handoff label{display:block;font-size:.82rem;font-weight:600;margin:0 0 4px}
.ambler-chat-handoff input,.ambler-chat-handoff textarea{width:100%;border:1px solid #d5dde7;border-radius:6px;padding:8px 10px;margin:0 0 10px;font-size:.95rem}
.ambler-chat-handoff button{background:#1f3047;color:#fff;border:0;border-radius:6px;padding:10px 14px;font-weight:600;cursor:pointer;width:100%}
.ambler-chat-handoff .ok{color:#1f3047;font-weight:600;margin:0}
.ambler-chat-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}

@media(max-width:720px){
  .ambler-chat{right:12px;bottom:16px}
  body.sticky-cta-on .ambler-chat{
    bottom:calc(88px + env(safe-area-inset-bottom, 0px));
  }
  .ambler-chat-panel{height:min(460px,calc(100vh - 200px))}
}

.ambler-chat-handoff .row{display:flex;gap:8px}
.ambler-chat-handoff .row > div{flex:1;min-width:0}
.ambler-chat-handoff input,.ambler-chat-handoff textarea{margin:0 0 8px}
.ambler-chat-handoff textarea{min-height:56px;max-height:80px}
.ambler-chat-handoff p{margin:0 0 8px}
.ambler-ts{position:fixed;left:0;bottom:0;width:0;height:0;overflow:hidden}
