/* MISTER FAST LiveMapChat WEB V3.1.1
   Map Toolbar Polish + Natural Long Sidebar */

/* ----- Sidebar: ปล่อยยาวตามจำนวนเมนู ไม่สร้าง scrollbar ภายใน ----- */
html, body.mf-web-theme-v30{
  min-height:100%;
  height:auto!important;
  overflow-y:auto!important;
}
body.mf-web-theme-v30 .mf514-window{
  min-height:100vh!important;
  height:auto!important;
  overflow:visible!important;
}
body.mf-web-theme-v30 .mf514-grid{
  min-height:calc(100vh - var(--mf218-header-h,72px) - var(--mf218-footer-h,56px))!important;
  height:auto!important;
  align-items:stretch!important;
  overflow:visible!important;
}
body.mf-web-theme-v30 .mf514-sidebar{
  position:relative!important;
  top:auto!important;
  bottom:auto!important;
  height:auto!important;
  min-height:100%!important;
  max-height:none!important;
  overflow:visible!important;
  align-self:stretch!important;
  padding-bottom:22px!important;
}
body.mf-web-theme-v30 .mf514-sidebar .mf514-menu{
  flex:0 0 auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  scrollbar-width:none!important;
  padding-bottom:10px!important;
}
body.mf-web-theme-v30 .mf514-sidebar .mf514-menu::-webkit-scrollbar{display:none!important}
body.mf-web-theme-v30 .mf31-role-card{
  margin:18px 14px 8px!important;
  flex:0 0 auto!important;
  position:relative!important;
  inset:auto!important;
  z-index:1!important;
}
body.mf-web-theme-v30 .mf514-sidebar .mf514-brand{
  flex:0 0 auto!important;
}

/* ----- Map Toolbar: 4 ปุ่มในแถวเดียว ----- */
body.mf-web-theme-v30 .mf311-map-toolbar{
  position:absolute;
  z-index:900;
  top:18px;
  right:18px;
  display:grid;
  grid-template-columns:repeat(4,52px);
  gap:10px;
  align-items:center;
  padding:8px;
  border:1px solid rgba(0,61,165,.12);
  border-radius:20px;
  background:rgba(255,255,255,.94);
  box-shadow:0 12px 30px rgba(4,39,91,.16);
  backdrop-filter:blur(10px);
}
body.mf-web-theme-v30 .mf311-tool-btn{
  position:relative;
  width:52px;
  height:52px;
  display:grid;
  place-items:center;
  border:1px solid #dbe7f6;
  border-radius:16px;
  background:#fff;
  color:#063d91;
  font-size:21px;
  line-height:1;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(0,61,165,.08);
  transition:transform .18s ease,background .18s ease,border-color .18s ease,box-shadow .18s ease;
}
body.mf-web-theme-v30 .mf311-tool-btn:hover{
  transform:translateY(-2px);
  background:#f4f8ff;
  border-color:#9fbce8;
  box-shadow:0 8px 18px rgba(0,61,165,.16);
}
body.mf-web-theme-v30 .mf311-tool-btn:focus-visible{
  outline:3px solid rgba(255,196,0,.7);
  outline-offset:2px;
}
body.mf-web-theme-v30 .mf311-tool-btn.is-active{
  background:#003DA5;
  color:#fff;
  border-color:#003DA5;
}
body.mf-web-theme-v30 .mf311-tool-btn i{
  position:absolute;
  top:-5px;
  right:-5px;
  min-width:20px;
  height:20px;
  padding:0 5px;
  display:grid;
  place-items:center;
  border:2px solid #fff;
  border-radius:999px;
  background:#ef4444;
  color:#fff;
  font:700 11px/1 Arial,sans-serif;
  font-style:normal;
}
/* ยกเลิกปุ่ม fullscreen รุ่นเก่าที่อาจค้างจาก CSS ก่อนหน้า */
body.mf-web-theme-v30 .mf52-map-fullscreen{display:none!important}
/* ปุ่มใหม่ที่ใช้ data เดิมต้องแสดง */
body.mf-web-theme-v30 .mf311-map-toolbar [data-mf52-map-fullscreen]{display:grid!important}

/* Settings opens radius panel without changing engine */
body.mf-web-theme-v30 .mf532-radius-panel{
  transition:opacity .2s ease,transform .2s ease,visibility .2s ease;
}
body.mf-web-theme-v30.mf311-settings-collapsed .mf532-radius-panel{
  opacity:0!important;
  visibility:hidden!important;
  transform:translateY(-10px)!important;
  pointer-events:none!important;
}

@media(max-width:1240px){
  body.mf-web-theme-v30 .mf311-map-toolbar{
    grid-template-columns:repeat(4,46px);
    gap:7px;
    top:12px;
    right:12px;
    padding:7px;
  }
  body.mf-web-theme-v30 .mf311-tool-btn{width:46px;height:46px;border-radius:14px;font-size:19px}
}
@media(max-width:920px){
  body.mf-web-theme-v30 .mf311-map-toolbar{grid-template-columns:repeat(2,44px)}
  body.mf-web-theme-v30 .mf311-tool-btn{width:44px;height:44px}
}


/* V3.1.3 Sidebar cleanup: navigation only */
body.mf-web-theme-v30 .mf31-role-card,
body.mf-web-theme-v30 .mf514-sidebar .mf-lmc-side-status,
body.mf-web-theme-v30 .mf514-sidebar .mf-lmc-profile-card,
body.mf-web-theme-v30 .mf514-sidebar .mf-sidebar-footer,
body.mf-web-theme-v30 .mf514-sidebar .sidebar-footer,
body.mf-web-theme-v30 .mf514-sidebar [class*="enterprise-platform"],
body.mf-web-theme-v30 .mf514-sidebar [class*="copyright-card"]{
  display:none!important;
}
body.mf-web-theme-v30 .mf514-sidebar{
  padding-bottom:18px!important;
}
body.mf-web-theme-v30 .mf514-sidebar .mf514-menu{
  margin-bottom:0!important;
  padding-bottom:18px!important;
}
