#chat-fab{position:fixed;z-index:20;right:25px;bottom:24px;border:0;border-radius:30px;background:#232323;color:#fff;padding:16px 20px;box-shadow:0 5px 25px #0003}#chat-fab span{margin-left:8px}.chat{position:fixed;z-index:21;right:25px;bottom:20px;width:370px;max-width:calc(100vw - 24px);height:565px;max-height:calc(100vh - 46px);background:#fff;box-shadow:0 6px 40px #0004;display:flex;flex-direction:column;border-radius:10px;overflow:hidden;border:1px solid #ddd}.chat-head{padding:20px 19px;background:#242424;color:white;display:flex;justify-content:space-between}.chat-head strong{font-size:17px}.chat-head small{font-size:10px;color:#ddd;border:1px solid #888;padding:3px 5px;margin-left:6px}.chat-head p{margin:7px 0 0;color:#ccc;font-size:11px}.chat-head button{background:none;border:0;color:#fff;font-size:25px;align-self:flex-start}.chat-setup{padding:23px;overflow-y:auto}.chat-setup h3{font-size:22px;font-weight:500;margin:0}.chat-setup p{font-size:13px;color:#666;line-height:1.5}.chat-setup form{display:flex;flex-direction:column;gap:14px;margin-top:19px}.chat-setup label{font-size:12px;color:#444;display:flex;flex-direction:column;gap:6px}.chat-setup input:not([type=checkbox]){padding:12px;border:1px solid #ddd;width:100%;border-radius:3px}.chat-setup .consent{display:flex;flex-direction:row;line-height:1.5;align-items:flex-start}.chat-setup .consent input{margin:3px 5px 0 0}.primary{background:#222;border:0;color:#fff;padding:14px}.err{color:#ab142b!important}.chat-active{display:flex;flex-direction:column;min-height:0;flex:1}.chat-messages{padding:17px;flex:1;overflow-y:auto;background:#f8f8f8;display:flex;flex-direction:column;gap:11px}.bubble{max-width:85%;border:1px solid #e4e4e4;border-radius:11px;padding:10px 12px;background:white;line-height:1.45;font-size:13px;white-space:pre-wrap;overflow-wrap:anywhere}.bubble.visitor{background:#273b4f;color:#fff;align-self:flex-end}.bubble.system{background:#e8eef2;color:#435b6c;align-self:center;font-size:11px;text-align:center}.message-form{border-top:1px solid #ddd;display:flex;padding:10px;gap:8px}.message-form input{flex:1;min-width:0;padding:9px;border:1px solid #ddd}.message-form button{border:0;background:#222;color:#fff;padding:0 15px}@media(max-width:700px){.chat{right:12px;bottom:12px}.chat-head{padding:16px}}

.hidden{display:none!important;}#chat-fab,#chat,#chat *{box-sizing:border-box}#chat button,#chat input,#chat-fab{font-family:"BMW Type Next Light",Arial,sans-serif}#chat-fab,.chat-head,.chat .primary,.message-form button{background:#1c69d4!important}.bubble.visitor{background:#1c69d4}#independent-demo-notice{position:relative;z-index:1100;background:#192d4b;color:#fff;text-align:center;font:600 11px/1.4 Arial,sans-serif;letter-spacing:.6px;padding:7px 12px}.logo-demo-mark{display:inline-block;margin-left:8px;border:1px solid #1c69d4;color:#1c69d4;padding:2px 5px;font:700 11px Arial,sans-serif}#chat{z-index:11000}#chat-fab{z-index:10999}[data-demo-inactive="1"]{cursor:default}

