/* MISTER FAST V37.2 — Floating Route Card
   Layout-only patch. Keeps Route/Pricing/Job runtime unchanged. */

/* Runtime may reveal the old price breakdown: keep it removed from the map card. */
.mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate .mf-v363-price-breakdown,
.mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate [data-v363-price-breakdown]{
  display:none!important;
  visibility:hidden!important;
  height:0!important;
  min-height:0!important;
  max-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  overflow:hidden!important;
}

/* Route summary becomes one small vertical card in the upper-right of the map. */
.mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate{
  position:absolute!important;
  top:72px!important;
  right:14px!important;
  left:auto!important;
  bottom:auto!important;
  z-index:860!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  grid-template-rows:repeat(3,38px) 44px!important;
  gap:5px!important;
  width:172px!important;
  min-width:172px!important;
  max-width:172px!important;
  height:auto!important;
  max-height:none!important;
  min-height:0!important;
  margin:0!important;
  padding:8px!important;
  border:1px solid #d7e5f5!important;
  border-radius:18px!important;
  background:rgba(255,255,255,.96)!important;
  box-shadow:0 12px 30px rgba(0,61,165,.16)!important;
  backdrop-filter:blur(10px)!important;
  -webkit-backdrop-filter:blur(10px)!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
}
.mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate[hidden]{display:none!important}

.mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate>div:not(.mf-v363-price-breakdown){
  display:grid!important;
  grid-template-columns:28px minmax(0,1fr)!important;
  grid-template-rows:1fr!important;
  align-items:center!important;
  gap:7px!important;
  width:100%!important;
  min-width:0!important;
  height:38px!important;
  min-height:38px!important;
  max-height:38px!important;
  margin:0!important;
  padding:4px 8px!important;
  border:1px solid #e3edf8!important;
  border-radius:11px!important;
  background:#f7faff!important;
  box-sizing:border-box!important;
}
.mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate>div>span{
  grid-row:1!important;
  grid-column:1!important;
  display:grid!important;
  place-items:center!important;
  width:26px!important;
  height:26px!important;
  margin:0!important;
  border-radius:9px!important;
  background:#fff!important;
  font-size:15px!important;
  line-height:1!important;
}
.mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate>div>b{
  grid-row:1!important;
  grid-column:2!important;
  display:block!important;
  min-width:0!important;
  margin:0!important;
  color:#003da5!important;
  font-size:15px!important;
  font-weight:900!important;
  line-height:1.15!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
.mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate>div>small{
  display:none!important;
}
.mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate .mf-v363-price-total{
  border-color:#ffe29a!important;
  background:#fffaf0!important;
}
.mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate .mf-v363-primary-cta{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  height:44px!important;
  min-height:44px!important;
  max-height:44px!important;
  margin:0!important;
  padding:7px 10px!important;
  border:0!important;
  border-radius:12px!important;
  background:#ffc400!important;
  color:#083a7a!important;
  box-shadow:0 7px 16px rgba(255,196,0,.24)!important;
  font-size:14px!important;
  font-weight:900!important;
  white-space:nowrap!important;
  box-sizing:border-box!important;
}
.mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate .mf-v363-primary-cta:hover{
  transform:translateY(-1px)!important;
}

/* Leave the lower map edge to the compact route dock only. */
.mf-lmc-map-panel .mf-v366-route-dock{
  z-index:870!important;
}

/* Online-map mode continues to own the map without the Route card. */
.mf-lmc-map-panel.is-v37-online .mf-v31-estimate.mf-v363-estimate{
  display:none!important;
}

@media(max-width:900px){
  .mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate{
    top:62px!important;
    right:8px!important;
    width:148px!important;
    min-width:148px!important;
    max-width:148px!important;
    grid-template-rows:repeat(3,34px) 40px!important;
    gap:4px!important;
    padding:6px!important;
    border-radius:15px!important;
  }
  .mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate>div:not(.mf-v363-price-breakdown){
    grid-template-columns:23px minmax(0,1fr)!important;
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
    padding:3px 6px!important;
    gap:5px!important;
  }
  .mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate>div>span{
    width:22px!important;
    height:22px!important;
    font-size:13px!important;
  }
  .mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate>div>b{font-size:13px!important}
  .mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate .mf-v363-primary-cta{
    height:40px!important;
    min-height:40px!important;
    max-height:40px!important;
    font-size:12px!important;
  }
}

@media(max-width:520px){
  .mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate{
    top:54px!important;
    right:6px!important;
    width:132px!important;
    min-width:132px!important;
    max-width:132px!important;
    padding:5px!important;
  }
  .mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate>div>b{font-size:12px!important}
  .mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate .mf-v363-primary-cta{
    font-size:0!important;
  }
  .mf-lmc-map-panel .mf-v31-estimate.mf-v363-estimate .mf-v363-primary-cta::after{
    content:'🚚 เรียกรถ';
    font-size:12px!important;
  }
}
