/* PRTMX 5.4 — existing Leaflet map, voxel-minimal polish only.
 * Never move a Leaflet icon anchor or modify its translate3d coordinates.
 */
body.prtmx-unified-ui[data-prtmx-ui-route="map"] {
  --prtmx-map-ink:#23425f;
  --prtmx-map-border:#d6e5f0;
  --prtmx-map-step:#d2e2ef;
}
/* Leaflet divIcons often have a 28–40px iconSize. Expand ONLY the inner text
   layer, not the marker's positioned icon box. Prevent mid-word wrapping. */
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .leaflet-marker-icon.prtmx-v54-text-marker,
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .leaflet-tooltip.prtmx-v54-text-marker {
  overflow:visible!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
}
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .prtmx-v54-map-label {
  box-sizing:border-box!important;
  display:block!important;
  position:relative!important;
  left:50%!important;
  transform:translateX(-50%)!important;
  width:max-content!important;
  min-width:82px!important;
  max-width:min(180px,42vw)!important;
  padding:5px 9px!important;
  border:1px solid #dce9f3!important;
  border-radius:10px!important;
  background:rgba(255,255,255,.97)!important;
  box-shadow:0 2px 0 #d8e7f2,0 5px 14px #24466524!important;
  color:#294563!important;
  font:700 11.5px/1.3 system-ui,-apple-system,'Segoe UI',sans-serif!important;
  text-align:center!important;
  white-space:normal!important;
  word-break:keep-all!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
  pointer-events:auto;
}
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .prtmx-v54-map-label * {
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
}
/* A marker may already use a leaflet-tooltip as its label.
   Keep Leaflet's placement, fix only its text width and interior. */
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .leaflet-tooltip.prtmx-v54-text-marker {
  min-width:105px!important;
  max-width:200px!important;
  width:max-content!important;
  padding:5px 9px!important;
  border-radius:10px!important;
  background:#fcfeff!important;
  color:#294563!important;
  text-align:center!important;
  box-shadow:0 2px 0 #dce9f3,0 5px 15px #24466518!important;
  white-space:normal!important;
  word-break:keep-all!important;
}
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .leaflet-tooltip.prtmx-v54-text-marker .prtmx-v54-map-label {
  position:static!important;
  left:auto!important;
  transform:none!important;
  min-width:0!important;
  width:auto!important;
  padding:0!important;
  border:0!important;
  box-shadow:none!important;
}
/* The compact brand pill remains next to a name but no longer sticks to it. */
body.prtmx-unified-ui :is(.prtmx-brand,.prtmx-company-badge,.ship-company-badge,.brand-badge) {
  display:inline-flex!important;
  align-items:center!important;
  gap:4px!important;
  margin-inline-start:8px!important;
  margin-block:2px!important;
  padding:2px 6px!important;
  border-radius:9px!important;
  max-width:100%!important;
  white-space:nowrap!important;
  vertical-align:middle!important;
  line-height:1.2!important;
  font-size:10px!important;
  box-sizing:border-box!important;
}
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .prtmx-v54-marker-brand {
  margin:5px auto 0!important;
  display:table!important;
  width:max-content!important;
  max-width:180px!important;
  padding:3px 7px!important;
  border-radius:9px!important;
  background:rgba(251,253,255,.98)!important;
  border:1px solid #d5e3f0!important;
  box-shadow:0 2px 0 #e0eaf3!important;
  color:#345775!important;
  font:700 10px/1.2 system-ui,-apple-system,'Segoe UI',sans-serif!important;
  white-space:nowrap!important;
}
/* Native expandable ship list: only a class attached to the ACTUAL floating
   list panel receives these styles. Map, tiles and zoom controls stay native. */
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .prtmx-v54-map-panel {
  box-sizing:border-box!important;
  border:1px solid #d7e5f1!important;
  border-radius:16px!important;
  background:rgba(250,253,255,.97)!important;
  box-shadow:0 3px 0 #d3e3f0,0 12px 28px #244b6726!important;
  color:#2a4764!important;
  backdrop-filter:blur(12px);
  overflow:hidden;
}
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .prtmx-v54-map-panel .prtmx-v54-map-heading {
  color:#233f5a!important;
  font-weight:800!important;
  letter-spacing:0!important;
}
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .prtmx-v54-map-panel :is(input[type="text"],input[type="search"]) {
  box-sizing:border-box!important;
  background:#fff!important;
  border:1px solid #d9e6f0!important;
  border-radius:10px!important;
  padding:9px 11px!important;
  min-height:36px!important;
  width:100%;
  color:#243e59!important;
}
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .prtmx-v54-map-panel .prtmx-v54-map-action {
  box-sizing:border-box!important;
  border-radius:9px!important;
  color:#2c77a9!important;
  font-weight:700!important;
  text-decoration:none!important;
}
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .prtmx-v54-map-panel .prtmx-v54-map-item {
  padding:9px 10px!important;
  border-bottom:1px solid #e5edf4!important;
  background:#fff!important;
  color:#284663!important;
}
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .prtmx-v54-map-panel .prtmx-v54-map-item:last-child {border-bottom:0!important;}
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .prtmx-v54-map-panel .prtmx-v54-map-item :is(.prtmx-brand,.prtmx-company-badge,.ship-company-badge,.brand-badge) {margin-left:6px!important;}
@media(max-width:700px){
  body.prtmx-unified-ui[data-prtmx-ui-route="map"] .prtmx-v54-map-label {max-width:min(148px,46vw)!important;font-size:10.5px!important;}
  body.prtmx-unified-ui[data-prtmx-ui-route="map"] .prtmx-v54-map-panel {max-width:calc(100vw - 16px)!important;}
}
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .prtmx-v54-map-panel :is(button.prtmx-v54-map-action,a.prtmx-v54-map-action) {
  border:1px solid #d9e7f1!important;
  border-radius:9px!important;
  background:#f5faff!important;
  padding:5px 8px!important;
  font-size:11px!important;
}
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .prtmx-v54-map-panel ul {margin:8px 0!important;padding-left:0!important;}
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .prtmx-v54-map-panel li.prtmx-v54-map-item {
  list-style:none!important;
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  column-gap:7px!important;
}
/* Native Leaflet popups and controls follow the same low-contrast voxel theme. */
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .leaflet-popup-content-wrapper {
  background:#fcfeff!important;
  border:1px solid #d9e8f3!important;
  border-radius:14px!important;
  box-shadow:0 3px 0 #d5e5f1,0 10px 25px #234c6c20!important;
  color:#24425d!important;
}
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .leaflet-popup-content {font-family:system-ui,-apple-system,'Segoe UI',sans-serif!important;line-height:1.45!important;}
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .leaflet-control-zoom {
  border:1px solid #d6e5f1!important;
  border-radius:11px!important;
  overflow:hidden;
  box-shadow:0 3px 0 #d8e6f2,0 6px 12px #294e6815!important;
}
body.prtmx-unified-ui[data-prtmx-ui-route="map"] .leaflet-control-zoom a {background:#fafdff!important;color:#315975!important;border-color:#e1ecf4!important;}
