.sage-locator-shell{
  max-width:none!important;
  margin-inline:auto;
  box-sizing:border-box;
}

/* Full-bleed without putting the map inside a transformed ancestor.
   Avoiding the old translateX(-50%) is important because browser/GPU
   sub-pixel compositing can expose 1px seams between Leaflet tiles. */
.sage-locator-shell.sage-full-bleed{
  width:min(calc(100vw - 32px),1600px)!important;
  max-width:min(calc(100vw - 32px),1600px)!important;
  margin-left:calc(50% - 50vw + 16px);
  margin-right:calc(50% - 50vw + 16px);
}

.sage-locator{
  box-sizing:border-box;
  --sage-green:#156528;
  --sage-light:#92B80D;
  --sage-locator-height:620px;
  --sage-sidebar-width:340px;
  display:grid;
  grid-template-columns:minmax(240px,var(--sage-sidebar-width)) minmax(0,1fr);
  width:100%;
  height:var(--sage-locator-height);
  min-width:0;
  overflow:hidden;
  background:#fff;
  border:1px solid #e4e9e5;
  border-radius:18px;
  box-shadow:0 12px 35px rgba(18,54,29,.10);
}
.sage-locator *{box-sizing:border-box}

.sage-locator-sidebar{
  display:flex;
  flex-direction:column;
  min-width:0;
  width:100%;
  height:100%;
  overflow:hidden;
  padding:22px 18px 16px;
  background:#fbfdfb;
  border-right:1px solid #e7ece8;
}
.sage-search-wrap{position:relative;width:100%;flex:0 0 auto}
.sage-search-icon{
  position:absolute;
  left:14px;
  top:50%;
  transform:translateY(-50%);
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--sage-green);
  pointer-events:none;
  z-index:2;
}
.sage-location-search{
  display:block;
  width:100%!important;
  min-width:0!important;
  height:48px;
  padding:10px 14px 10px 44px!important;
  border:1px solid #b8c2ba!important;
  border-radius:9px!important;
  outline:none;
  background:#fff!important;
  color:#26352b!important;
  font:inherit!important;
  line-height:1.2!important;
  box-shadow:none!important;
}
.sage-location-search:focus{
  border-color:var(--sage-green)!important;
  box-shadow:0 0 0 3px rgba(21,101,40,.10)!important;
}
.sage-location-count{flex:0 0 auto;padding:12px 2px 10px;font-size:13px;color:#667169}
.sage-location-list{
  min-width:0;
  width:100%;
  flex:1 1 auto;
  overflow-y:auto;
  overflow-x:hidden!important;
  padding:0 2px 12px 0;
  scrollbar-width:thin;
}
.sage-location-card{
  width:100%;
  min-width:0;
  display:grid;
  grid-template-columns:52px minmax(0,1fr);
  gap:13px;
  align-items:start;
  padding:15px 14px;
  margin:0 0 10px;
  border:1px solid #dfe6e0;
  border-radius:14px;
  background:#fff;
  cursor:pointer;
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease;
  text-align:left;
}
.sage-location-card:hover,.sage-location-card.is-active{
  border-color:var(--sage-light);
  box-shadow:0 6px 18px rgba(21,101,40,.10);
  background:#fbfff6;
  transform:translateY(-1px);
}
.sage-card-image{
  width:52px;
  height:52px;
  max-width:none!important;
  border-radius:10px;
  object-fit:contain;
  background:#fff;
  padding:4px;
  border:1px solid #edf1ed;
}
.sage-card-placeholder{
  width:52px;height:52px;border-radius:10px;background:#edf6ef;color:var(--sage-green);display:flex;align-items:center;justify-content:center;font-weight:800;font-size:18px;
}
.sage-card-copy{min-width:0;width:100%;overflow:hidden}
.sage-location-name{
  display:block;
  width:100%;
  margin:0 0 5px;
  color:var(--sage-green);
  font-size:16px;
  line-height:1.28;
  font-weight:700;
  white-space:normal!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
}
.sage-location-address{
  display:block;
  width:100%;
  color:#5f6962;
  font-size:13px;
  line-height:1.45;
  white-space:normal!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
}

.sage-map{
  width:100%;
  height:100%;
  min-width:0;
  overflow:hidden;
  background:#eef3ee;
  z-index:1;
  isolation:isolate;
}

/* Protect Leaflet tiles from theme/Elementor image rules. We deliberately do
   not enlarge or overlap tiles; this keeps Leaflet's native 256px grid intact. */
.sage-map .leaflet-tile,
.sage-map .leaflet-marker-icon,
.sage-map .leaflet-marker-shadow{
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  box-shadow:none;
}
.sage-map .leaflet-tile{display:block}

/* Restore a conventional Leaflet popup: fixed CSS-pixel size, white card and
   standard white pointer. Leaflet keeps this UI layer the same size while the
   map itself zooms underneath it. */
.sage-map .leaflet-popup{margin-bottom:0}
.sage-map .leaflet-popup-content-wrapper{
  background:#fff;
  color:#354139;
  border-radius:14px;
  box-shadow:0 12px 34px rgba(0,0,0,.20);
  overflow:hidden;
}
.sage-map .leaflet-popup-content{
  margin:16px 18px;
  line-height:1.45;
  overflow-wrap:break-word;
  word-break:normal;
}
.sage-map .leaflet-popup-tip-container{width:40px;height:20px}
.sage-map .leaflet-popup-tip{
  background:#fff;
  box-shadow:3px 3px 10px rgba(0,0,0,.10);
}
.sage-map .leaflet-popup-close-button{
  width:30px;
  height:30px;
  padding:5px 7px 0 0;
  color:#506057;
  font-size:22px;
  line-height:20px;
}
.sage-map .leaflet-popup-close-button:hover{color:var(--sage-green)}

.sage-popup{
  width:100%;
  max-width:100%;
  min-width:0;
  font-family:inherit;
  color:#354139;
  white-space:normal;
}
.sage-popup-image{
  display:block;
  width:auto;
  max-width:170px!important;
  max-height:64px!important;
  height:auto;
  object-fit:contain;
  margin:0 0 10px;
}
.sage-popup-title{
  font-size:17px;
  line-height:1.28;
  font-weight:800;
  color:var(--sage-green);
  margin:0 22px 8px 0;
  white-space:normal;
  overflow-wrap:break-word;
  word-break:normal;
}
.sage-popup-address{
  font-size:13px;
  line-height:1.5;
  margin:0;
  color:#5d675f;
  white-space:pre-line;
  overflow-wrap:break-word;
  word-break:normal;
}
.sage-popup-extra{
  margin-top:11px;
  padding-top:10px;
  border-top:1px solid #e3e9e4;
  font-size:13px;
  line-height:1.55;
  color:#3e4a42;
  white-space:pre-line;
  overflow-wrap:break-word;
  word-break:normal;
}

.sage-marker{
  width:34px;
  height:34px;
  border-radius:50% 50% 50% 0;
  background:var(--sage-green);
  transform:rotate(-45deg);
  border:3px solid #fff;
  box-shadow:0 4px 10px rgba(0,0,0,.24);
  position:relative;
}
.sage-marker:after{
  content:"";
  position:absolute;
  width:9px;
  height:9px;
  border-radius:50%;
  background:#fff;
  left:9px;
  top:9px;
}

@media (max-width:1024px){
  .sage-locator-shell.sage-full-bleed{
    width:100%!important;
    max-width:100%!important;
    margin-left:0;
    margin-right:0;
  }
  .sage-locator{--sage-sidebar-width:320px}
  .sage-map .leaflet-popup-content{margin:15px 16px}
}

@media (max-width:767px){
  .sage-locator-shell,
  .sage-locator-shell.sage-full-bleed{
    width:100%!important;
    max-width:100%!important;
    margin-left:0;
    margin-right:0;
  }
  .sage-locator{
    display:flex;
    flex-direction:column;
    height:auto;
    min-height:0;
    border-radius:14px;
  }
  .sage-locator-sidebar{
    height:auto;
    max-height:390px;
    border-right:0;
    border-bottom:1px solid #e7ece8;
    padding:14px;
  }
  .sage-location-list{max-height:285px}
  .sage-location-card{
    grid-template-columns:42px minmax(0,1fr);
    gap:10px;
    padding:12px;
    border-radius:12px;
  }
  .sage-card-image,.sage-card-placeholder{width:42px;height:42px;border-radius:9px}
  .sage-location-name{font-size:14px;line-height:1.3}
  .sage-location-address{font-size:12px;line-height:1.4}
  .sage-map{height:430px;min-height:430px}
  .sage-map .leaflet-popup-content{margin:13px 14px}
  .sage-popup-title{font-size:15px;margin-right:20px}
  .sage-popup-address,.sage-popup-extra{font-size:12.5px;line-height:1.5}
  .sage-popup-image{max-width:145px!important;max-height:54px!important}
}

@media (max-width:420px){
  .sage-locator-sidebar{padding:12px}
  .sage-map{height:410px;min-height:410px}
}
