/* Floating widget: scoped independently of Divi sections and rows. */
.mbai { --mbai-ink:#173e55; --mbai-blue:#087da3; --mbai-sand:#fbf5e9; font:16px/1.5 'DM Sans',sans-serif; color:var(--mbai-ink); }
.mbai *, .mbai *::before, .mbai *::after { box-sizing:border-box; }
.mbai button, .mbai textarea { font:inherit; }
.mbai button { cursor:pointer; text-transform:none; letter-spacing:normal; margin:0; }
.mbai button:disabled { opacity:.55; cursor:wait; }
.mbai button:focus-visible, .mbai textarea:focus-visible, .mbai a:focus-visible { outline:3px solid #075d80; outline-offset:3px; }
.mbai button svg { display:block; flex-shrink:0; }
.mbai-launcher { position:fixed; z-index:999999; right:24px; bottom:max(24px,env(safe-area-inset-bottom)); display:grid; place-items:center; width:58px; height:58px; min-width:58px; min-height:58px; padding:0; border:1px solid #ffffff70; border-radius:50%; background:#075d80; color:#fff; box-shadow:0 8px 28px #123d5538; }
.mbai-launcher:hover { background:#064966; }
.mbai [hidden] { display:none!important; }
.mbai-panel { position:fixed; inset:auto 24px 24px auto; margin:0; padding:0; width:420px; max-width:calc(100vw - 32px); height:min(690px,calc(100dvh - 48px)); max-height:calc(100dvh - 48px); border:1px solid #c4e2e9; border-radius:22px; background:#fff; color:var(--mbai-ink); font:16px/1.5 'DM Sans',sans-serif; box-shadow:0 18px 70px #123d553d; overflow:hidden; }
.mbai-panel[open] { display:flex; flex-direction:column; animation:mbai-enter .18s ease-out; }
.mbai-panel::backdrop { background:#102e421f; }
.mbai-header { display:flex; justify-content:space-between; align-items:center; flex-shrink:0; gap:12px; padding:23px 18px 21px 24px; background:linear-gradient(130deg,#e5f6fa,#d3edf4); border-bottom:1px solid #bcdde6; }
.mbai-kicker { display:block; font-size:10px; font-weight:800; letter-spacing:1.5px; color:#30677b; }
.mbai .mbai-header h2 { margin:5px 0 4px; padding:0; color:var(--mbai-ink); font:600 25px/1.2 'Outfit','DM Sans',sans-serif; }
.mbai .mbai-header p { margin:0; padding:0; font-size:13px; color:#3c6376; }
.mbai-close { display:grid; place-items:center; width:44px; height:44px; flex:0 0 44px; border:1px solid #a9cdd8; background:#ffffff80; color:var(--mbai-ink); border-radius:50%; }
.mbai-close:hover { background:#fff; }
.mbai-header-actions { display:flex; align-items:center; gap:5px; flex-shrink:0; }
.mbai-reset { display:grid; place-items:center; width:44px; height:44px; flex:0 0 44px; border:0; border-radius:50%; background:transparent; color:var(--mbai-ink); }
.mbai-reset:hover { background:#ffffff99; }
.mbai-log { flex:1 1 auto; min-height:60px; overflow:auto; overscroll-behavior:contain; padding:20px 18px 10px; scrollbar-width:thin; }
.mbai-message { padding:13px 15px; margin:0 18px 14px 0; border:1px solid #e2eef1; border-radius:4px 16px 16px; background:#f1f8fa; color:#173e55; font-size:15px; line-height:1.6; overflow-wrap:anywhere; }
.mbai-message.mbav-user { margin:0 0 14px 25px; border-color:#eae0cd; border-radius:16px 4px 16px 16px; background:var(--mbai-sand); white-space:pre-wrap; }
.mbai .mbai-message p { margin:0 0 10px; padding:0; }
.mbai .mbai-message p:last-child { margin-bottom:0; }
.mbai .mbai-message ul, .mbai .mbai-message ol { margin:8px 0 12px; padding:0 0 0 21px; list-style-position:outside; }
.mbai .mbai-message ul { list-style-type:disc; }
.mbai .mbai-message ol { list-style-type:decimal; }
.mbai .mbai-message li { margin:5px 0; padding-left:2px; }
.mbai .mbai-message h3 { font:700 16px/1.4 'DM Sans',sans-serif; margin:12px 0 6px; padding:0; color:var(--mbai-ink); }
.mbai-quick-replies { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0 4px; }
.mbai .mbai-quick-replies button { min-height:44px; padding:8px 13px; border:1px solid #89c8d9; border-radius:999px; background:#fff; color:#075d80; font-size:13px; font-weight:700; line-height:1.25; text-align:center; }
.mbai .mbai-quick-replies button:hover { background:#ddf3f8; border-color:#087da3; }
.mbai-contacts { border-top:1px solid #cce3e9; margin-top:14px; padding-top:11px; }
.mbai-contact-heading { display:block; margin-bottom:8px; font-size:12px; font-weight:700; }
.mbai-contact-actions { display:flex; flex-direction:column; align-items:stretch; gap:7px; }
.mbai .mbai-contact-action { display:flex; align-items:center; min-height:44px; padding:9px 12px; border:1px solid #89c8d9; border-radius:9px; background:#fff; color:#075d80; font-size:13px; font-weight:600; line-height:1.4; text-decoration:none; overflow-wrap:anywhere; }
.mbai .mbai-contact-action:hover { background:#ddf3f8; border-color:#087da3; text-decoration:underline; }
.mbai-sources { border-top:1px solid #cce3e9; margin-top:13px; padding-top:9px; }
.mbai-sources span { display:block; font-size:11px; text-transform:uppercase; letter-spacing:1px; font-weight:700; }
.mbai-sources a { display:block; padding:10px 0; min-height:44px; color:#07617f; text-decoration:underline; text-underline-offset:3px; font-size:13px; line-height:1.5; }
.mbai-suggestions { flex-shrink:0; display:flex; flex-wrap:wrap; gap:6px; padding:7px 18px 12px; }
.mbai-suggestions button { min-height:44px; padding:7px 11px; border:1px solid #bcdbe4; border-radius:9px; background:#fff; color:#225b70; font-size:12px; font-weight:600; }
.mbai-suggestions button:hover { background:#eaf7fa; }
.mbai-form { margin:0; padding:0 18px; flex-shrink:0; }
.mbai-compose { display:flex; align-items:center; gap:8px; border:1px solid #afcfd9; border-radius:14px; background:#fff; padding:6px; }
.mbai textarea { display:block; width:100%; min-width:0; min-height:52px; max-height:100px; padding:8px; border:0; border-radius:8px; resize:none; background:#fff; color:#173e55; font-size:16px; line-height:1.4; }
.mbai textarea::placeholder { color:#627d89; opacity:1; }
.mbai-compose button { display:grid; place-items:center; width:46px; height:46px; flex:0 0 46px; padding:0; border:0; border-radius:11px; background:#087da3; color:#fff; }
.mbai .mbai-status { flex-shrink:0; margin:0; padding:5px 20px 0; min-height:23px; font-size:12px; line-height:1.5; color:#406b7e; }
.mbai-sr { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
/* Keep the scrollbar's width reserved while the modal locks page scrolling.
   The full-width Divi header and hero are measured against that content width. */
html.mbai-modal-open { overflow:hidden!important; scrollbar-gutter:stable; }
@keyframes mbai-enter { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
@media(max-width:600px) {
  .mbai-launcher { right:14px; bottom:max(14px,env(safe-area-inset-bottom)); width:56px; height:56px; min-width:56px; min-height:56px; }
  .mbai-panel { inset:var(--mbai-vtop,0px) 0 auto; width:100%; max-width:100%; height:var(--mbai-vheight,100dvh); max-height:var(--mbai-vheight,100dvh); border:0; border-radius:0; }
  .mbai-header { padding:calc(16px + env(safe-area-inset-top)) 15px 16px 20px; }
  .mbai .mbai-header h2 { font-size:24px; }
}
@media(max-height:480px) { .mbai-header { padding-top:10px; padding-bottom:10px; } .mbai-kicker,.mbai .mbai-header p { display:none; } .mbai-suggestions { padding-top:0; padding-bottom:5px; } }
@media(prefers-reduced-motion:reduce) { .mbai-panel[open] { animation:none; } }

.mbai .mbai-status[data-error="true"] { color:#9e2d3f; }
