/* MISTER FAST LiveMapChat WEB — Sprint Chat V1.0
   WEB only. UI patch over existing Chat/Room/Message APIs. */
body.mf-desktop-shell-body .mf514-chat-pane{
  --mf-chat-blue:#003DA5;
  --mf-chat-yellow:#FFC400;
  --mf-chat-text:#17345C;
  --mf-chat-line:#E2EAF4;
  --mf-chat-soft:#F5F8FC;
  background:#fff!important;
  color:var(--mf-chat-text)!important;
}
body.mf-desktop-shell-body .mf514-chat-head.mf-chat-v1-head{
  flex:0 0 48px!important;
  min-height:48px!important;
  height:48px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  padding:4px 7px 4px 12px!important;
  background:#fff!important;
  color:var(--mf-chat-blue)!important;
  border-bottom:1px solid var(--mf-chat-line)!important;
  box-shadow:none!important;
}
.mf-chat-v1-brand,.mf3305-chat-dragzone.mf-chat-v1-dragzone{
  min-width:0;display:flex!important;align-items:center!important;gap:8px!important;
  color:var(--mf-chat-blue)!important;cursor:move;user-select:none;touch-action:none;
}
.mf-chat-v1-brand span,.mf3305-chat-dragzone.mf-chat-v1-dragzone>span{font-size:18px;line-height:1}
.mf-chat-v1-brand b,.mf3305-chat-dragzone.mf-chat-v1-dragzone strong{font-size:15px!important;font-weight:800!important;white-space:nowrap;color:var(--mf-chat-blue)!important}
body.mf-desktop-shell-body .mf-chat-v1-actions,
body.mf-desktop-shell-body .mf3305-chat-controls.mf-chat-v1-controls{
  display:flex!important;align-items:center!important;gap:2px!important;margin-left:auto!important;
}
body.mf-desktop-shell-body .mf-chat-v1-actions button,
body.mf-desktop-shell-body .mf3305-chat-controls.mf-chat-v1-controls button{
  width:31px!important;height:31px!important;min-width:31px!important;padding:0!important;
  display:grid!important;place-items:center!important;border:0!important;border-radius:6px!important;
  background:transparent!important;color:var(--mf-chat-blue)!important;font-size:16px!important;
  line-height:1!important;box-shadow:none!important;cursor:pointer!important;
}
body.mf-desktop-shell-body .mf-chat-v1-actions button:hover,
body.mf-desktop-shell-body .mf3305-chat-controls.mf-chat-v1-controls button:hover{background:#EAF2FF!important}
body.mf-desktop-shell-body .mf3305-chat-controls.mf-chat-v1-controls [data-mf-chat-action="close"]:hover{background:#FFE7E9!important;color:#C62838!important}
body.mf-desktop-shell-body .mf3305-chat-dragbar.mf-chat-v1-merged{display:none!important}
.mf-chat-v1-search{
  flex:0 0 42px;display:flex;align-items:center;gap:7px;padding:5px 8px;
  background:#fff;border-bottom:1px solid var(--mf-chat-line);z-index:5;
}
.mf-chat-v1-search[hidden]{display:none!important}
.mf-chat-v1-search input{min-width:0;flex:1;height:31px;border:1px solid #C9D8EA;border-radius:8px;padding:0 10px;outline:0;color:var(--mf-chat-text);background:#F8FBFF}
.mf-chat-v1-search input:focus{border-color:var(--mf-chat-blue);box-shadow:0 0 0 3px rgba(0,61,165,.10)}
.mf-chat-v1-search button{width:30px;height:30px;border:0;border-radius:7px;background:transparent;color:#5D7290;cursor:pointer}
.mf-chat-v1-search button:hover{background:#EEF3F9}
body.mf-desktop-shell-body .mf602-modes{
  flex:0 0 46px!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:0!important;padding:0 4px!important;background:#fff!important;border-bottom:1px solid var(--mf-chat-line)!important;
  overflow:visible!important;
}
body.mf-desktop-shell-body .mf602-mode{
  position:relative!important;min-width:0!important;height:45px!important;padding:4px 2px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;gap:3px!important;
  border:0!important;border-radius:0!important;background:#fff!important;color:#60738E!important;
  box-shadow:none!important;cursor:pointer!important;white-space:nowrap!important;
}
body.mf-desktop-shell-body .mf602-mode>span{font-size:14px!important;line-height:1!important}
body.mf-desktop-shell-body .mf602-mode>b{font-size:11px!important;font-weight:700!important;overflow:hidden;text-overflow:ellipsis}
body.mf-desktop-shell-body .mf602-mode>small{
  display:inline!important;position:static!important;min-width:0!important;padding:0!important;margin:0!important;
  border:0!important;border-radius:0!important;background:transparent!important;color:inherit!important;font-size:10px!important;font-weight:800!important;
}
body.mf-desktop-shell-body .mf602-mode>small::before{content:"("}
body.mf-desktop-shell-body .mf602-mode>small::after{content:")"}
body.mf-desktop-shell-body .mf602-mode:hover{background:#F5F9FF!important;color:var(--mf-chat-blue)!important}
body.mf-desktop-shell-body .mf602-mode.is-active{color:var(--mf-chat-blue)!important;background:#fff!important}
body.mf-desktop-shell-body .mf602-mode.is-active::after{
  content:"";position:absolute;left:8px;right:8px;bottom:-1px;height:3px;border-radius:3px 3px 0 0;background:var(--mf-chat-yellow);
}
body.mf-desktop-shell-body .mf602-browser{
  flex:0 0 auto!important;max-height:176px!important;overflow:auto!important;background:#fff!important;
  border-bottom:1px solid var(--mf-chat-line)!important;
}
body.mf-desktop-shell-body .mf602-browser.is-open{display:block!important}
body.mf-desktop-shell-body .mf602-list{padding:0!important}
body.mf-desktop-shell-body .mf615-contact-row,
body.mf-desktop-shell-body .mf602-card{
  min-height:54px!important;padding:7px 9px!important;border:0!important;border-bottom:1px solid #EDF2F8!important;border-radius:0!important;background:#fff!important;
}
body.mf-desktop-shell-body .mf615-contact-row:hover,
body.mf-desktop-shell-body .mf602-card:hover{background:#F7FAFE!important}
body.mf-desktop-shell-body .mf601-context{
  flex:0 0 38px!important;min-height:38px!important;padding:4px 9px!important;order:5!important;
  border-bottom:1px solid var(--mf-chat-line)!important;background:#F9FBFE!important;
}
body.mf-desktop-shell-body .mf601-context-main{gap:7px!important}
body.mf-desktop-shell-body .mf601-context-icon{width:25px!important;height:25px!important;font-size:13px!important}
body.mf-desktop-shell-body .mf601-context-main small,
body.mf-desktop-shell-body .mf601-context-main em{display:none!important}
body.mf-desktop-shell-body .mf601-context-main b{font-size:12px!important}
body.mf-desktop-shell-body .mf601-member-button{height:28px!important;min-width:62px!important;padding:2px 7px!important;border-radius:7px!important}
body.mf-desktop-shell-body .mf601-member-button small{display:none!important}
body.mf-desktop-shell-body .mf514-messages{order:6!important;flex:1 1 auto!important;min-height:110px!important;padding:10px!important;background:#fff!important}
body.mf-desktop-shell-body .mf514-message>div{border-radius:14px!important;box-shadow:none!important}
body.mf-desktop-shell-body .mf601-send-target{display:none!important}
body.mf-desktop-shell-body .mf514-emoji{order:7!important}
body.mf-desktop-shell-body .mf514-composer{
  order:8!important;flex:0 0 52px!important;min-height:52px!important;display:grid!important;
  grid-template-columns:30px 30px 30px 30px 30px minmax(90px,1fr) 38px!important;
  align-items:center!important;gap:2px!important;padding:6px 7px!important;background:#fff!important;border-top:1px solid var(--mf-chat-line)!important;
}
body.mf-desktop-shell-body .mf514-composer>button:not(.mf514-send){width:29px!important;height:34px!important;border:0!important;border-radius:8px!important;background:transparent!important;padding:0!important}
body.mf-desktop-shell-body .mf514-composer>button:not(.mf514-send):hover{background:#EEF4FB!important}
body.mf-desktop-shell-body .mf514-composer input[name="message"]{height:38px!important;min-width:0!important;border:1px solid #D5E0EC!important;border-radius:19px!important;padding:0 13px!important;background:#F7F9FC!important;outline:0!important}
body.mf-desktop-shell-body .mf514-composer input[name="message"]:focus{border-color:var(--mf-chat-blue)!important;background:#fff!important}
body.mf-desktop-shell-body .mf514-composer .mf514-send{width:36px!important;height:36px!important;border:0!important;border-radius:50%!important;background:var(--mf-chat-blue)!important;color:#fff!important;font-size:17px!important;padding:0!important;box-shadow:none!important}
body.mf-desktop-shell-body .mf514-composer .mf514-send:hover{background:#0053C7!important;transform:translateX(1px)}
body.mf-desktop-shell-body .mf514-chat-pane.is-minimized .mf-chat-v1-head{border-bottom:0!important}
@media(max-width:1120px){
  body.mf-desktop-shell-body .mf602-mode>b{font-size:10px!important}
  body.mf-desktop-shell-body .mf514-composer{grid-template-columns:28px 28px 28px 28px 28px minmax(70px,1fr) 36px!important}
}

/* =========================================================
   V2.6.3 — Medium Emoji / Icon Messages
   Keeps toolbar buttons at the approved enterprise size and
   makes emoji-only chat messages readable without becoming huge.
   ========================================================= */

/* Approved Emoji Toolbar size */
body.mf-desktop-shell-body .mf514-emoji{
  gap:8px!important;
  padding:7px 8px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin!important;
}
body.mf-desktop-shell-body .mf514-emoji > button{
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  flex:0 0 40px!important;
  margin:0!important;
  padding:0!important;
  border-radius:12px!important;
  font-size:23px!important;
  line-height:1!important;
  display:grid!important;
  place-items:center!important;
}

/* Composer action icons remain comfortably tappable */
body.mf-desktop-shell-body .mf514-composer > button:not(.mf514-send){
  font-size:21px!important;
}

/* Normal chat text remains compact */
body.mf-desktop-shell-body .mf514-message .mf-chat-v263-content{
  display:block;
  margin-top:3px;
  font-size:13px;
  line-height:1.45;
  overflow-wrap:anywhere;
}

/* Emoji/icon-only messages: medium, not oversized */
body.mf-desktop-shell-body .mf514-message.is-emoji-only > div{
  min-width:58px!important;
  padding:9px 12px!important;
}
body.mf-desktop-shell-body .mf514-message.is-emoji-only .mf-chat-v263-content{
  font-size:24px!important;
  line-height:1.25!important;
  letter-spacing:2px!important;
  white-space:normal!important;
}

/* One single emoji can be centered cleanly */
body.mf-desktop-shell-body .mf514-message.is-single-emoji .mf-chat-v263-content{
  min-width:30px!important;
  text-align:center!important;
  letter-spacing:0!important;
}

@media (max-width:640px){
  body.mf-desktop-shell-body .mf514-message.is-emoji-only .mf-chat-v263-content{
    font-size:22px!important;
  }
}

/* =========================================================
   V2.6.4 — Compact Account Header
   Enterprise Chat Navigation V1.0 (LOCK)
   Header: avatar left / window controls right
   Tabs: AI / General / Driver / Drop Point / Jobs
   ========================================================= */
body.mf-desktop-shell-body .mf514-chat-head.mf-chat-v264-head{
  position:relative!important;
  padding:4px 7px!important;
  background:var(--mf-chat-blue)!important;
  color:#fff!important;
  border-bottom:1px solid rgba(255,255,255,.16)!important;
}
body.mf-desktop-shell-body .mf-chat-v264-account{
  position:relative!important;
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  z-index:12!important;
}
body.mf-desktop-shell-body .mf-chat-v264-avatar{
  width:36px!important;height:36px!important;min-width:36px!important;padding:0!important;
  display:grid!important;place-items:center!important;overflow:hidden!important;
  border:2px solid var(--mf-chat-yellow)!important;border-radius:50%!important;
  background:#fff!important;color:var(--mf-chat-blue)!important;font-size:15px!important;font-weight:900!important;
  cursor:pointer!important;box-shadow:0 2px 8px rgba(0,0,0,.16)!important;
}
body.mf-desktop-shell-body .mf-chat-v264-avatar img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important}
body.mf-desktop-shell-body .mf-chat-v264-avatar:hover{transform:translateY(-1px)!important;box-shadow:0 4px 12px rgba(0,0,0,.22)!important}
body.mf-desktop-shell-body .mf3305-chat-dragzone.mf-chat-v1-dragzone{
  flex:1 1 auto!important;align-self:stretch!important;min-width:12px!important;margin:0 4px!important;
}
body.mf-desktop-shell-body .mf-chat-v1-actions,
body.mf-desktop-shell-body .mf3305-chat-controls.mf-chat-v1-controls{color:#fff!important}
body.mf-desktop-shell-body .mf-chat-v1-actions button,
body.mf-desktop-shell-body .mf3305-chat-controls.mf-chat-v1-controls button{
  color:#fff!important;border-radius:7px!important;
}
body.mf-desktop-shell-body .mf-chat-v1-actions button:hover,
body.mf-desktop-shell-body .mf3305-chat-controls.mf-chat-v1-controls button:hover{background:rgba(255,255,255,.16)!important;color:#fff!important}
body.mf-desktop-shell-body .mf3305-chat-controls.mf-chat-v1-controls [data-mf-chat-action="close"]:hover{background:#fff!important;color:#C62838!important}
body.mf-desktop-shell-body .mf-chat-v264-account-menu{
  position:absolute!important;left:0!important;top:43px!important;width:210px!important;padding:7px!important;
  background:#fff!important;color:var(--mf-chat-text)!important;border:1px solid #D8E3F0!important;border-radius:12px!important;
  box-shadow:0 14px 36px rgba(15,43,79,.22)!important;z-index:100!important;
}
body.mf-desktop-shell-body .mf-chat-v264-account-menu[hidden]{display:none!important}
body.mf-desktop-shell-body .mf-chat-v264-account-summary{padding:7px 9px 9px!important;border-bottom:1px solid #E8EEF6!important;margin-bottom:5px!important}
body.mf-desktop-shell-body .mf-chat-v264-account-summary b,
body.mf-desktop-shell-body .mf-chat-v264-account-summary small{display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
body.mf-desktop-shell-body .mf-chat-v264-account-summary b{font-size:13px!important;color:var(--mf-chat-blue)!important}
body.mf-desktop-shell-body .mf-chat-v264-account-summary small{font-size:11px!important;color:#6B7D95!important;margin-top:2px!important}
body.mf-desktop-shell-body .mf-chat-v264-account-menu>a,
body.mf-desktop-shell-body .mf-chat-v264-account-menu>button{
  width:100%!important;min-height:34px!important;padding:7px 9px!important;display:flex!important;align-items:center!important;gap:8px!important;
  border:0!important;border-radius:8px!important;background:transparent!important;color:#243D61!important;text-decoration:none!important;
  font:inherit!important;font-size:12px!important;text-align:left!important;cursor:pointer!important;box-sizing:border-box!important;
}
body.mf-desktop-shell-body .mf-chat-v264-account-menu>a:hover,
body.mf-desktop-shell-body .mf-chat-v264-account-menu>button:hover{background:#EEF5FF!important;color:var(--mf-chat-blue)!important}

/* One-row tab rail; preserve readable labels at narrow chat widths. */
body.mf-desktop-shell-body .mf602-modes{
  grid-template-columns:none!important;display:flex!important;align-items:stretch!important;
  overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin!important;scroll-snap-type:x proximity!important;
  padding:0 4px!important;
}
body.mf-desktop-shell-body .mf602-mode{
  flex:0 0 auto!important;min-width:max-content!important;padding:4px 9px!important;scroll-snap-align:start!important;
}
body.mf-desktop-shell-body .mf602-mode>b{overflow:visible!important;text-overflow:clip!important}
body.mf-desktop-shell-body .mf602-mode[data-mf602-mode="ai"]{font-weight:800!important}
body.mf-desktop-shell-body .mf602-mode[data-mf602-mode="ai"].is-active{color:var(--mf-chat-blue)!important}

/* =========================================================
   V2.7.2 — Compact Account Header FINAL LOCK
   Exact order: 👤 | flexible space | − ▦ 🏠 ✕
   Remove legacy white account bars inside chat only.
   ========================================================= */
body.mf-desktop-shell-body .mf514-chat-pane .mf514-chat-head.mf-chat-v264-head{
  min-height:46px!important;
  height:46px!important;
  display:flex!important;
  align-items:center!important;
  gap:6px!important;
  padding:5px 7px!important;
  overflow:visible!important;
  box-sizing:border-box!important;
}
body.mf-desktop-shell-body .mf514-chat-pane .mf-chat-v264-account{
  order:1!important;
  flex:0 0 36px!important;
}
body.mf-desktop-shell-body .mf514-chat-pane .mf3305-chat-dragzone.mf-chat-v1-dragzone{
  order:2!important;
  flex:1 1 auto!important;
  min-width:10px!important;
  height:100%!important;
  margin:0!important;
  cursor:move!important;
}
body.mf-desktop-shell-body .mf514-chat-pane .mf514-chat-head-actions.mf-chat-v1-actions{
  order:3!important;
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  gap:3px!important;
  margin-left:auto!important;
}
body.mf-desktop-shell-body .mf514-chat-pane .mf3305-chat-controls.mf-chat-v1-controls{
  order:4!important;
  flex:0 0 auto!important;
  display:flex!important;
  align-items:center!important;
  gap:3px!important;
  margin:0!important;
}
body.mf-desktop-shell-body .mf514-chat-pane .mf3305-chat-controls.mf-chat-v1-controls button,
body.mf-desktop-shell-body .mf514-chat-pane .mf-chat-v1-actions button{
  width:31px!important;
  min-width:31px!important;
  height:31px!important;
  min-height:31px!important;
  padding:0!important;
  display:grid!important;
  place-items:center!important;
  border:0!important;
  background:transparent!important;
  color:#fff!important;
  font-size:16px!important;
  font-weight:800!important;
  line-height:1!important;
  box-shadow:none!important;
}
body.mf-desktop-shell-body .mf514-chat-pane .mf3305-chat-controls.mf-chat-v1-controls button:hover,
body.mf-desktop-shell-body .mf514-chat-pane .mf-chat-v1-actions button:hover{
  background:rgba(255,255,255,.16)!important;
}
body.mf-desktop-shell-body .mf514-chat-pane .mf-chat-v264-avatar{
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  min-height:36px!important;
}
/* Hide only obsolete account bars that may be injected by older WEB assets. */
body.mf-desktop-shell-body .mf514-chat-pane > .mf514-chat-account,
body.mf-desktop-shell-body .mf514-chat-pane > .mf-chat-account-strip,
body.mf-desktop-shell-body .mf514-chat-pane > .mf514-chat-userbar,
body.mf-desktop-shell-body .mf514-chat-pane > [data-mf-chat-account-strip]{
  display:none!important;
}
