/* ScaleBridge mobile chat UX fix. Load AFTER styles.css and chatbot-additions.css */
.chat-widget.is-open .chat-panel{display:flex!important;flex-direction:column!important;overflow:hidden!important;height:min(78dvh,690px)!important;max-height:calc(100dvh - 24px)!important;width:min(440px,calc(100vw - 24px))!important}
.chat-panel .chat-header{flex:0 0 auto!important;padding:12px 16px!important}
.chat-panel .chat-messages{flex:1 1 auto!important;min-height:0!important;max-height:none!important;overflow-y:auto!important;overscroll-behavior:contain;padding:14px!important}
.chat-panel .chat-bubble{overflow-wrap:anywhere;line-height:1.55;font-size:.9rem;margin-bottom:10px}
.chat-panel .chat-extra{flex:0 0 auto!important;padding:7px 12px 4px!important}
.chat-panel .chat-extra button{font:700 .84rem inherit!important;border-radius:12px!important;min-height:38px!important;padding:8px 12px!important}
.chat-panel .chat-form{flex:0 0 auto!important;display:flex!important;align-items:flex-end!important;gap:8px!important;padding:8px 12px!important;margin:0!important;border-top:1px solid #dfe6ee!important;background:#fff!important}
.chat-panel .chat-form textarea{display:block!important;flex:1 1 auto!important;width:100%!important;min-width:0!important;min-height:52px!important;max-height:125px!important;resize:vertical!important;overflow-y:auto!important;border:1px solid #c8d3df!important;border-radius:13px!important;padding:12px!important;font:400 16px/1.4 Inter,system-ui,sans-serif!important;color:#132033!important;background:#fff!important;box-sizing:border-box!important}
.chat-panel .chat-form button{flex:0 0 46px!important;width:46px!important;height:48px!important;min-height:48px!important;padding:0!important;display:grid!important;place-items:center!important;border:0!important;border-radius:12px!important;background:#081d36!important;color:#fff!important;font-size:1.25rem!important}
.chat-panel .chat-disclaimer{flex:0 0 auto!important;padding:0 12px 10px!important;font-size:.68rem!important;line-height:1.35!important;margin:0!important}
.chat-panel .chat-lead:not([hidden]){flex:0 1 auto!important;max-height:42dvh!important;overflow-y:auto!important}
@media(max-width:680px){.chat-widget.is-open .chat-panel{position:fixed!important;right:12px!important;bottom:max(12px,env(safe-area-inset-bottom))!important;height:min(78dvh,650px)!important;max-height:calc(100dvh - 24px)!important}.chat-panel .chat-header small{font-size:.7rem!important}}

/* Compact launcher when chat is closed: keep branding visible, avoid covering page */
@media(max-width:680px){
.chat-widget:not(.is-open){right:10px!important;bottom:max(10px,env(safe-area-inset-bottom))!important}
.chat-widget:not(.is-open) .chat-launcher{display:inline-flex!important;align-items:center!important;gap:5px!important;width:auto!important;max-width:calc(100vw - 20px)!important;height:38px!important;min-height:38px!important;padding:0 11px!important;border-radius:999px!important;font-size:.82rem!important;line-height:1!important;box-shadow:0 5px 15px rgba(6,22,41,.17)!important}
.chat-widget:not(.is-open) .chat-launcher span{display:inline!important;font-size:.77rem!important;line-height:1!important}
}

/* Readable, larger mobile CTA with controlled footprint */
@media(max-width:680px){
.chat-widget:not(.is-open) .chat-launcher{width:auto!important;height:50px!important;min-height:50px!important;padding:0 18px!important;border-radius:999px!important;font-size:1.06rem!important;gap:8px!important;box-shadow:0 9px 24px rgba(6,22,41,.22)!important}
.chat-widget:not(.is-open) .chat-launcher span{display:inline!important;font-size:.94rem!important;font-weight:850!important}
.chat-widget:not(.is-open){right:12px!important;bottom:max(14px,env(safe-area-inset-bottom))!important}
}