/* === demo layout fixes v2 === */
html,body{overflow-x:hidden}
.row{display:flex!important}
.row>[class*="col-"]{display:block!important}
.d-flex{display:flex!important}
.d-none{display:none!important}
#mainwrapper [class*="col-"] img,#mainwrapper img{max-width:100%;height:auto}
body>iframe, .sidebar-sticky, .scroll_up, ago-accessibility-widget{display:none!important}
#independent-demo-notice{position:sticky;top:0;z-index:12000}
.logo-demo-mark{vertical-align:middle}
#map,#mapf{position:relative!important;background:#ececec;min-height:420px;overflow:hidden}
#mapf{min-height:500px}
.demo-leaflet-map{width:100%;height:100%;min-height:inherit}
.leaflet-container{width:100%;height:100%;font-family:"BMW Type Next Light",Arial,sans-serif}
#accordionEmployees709 .accordion-button{cursor:pointer}
#accordionEmployees709 .accordion-collapse{display:none}
#accordionEmployees709 .accordion-collapse.show{display:block!important}
#accordionEmployees709 .accordion-button::after{content:'+';margin-left:auto;font-size:26px;line-height:1;color:#666}
#accordionEmployees709 .accordion-button[aria-expanded="true"]::after{content:'−'}
#accordionEmployees709 .card{height:100%}
#accordionEmployees709 .card-img-top{display:block;width:100%;height:auto}
#chat-fab{z-index:11001;border-radius:999px}
#chat{z-index:11002;right:18px;bottom:18px;width:440px;max-width:calc(100vw - 36px);border-radius:16px;border:1px solid #d8d8d8;box-shadow:0 12px 40px rgba(0,0,0,.18);overflow:hidden}
#chat.chat--setup-mode{height:auto;max-height:calc(100vh - 80px)}
#chat.chat--active-mode{height:min(72vh,760px)}
#chat.chat--maximized{width:min(760px,calc(100vw - 36px))!important;height:min(88vh,920px)!important}
.chat-head{padding:18px 20px;align-items:flex-start;gap:10px}
.chat-head .chat-title-wrap{flex:1;min-width:0}
.chat-head .chat-controls{display:flex;gap:6px;align-items:center}
.chat-head button{width:32px;height:32px;line-height:32px;border-radius:6px;background:rgba(255,255,255,.12)!important;font-size:22px}
.chat-head p{font-size:13px;color:#dbe7fa}
.chat-setup{padding:22px 26px 26px;overflow:visible}
.chat-setup form{gap:12px}
.chat-setup input:not([type=checkbox]){height:54px;padding:14px 12px;border-radius:4px}
.chat-setup .primary{margin-top:2px;height:62px;font-size:17px;border-radius:0}
.chat-active{min-height:0;flex:1}
.chat-messages{overflow-y:auto}
.hidden{display:none!important}
@media(max-width:900px){
  #chat{right:12px;left:12px;bottom:12px;width:auto;max-width:none}
  #chat.chat--maximized{width:auto!important;height:min(92vh,920px)!important}
}

/* PATCH V3 – original site spacing and compact no-scroll chat */
#independent-demo-notice,.logo-demo-mark{display:none!important}
#map,#mapf{padding:0!important;background:white;min-height:420px}
#map iframe,#mapf iframe{width:100%!important;height:100%!important;min-height:420px}
#mapf,#mapf iframe{min-height:540px!important}
#chat.chat--setup-mode{height:auto!important;max-height:calc(100vh - 22px)!important;width:385px!important}
#chat .chat-setup{padding:15px 19px!important;overflow:visible!important}
#chat .chat-setup h3{font-size:22px!important;line-height:1.2}
#chat .chat-setup p{margin:4px 0 9px!important;font-size:12px!important;line-height:1.3!important}
#chat .chat-setup form{gap:8px!important;margin-top:9px!important}
#chat .chat-setup label{gap:3px!important;font-size:12px!important}
#chat .chat-setup input:not([type=checkbox]){height:38px!important;padding:6px 9px!important}
#chat .chat-setup .consent{font-size:11px!important;line-height:1.25!important}
#chat .chat-setup .primary{height:43px!important;padding:6px!important;font-size:15px!important}
#chat .chat-head{padding:12px 17px!important}
#chat .chat-head strong{font-size:18px!important}
#chat .chat-head p{margin-top:3px!important;font-size:11px!important}
#chat .chat-head button{cursor:pointer!important;z-index:11005!important;position:relative}
#chat.chat--active-mode{height:min(70vh,680px)!important;width:385px!important}
#chat.chat--maximized{width:min(770px,calc(100vw - 24px))!important;height:min(90vh,850px)!important}
#chat-fab{background:#1c69d4!important}
#accordionEmployees709 .accordion-button{position:relative!important;z-index:2!important;pointer-events:auto!important}
#accordionEmployees709 .accordion-collapse.show{display:block!important;visibility:visible!important;height:auto!important;opacity:1!important}
#accordionEmployees709 .accordion-collapse.show .accordion-body{display:block!important}
@media(max-width:500px){#chat.chat--setup-mode,#chat.chat--active-mode{width:calc(100vw - 24px)!important}}

/* === v4 employee card fixes === */
#accordionEmployees709 .card--employee-new{display:flex!important;flex-direction:row!important;align-items:flex-start!important;gap:18px!important;overflow:hidden}
#accordionEmployees709 .card--employee-new .card-img-wrapper{width:170px!important;min-width:170px!important;max-width:170px!important;overflow:hidden!important;flex:0 0 170px!important}
#accordionEmployees709 .card--employee-new .card-img-top{display:block!important;width:170px!important;height:210px!important;object-fit:cover!important;object-position:center top!important}
#accordionEmployees709 .card--employee-new .card-body{flex:1 1 auto!important;min-width:0!important;padding:14px 16px!important}
#accordionEmployees709 .card--employee-new .card-title{font-size:18px!important;line-height:1.25!important;margin-bottom:6px!important}
#accordionEmployees709 .card--employee-new .card-subtitle,#accordionEmployees709 .card--employee-new .employee-function{font-size:12px!important;line-height:1.4!important}
#accordionEmployees709 .card--employee-new .employee-contact,#accordionEmployees709 .card--employee-new .employee-contact *{font-size:12px!important;line-height:1.5!important;overflow-wrap:anywhere}
@media(max-width:900px){#accordionEmployees709 .card--employee-new{flex-direction:column!important}#accordionEmployees709 .card--employee-new .card-img-wrapper,#accordionEmployees709 .card--employee-new .card-img-top{width:100%!important;max-width:none!important;height:auto!important}}
/* === v4 chat presence + uploads === */
.chat-presence{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:13px;color:#dbe7fa;line-height:1.35}
.presence-dot{width:10px;height:10px;border-radius:50%;display:inline-block;flex:0 0 10px}
.presence-dot.online{background:#29c35a;box-shadow:0 0 0 rgba(41,195,90,.55);animation:pulse-presence 1.8s infinite}
.presence-dot.offline{background:#aeb7c3}
@keyframes pulse-presence{0%{box-shadow:0 0 0 0 rgba(41,195,90,.55)}70%{box-shadow:0 0 0 10px rgba(41,195,90,0)}100%{box-shadow:0 0 0 0 rgba(41,195,90,0)}}
.chat-head strong{font-size:17px;font-weight:500}
.chat-head p{display:none}
.chat-presence-text{color:#dbe7fa}
.message-upload-row{display:flex;align-items:center;gap:8px}
.chat-upload-btn{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:42px;border:1px solid #d9dee5;background:#fff;border-radius:6px;cursor:pointer;font-size:20px;color:#3c4d65}
#chat-upload{display:none}
.message-form{flex-wrap:wrap}
.message-form input[type=text]{flex:1 1 calc(100% - 60px)}
.upload-chip{font-size:12px;background:#eef2f7;color:#405266;padding:6px 8px;border-radius:999px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.upload-help{font-size:11px;color:#7b8795;margin-top:2px}
.upload-error{font-size:12px;color:#ab142b;margin:0}
.bubble.file img,.bubble.file video{display:block;max-width:220px;border-radius:8px;background:#000}
.bubble.file .attachment-link{display:inline-block;margin-top:8px}
.bubble.file .file-meta{display:block;margin-top:8px;font-size:11px;color:#6b7c8f}
