html.unit-map-open {
  overflow: hidden;
}
.unit-map-launcher-card {
  height: 100%;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  box-sizing: border-box;
  border: 1px solid #d6e0eb;
  border-radius: 16px;
  background: #fff;
}
.unit-map-launcher {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1e3a5f;
  cursor: pointer;
  box-shadow: none;
}
.unit-map-launcher:hover {
  background: #eef5ff;
}
.unit-map-launcher svg {
  width: 34px;
  height: 34px;
}
.unit-map-launcher span {
  font-size: 11px;
  font-weight: 400;
}
.unit-map-launcher:disabled {
  opacity: 0.5;
  cursor: default;
}
.unit-map-dialog {
  width: 95vw;
  height: 95vh;
  height: 95dvh;
  max-width: 95vw;
  max-height: 95vh;
  max-height: 95dvh;
  padding: 0;
  border: 0;
  margin: auto;
  box-sizing: border-box;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 80px #0008;
}
.unit-map-dialog::backdrop {
  background: #071421b3;
}
.unit-map-card {
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: var(--panel-bg, #122235);
  color: var(--text, #edf4fa);
  border: 1px solid var(--border-color, #33465c);
  border-radius: 12px;
  overflow: hidden;
}
.unit-map-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid #52677b55;
}
.unit-map-toolbar strong {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 7px;
}
.unit-map-toolbar svg {
  width: 18px;
  height: 18px;
}
.unit-map-toolbar button,
.unit-map-sidebar button {
  padding: 7px 10px;
  min-width: 0;
  width: auto;
  white-space: nowrap;
}
.unit-map-actions button[aria-pressed="true"] {
  background: #2563eb;
  color: white;
}
.unit-map-toolbar .unit-map-close {
  width: 32px;
  height: 32px;
  padding: 4px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: transparent;
  color: inherit;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.unit-map-close:hover {
  background: #52677b22;
}
.unit-map-close:focus-visible,
.unit-map-launcher:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}
.unit-map-body {
  display: flex;
  flex: 1;
  min-height: 0;
  position: relative;
  z-index: 0;
}
.unit-map-address {
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  padding: 8px 12px;
  border-bottom: 1px solid #52677b55;
}
.unit-map-address-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.unit-map-address-form input {
  flex: 1;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 10px;
}
.unit-map-address button {
  width: auto;
  min-width: 0;
  padding: 7px 10px;
  white-space: nowrap;
}
.unit-map-address-message,
.unit-map-travel-status {
  margin-top: 7px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.unit-map-address-panel {
  position: absolute;
  top: 100%;
  left: 12px;
  right: 12px;
  z-index: 1;
  padding: 10px;
  max-height: min(360px, 45dvh);
  overflow: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  border: 1px solid #c7d3e0;
  border-radius: 0 0 8px 8px;
  background: #fff;
  color: #15243a;
  box-shadow: 0 8px 24px #0004;
}
.unit-map-address-panel:not(:has(.unit-map-address-message:not(:empty), .unit-map-address-results:not(:empty), .unit-map-search-attributions:not(:empty), .unit-map-travel-status:not(:empty))) {
  display: none;
}
.unit-map-address-panel > :first-child {
  margin-top: 0;
}
html[data-theme="dark"] .unit-map-address-panel {
  background: #122235;
  color: #edf4fa;
  border-color: #435269;
}
.unit-map-address-results {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 7px;
}
.unit-map-address-results button {
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}
.unit-map-address-results button[aria-selected="true"],
.unit-map-address-results button:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: -2px;
  background: #1d4ed8;
  color: #fff;
}
.unit-map-search-attributions {
  margin-top: 7px;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.unit-map-search-attributions a {
  color: inherit;
}
.unit-map-search-attributions:empty,
.unit-map-travel-status:empty,
.unit-map-address-message:empty,
.unit-map-address-results:empty {
  display: none;
}
.unit-map-address-pin {
  padding: 6px 9px;
  border: 2px solid #fff;
  border-radius: 18px;
  background: #a93f0b;
  color: #fff;
  font: 600 12px system-ui;
  box-shadow: 0 2px 5px #0008;
  white-space: nowrap;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.unit-map-canvas {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
  background: #172a3b;
}
.unit-map-provider {
  position: absolute;
  inset: 0;
}
.unit-map-sidebar {
  width: 220px;
  max-width: 43%;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px;
  gap: 8px;
  border-left: 1px solid #52677b55;
}
.unit-map-sidebar input[type="search"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px;
}
.unit-map-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
.unit-map-actions button {
  padding: 7px 4px;
  font-size: 12px;
  white-space: normal;
}
.unit-map-users {
  overflow: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.unit-map-user {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px 8px;
  border: 1px solid #dde5f0;
  border-radius: 10px;
  background: #fbfcff;
  cursor: pointer;
}
.unit-map-user.user-signed-in {
  border-color: #b8c9ee;
  background: #f7faff;
  color: #1344b3;
}
.unit-map-user.user-signed-out {
  border-color: #e0e5ed;
  background: #f4f6f9;
  color: #7a8797;
}
.unit-map-user:has(input:checked) {
  border-color: #1344b3;
  box-shadow: 0 0 0 2px rgba(19, 68, 179, 0.12);
  background: #f4f7ff;
}
.unit-map-user input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  margin: 3px 0 0;
  accent-color: #3b82f6;
}
.unit-map-user-detail {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.unit-map-user-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}
.unit-map-user strong {
  display: block;
  font-size: 13px;
}
.unit-map-user-status {
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.05em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
}
.unit-map-user.user-signed-in .unit-map-user-status {
  background: #1344b3;
  color: #fff;
}
.unit-map-user.user-signed-out .unit-map-user-status {
  background: #334155;
  color: #cbd5e1;
}
.unit-map-user small {
  display: block;
  line-height: 1.5;
  opacity: 0.75;
}
.unit-map-status {
  padding: 7px 12px;
  font-size: 12px;
  min-height: 18px;
  border-top: 1px solid #52677b55;
}
.unit-map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  padding: 20px;
  text-align: center;
  pointer-events: none;
  color: #d4e5ef;
  background: #172a3be8;
}
.unit-map-empty[hidden] {
  display: none;
}
.unit-map-count {
  font-size: 12px;
  opacity: 0.8;
}
.unit-map-ptt {
  width: 100% !important;
  white-space: normal !important;
  touch-action: none;
  user-select: none;
  min-height: 44px;
  background: #1344b3;
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
}
.unit-map-ptt:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.unit-map-marker {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.unit-map-pin-name {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 280px;
  padding: 8px 12px;
  border: 1px solid #fff;
  border-radius: 8px;
  background: #122235;
  color: #fff;
  box-shadow: 0 2px 8px #0006;
  font: 600 20px/1.3 system-ui;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  pointer-events: none;
  visibility: hidden;
}
.unit-map-marker:hover .unit-map-pin-name,
.unit-map-marker:focus-within .unit-map-pin-name {
  visibility: visible;
}
.unit-map-travel {
  padding: 4px 7px;
  border: 1px solid #fff;
  border-radius: 6px;
  background: #122235;
  color: #fff;
  box-shadow: 0 2px 5px #0006;
  font: 600 11px/1.3 system-ui;
  white-space: pre-line;
  text-align: center;
}
.unit-map-travel[hidden] {
  display: none;
}
.unit-map-pin-wrap {
  position: relative;
}
.unit-map-pin-tx {
  position: absolute;
  bottom: -6px;
  right: -16px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 5px;
  border: 2px solid #fff;
  border-radius: 10px;
  background: #128c44;
  color: #fff;
  box-shadow: 0 2px 5px #0008;
  font: 800 11px/1 system-ui;
  pointer-events: none;
}
.unit-map-pin-tx[hidden] {
  display: none;
}
.unit-map-pin-tx-icon {
  width: 13px;
  height: 13px;
}
.unit-map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0 !important;
  border: 2px solid #fff !important;
  border-radius: 50% !important;
  background: #146548 !important;
  color: white !important;
  font: 700 18px system-ui !important;
  box-shadow: 0 2px 5px #0008;
  overflow: hidden;
}
.unit-map-pin.selected {
  background: #1d4ed8 !important;
  outline: 3px solid #93c5fd;
}
.unit-map-pin.stale {
  border-style: dashed !important;
}
.unit-map-pin.offline {
  background: #555f70 !important;
}
.unit-map-popup {
  box-sizing: border-box;
  width: 246px;
  max-width: 100%;
  padding: 14px;
  color: #15243a;
  background: #fff;
  font: 13px/1.4 "Segoe UI", Tahoma, sans-serif;
}
.unit-map-popup-heading,
.unit-map-popup-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.unit-map-popup-heading strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}
.unit-map-popup button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 0;
  cursor: pointer;
  padding: 0;
  min-width: 0;
}
.unit-map-popup .unit-map-popup-close {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  color: inherit;
}
.unit-map-popup-close:hover {
  background: #52677b22;
}
.unit-map-popup-username,
.unit-map-popup-location,
.unit-map-popup-state {
  color: #526379;
  overflow-wrap: anywhere;
}
.unit-map-popup-location {
  margin: 12px 0;
  font-size: 12px;
}
.unit-map-popup-location span,
.unit-map-popup-location time {
  display: block;
}
.unit-map-popup-location time {
  color: #15243a;
  margin-top: 2px;
}
.unit-map-popup-actions {
  border-top: 1px solid #52677b33;
  padding-top: 10px;
  font-size: 12px;
}
.unit-map-popup .unit-map-popup-ptt {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #1344b3;
  color: #fff;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.unit-map-popup-ptt[aria-pressed="true"] {
  box-shadow: inset 0 2px 5px #0005;
}
.unit-map-ptt[data-transmit-state="connecting"],
.unit-map-popup .unit-map-popup-ptt[data-transmit-state="connecting"] {
  background: #ef7d00;
}
.unit-map-ptt[data-transmit-state="transmitting"],
.unit-map-popup .unit-map-popup-ptt[data-transmit-state="transmitting"] {
  background: #128c44;
}
.unit-map-popup-ptt:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.unit-map-popup button:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}
.unit-map-popup-icon {
  width: 22px;
  height: 22px;
  pointer-events: none;
}
.unit-map-popup-close .unit-map-popup-icon {
  width: 18px;
  height: 18px;
}
/* Keep Google's anchored bubble compact while UnitMap owns its contents. */
.unit-map-provider .gm-style-iw-c:has(.unit-map-popup) {
  padding: 0 !important;
}
.unit-map-provider .gm-style-iw-d:has(.unit-map-popup) {
  overflow: auto !important;
}
html[data-theme="dark"] .unit-map-popup {
  background: #122235;
  color: #edf4fa;
}
html[data-theme="dark"] .unit-map-popup-username,
html[data-theme="dark"] .unit-map-popup-location,
html[data-theme="dark"] .unit-map-popup-state {
  color: #b5c6d6;
}
html[data-theme="dark"] .unit-map-popup-location time {
  color: #edf4fa;
}
html[data-theme="dark"] .unit-map-provider .gm-style-iw-c:has(.unit-map-popup),
html[data-theme="dark"] .unit-map-provider .gm-style-iw-t:has(.unit-map-popup) .gm-style-iw-tc::after {
  background: #122235;
}
.unit-map-box-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  cursor: crosshair;
  touch-action: none;
}
.unit-map-box-layer[hidden] {
  display: none;
}
.unit-map-selection-box {
  position: absolute;
  display: none;
  border: 2px solid #60a5fa;
  background: #3b82f633;
  pointer-events: none;
}
html:not([data-theme="dark"]) .unit-map-card {
  background: #fff;
  color: #15243a;
  border-color: #d4dce5;
}
html[data-theme="dark"] .unit-map-launcher-card {
  background: #142233;
  border-color: #2b3d52;
}
html[data-theme="dark"] .unit-map-launcher {
  color: #e0edff;
}
html[data-theme="dark"] .unit-map-launcher:hover {
  background: #22344c;
}
html[data-theme="dark"] .unit-map-user.user-signed-in {
  border-color: #435269;
  background: #1b2d3c;
  color: #8eb7ff;
}
html[data-theme="dark"] .unit-map-user.user-signed-out {
  border-color: #33465c;
  background: #111923;
  color: #7f8b9b;
}
html[data-theme="dark"] .unit-map-user:has(input:checked) {
  border-color: #5d8ee6;
  box-shadow: 0 0 0 2px #3b82f633;
  background: #202b39;
}
@media (max-width: 650px) {
  .unit-map-address-form {
    flex-wrap: wrap;
  }
  .unit-map-address-form input {
    flex-basis: 100%;
  }
  .unit-map-sidebar {
    width: 165px;
    padding: 6px;
  }
  .unit-map-toolbar {
    gap: 5px;
    padding: 8px;
  }
  .unit-map-toolbar button {
    font-size: 11px;
    padding: 6px;
  }
}
