.map-page {
  height: calc(100vh - 96px);
  min-height: 540px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0.6rem;
}
.map-toolbar {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}
.map-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 330px);
  min-height: 0;
  border: 1px solid var(--lx-border);
  border-radius: 0.8rem;
  overflow: hidden;
  background: #e8ecef;
}
.lage-map {
  height: 100%;
  min-height: 420px;
}
.map-side-panel {
  min-width: 0;
  max-height: 100%;
  overflow: auto;
  background: #fff;
  border-left: 1px solid var(--lx-border);
}
.map-side-panel .accordion-button {
  padding: 0.65rem 0.8rem;
  font-size: 0.88rem;
}
.map-side-panel .accordion-body {
  padding: 0.7rem;
}
.adsb-aircraft-marker span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #17202a;
  filter: drop-shadow(0 1px 2px #fff) drop-shadow(0 2px 2px #0006);
}
.adsb-aircraft-marker i {
  display: block;
  font-size: 1.25rem;
  line-height: 1;
}
.adsb-aircraft-marker img {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.flight-aircraft-popup {
  min-width: 250px;
}
.flight-aircraft-popup > strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}
.flight-aircraft-popup dl {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(80px, auto);
  gap: 0.25rem 0.75rem;
}
.flight-aircraft-popup dt,
.flight-aircraft-popup dd {
  min-width: 0;
  margin: 0;
  white-space: nowrap;
}
.flight-aircraft-popup dd {
  text-align: right;
}
.map-freehand-active {
  cursor: crosshair !important;
  touch-action: none;
}
.tactical-marker {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px #0006;
  color: #fff;
  font-size: 15px;
}
.tactical-red {
  background: #c8202f;
}
.tactical-green {
  background: #198754;
}
.tactical-blue {
  background: #0d6efd;
}
.tactical-dark {
  background: #343a40;
}
.vehicle-map-marker {
  transform-origin: center;
  white-space: nowrap;
}
.vehicle-map-marker .tactical-marker {
  border-radius: 7px;
}
.vehicle-tactical-symbol {
  display: flex;
  width: 78px;
  height: 50px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  pointer-events: auto;
}
.vehicle-tactical-symbol > strong {
  max-width: 78px;
  margin-bottom: 1px;
  overflow: hidden;
  color: #17212b;
  font-size: 9px;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow:
    0 1px 2px #fff,
    0 -1px 2px #fff,
    1px 0 2px #fff,
    -1px 0 2px #fff;
  white-space: nowrap;
}
.vehicle-tactical-symbol > svg {
  width: 44px;
  height: 30px;
  overflow: visible;
  background: #fff;
  box-shadow: 0 2px 6px #0004;
  transform-origin: center;
}
.vehicle-tactical-symbol > svg rect {
  fill: #ffffffeb;
  stroke: #2f80d0;
  stroke-linejoin: round;
  stroke-width: 7px;
}
.vehicle-tactical-symbol > svg text {
  fill: #2f80d0;
  font-family: Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
}
.vehicle-map-label {
  font-weight: 700;
  color: #17212b;
  border: 1px solid #adb5bd;
  box-shadow: 0 1px 4px #0003;
}
.map-history-item {
  font-size: 0.78rem;
}
.map-vehicle-list {
  max-height: 230px;
  overflow: auto;
}
.map-vehicle-group-title {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.3rem 0.55rem;
  background: #e9ecef;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}
.map-vehicle-item {
  padding: 0.5rem 0.6rem;
  font-size: 0.78rem;
}
.map-draw-tools,
.map-icon-palette {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.2rem;
}
.map-draw-tools {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.map-draw-tools button,
.map-icon-choice,
.map-object-choice {
  border: 1px solid #ced4da;
  background: #fff;
  border-radius: 0.3rem;
  min-height: 32px;
}
.map-draw-tools button:hover,
.map-icon-choice:hover {
  border-color: #c8202f;
  background: #fff5f5;
}
.map-icon-choice {
  padding: 0.15rem;
  display: grid;
  place-items: center;
}
.map-icon-choice img {
  width: 22px;
  height: 22px;
}
.map-object-choice {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0.15rem;
}
.map-object-choice img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.map-object-choice span {
  width: 100%;
  overflow: hidden;
  font-size: 0.55rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-draw-tools button {
  padding: 0.2rem;
  font-size: 0.9rem;
}
.map-color-row .form-label {
  margin-bottom: 0.15rem;
}
.map-color-row .form-control-color {
  min-height: 32px;
  height: 32px;
  padding: 0.15rem;
}
.map-drawing-appearance {
  display: grid;
  grid-template-columns: 68px 68px minmax(140px, 1fr);
  gap: 0.5rem;
  align-items: end;
  white-space: nowrap;
}
.map-drawing-appearance .form-label {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.68rem;
}
.map-compact-color {
  width: 42px;
  min-width: 42px;
  height: 32px;
  min-height: 32px;
  padding: 0.15rem;
}
.map-object-appearance legend {
  margin-bottom: 0;
}
.map-pattern-picker {
  display: grid;
  grid-template-columns: repeat(4, 32px);
  gap: 0.25rem;
}
.map-pattern-picker label {
  cursor: pointer;
}
.map-pattern-preview {
  display: block;
  width: 32px;
  height: 32px;
  border: 1px solid #6c757d;
  border-radius: 0.25rem;
  background-color: #fff;
}
.map-pattern-picker input:checked + .map-pattern-preview {
  border: 2px solid var(--bs-danger);
  box-shadow: 0 0 0 2px rgb(220 53 69 / 20%);
}
.map-pattern-none {
  background-image: linear-gradient(135deg, transparent 46%, #dc3545 47%, #dc3545 53%, transparent 54%);
}
.map-pattern-diagonal {
  background-image: repeating-linear-gradient(135deg, transparent 0 5px, #495057 5px 7px);
}
.map-pattern-cross {
  background-image:
    repeating-linear-gradient(45deg, transparent 0 5px, #495057 5px 6px),
    repeating-linear-gradient(135deg, transparent 0 5px, #495057 5px 6px);
}
.map-pattern-dots {
  background-image: radial-gradient(circle, #495057 1.5px, transparent 1.7px);
  background-size: 8px 8px;
}
.map-stroke-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}
.map-strength-control .form-label {
  margin-bottom: 0;
}
.map-stroke-row .form-check {
  margin: 1rem 0 0;
  white-space: nowrap;
}
.map-icon-choice span {
  font-size: 0.58rem;
  line-height: 1.05;
  overflow: hidden;
  width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.map-coordinate-readout {
  font-family: monospace;
  font-size: 0.75rem;
}
.poi-map-marker {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: var(--poi-color);
  color: #fff;
  box-shadow: 0 2px 8px #0007;
  transform: rotate(-45deg);
}
.poi-map-marker > * {
  max-width: 21px;
  max-height: 21px;
  transform: rotate(45deg);
}
.poi-map-marker-assigned {
  outline: 4px solid #198754;
  outline-offset: 1px;
}
.poi-map-marker-assigned:after {
  content: '✓';
  position: absolute;
  right: -8px;
  top: -8px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #198754;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  transform: rotate(45deg);
}
.poi-map-popup {
  min-width: 235px;
}
.map-tooltip-photos {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.55rem;
  overflow-x: auto;
}
.map-tooltip-photos img {
  display: block;
  width: 88px;
  height: 62px;
  object-fit: cover;
  border-radius: 0.45rem;
}
.poi-popup-info {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.1rem 0.5rem;
  margin: 0.4rem 0;
  font-size: 0.75rem;
}
.poi-popup-info dt,
.poi-popup-info dd {
  margin: 0;
}
.poi-popup-info dd {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-poi-filters {
  display: grid;
  gap: 0.2rem;
  max-height: 180px;
  overflow: auto;
}
.map-poi-filters .form-check {
  margin: 0;
}
.poi-filter-color {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  margin-right: 0.35rem;
  border-radius: 50%;
  vertical-align: middle;
}
.map-page:fullscreen {
  background: #fff;
  padding: 0.75rem;
  height: 100vh;
}
.map-page:fullscreen .map-workspace {
  height: calc(100vh - 70px);
}
@media (max-width: 767.98px) {
  .map-workspace {
    display: block;
  }

  .map-page {
    height: calc(100vh - 74px);
  }
  .map-side-panel {
    top: auto;
    bottom: 0.5rem;
    right: 0.5rem;
    max-height: 42%;
    width: calc(100% - 1rem);
  }
  .map-toolbar .form-select {
    max-width: 150px;
  }
}
.map-vehicle-item > span {
  font-size: 0.72rem;
  color: #6c757d;
}
