#Map-template {
    width: 100%;
    height: 100%;
    margin: 0;
    border: 2px solid #444;
    position: absolute;
    overflow: hidden;
    inset:0;
}


#map {
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
}

#map-root{
  position: absolute;
  inset: 0;
  z-index: 10;
  background-color: var(--color-nav);
  padding-right: 6px
}
#map-root.hidden{
  display: none;
}
.leaflet-container{
  background-color: #e5e5e5 !important;
  border-radius: 15px;
}

/* Koordinaten-Anzeige */
#coords {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.8);
    padding: 5px;
    font-size: 14px;
    border-radius: 5px;
}

/* focus entfernen (recheckiger rahmen um das polygon) */
.leaflet-interactive:focus{
    outline: none !important;
}


/* filter */
.airport-label-icon {
    font-weight: bold;
    font-size: 1em;
    color: black;
    text-shadow: 1px 1px 2px white;
    pointer-events: none;
    white-space: nowrap;
  }

.filter-popup {
  position: fixed;
  top: 100px;
  right: 20px;
  background: white;
  border: 1px solid #aaa;
  padding: 15px;
  z-index: 2000;
  display: block;
  max-width: 300px;
  min-width: 200px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.filter-popup.hidden, .hidden {
  display: none;
}

.popup-close {
  position: absolute;
  top: 5px;
  right: 5px;
  border: none;
  background: transparent;
  cursor: default;
  font-size: 18px;
  cursor: default;
  color: #333;
}


.layer-checkboxes{
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 12px;
}


.airport-label {
  font-size: 14px;
  font-weight: bold;
  color: #666;
  white-space: nowrap;
  transform: scale(1);
  transform-origin: left center;
  pointer-events: none;
}

.custom-context-menu {
  position: absolute;
  background: white;
  border: 1px solid #aaa;
  z-index: 10000;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  padding: 4px 0;
  font-size: 14px;
  min-width: 160px;
}
.menu-item {
  padding: 6px 12px;
  cursor: default;
}
.menu-item:hover {
  background-color: #eef;
}
.menu-item.no-hover {
  background: #f8f8f8;
  cursor: default;
}
.submenu {
  position: absolute;
  top: 0;
  left: 100%;
  background: white;
  border: 1px solid #ccc;
  display: none;
}
.menu-item:hover .submenu {
  display: block;
}

.menu-close {
  position: absolute;
  top: 4px;
  right: 8px;
  cursor: default;
  font-weight: bold;
  color: #666;
}
.menu-close:hover {
  color: red;
}

.tooltip-line-content {
  position: relative;
  padding-right: 20px;
}

.tooltip-line-close {
  position: absolute;
  top: 0px;
  right: 0px;
  font-size: 18;
  padding: 5px;
  font-weight: bold;
  color: #666;
}
.tooltip-line-close:hover {
  color: red;
  background-color: rgba(119, 119, 119, 0.37);
}
.route-x-mark {
    font-size: 16px;
    font-weight: bold;
    color: black;
    text-shadow:
        -1px -1px 0 white,
         1px -1px 0 white,
        -1px  1px 0 white,
         1px  1px 0 white;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}
.route-point-square {
    width: 10px;
    height: 10px;
    background: #007cff;        /* schönes kräftiges blau */
    border: 2px solid white;    /* readability auf jeder Karte */
    box-shadow: 0 0 2px rgba(0,0,0,0.6);
    border-radius: 2px;
}

.route-label {
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    border: 1px solid #888;
    white-space: nowrap;
    display:inline-block;
  }

.linkline-tooltip-hover {
    background: white;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #444;
}


.leaflet-tooltip.linkline-tooltip {
  pointer-events: auto !important;
    cursor: default !important;

}

.linkline-tooltip-primary {
    border: 2px solid red !important; /* roter Rahmen für den ersten Tooltip */
}

.leaflet-popup-close-button {
  cursor: default !important;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
  text-decoration: none;
  background-color: transparent; /* wichtig */
}

.leaflet-popup-close-button:hover {
  background-color: rgba(119, 119, 119, 0.2) !important;
  color: red !important;
}

@keyframes labelFlash {
  0%, 100% {
    color: rgb(255, 0, 0);
    opacity: 1;
    transform: scale(1);
  }
  50% {
    color: rgb(0, 0, 0);
    opacity: 0.3;
    transform: scale(2);

  }
}
#nearest-clear-btn {
    background: #666;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    margin-top: 8px;
    cursor: not-allowed;
    opacity: 0.5;
}

#nearest-clear-btn.active {
    background: #d9534f;
    cursor: pointer;
    opacity: 1;
}

#nearest-clear-btn.active:hover {
    background: #c9302c;
}

#clear-lines-btn {
    position: absolute;
    top: 120px;
    right: 20px;
    background: #d9534f;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 8px;
    font-size: 14px;
    cursor: pointer;
    z-index: 1000;
    display: none;
}
#clear-lines-btn:hover {
    background: #c9302c;
}


.waypoint-label {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* Abstand zwischen Text und ✖ */
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
  z-index: 9999; /* optional */

}
.navaid-label {
  display: inline-flex;
  align-items: center;
  gap: 8px; /* Abstand zwischen Text und ✖ */
  font-size: 10px;
  white-space: nowrap;
  z-index: 9999; /* optional */

}

.waypoint-remove {
  margin-left: 8px;
  color: red;
  cursor: pointer;
  font-weight: bold;
  display: inline-block;
  padding: 4px 6px;
  line-height: 1;
  user-select: none;
  background-color: transparent; /* Optional */
}

.waypoint-label.flash {
  animation: labelFlash 0.5s ease-in-out 4; /* 4 Wiederholungen à 0.5s = 2s */
}

/* tooltip */
.tooltip-wrapper{
	display: flex;
	justify-content: space-between; 
	align-items: flex-start;
}

.tooltip-hightlight{
	text-align: right;
	min-width: 120px;
}

.tooltip-hover{
  border: 1px solid transparent;
  box-sizing: border-box;
}

.tooltip-hover:hover {
	border: 1px solid black;
  flex-shrink: 0;
	cursor: pointer;
}

.edr-label {
  opacity: 1;
  color: rgb(0, 0, 0);
  line-height: 1;
  min-width: 100px;
  text-align: center;
  font-size: 13px;
  opacity: 0.8;
  border-radius: 4px;
  pointer-events: none;
}

.leaflet-tooltip.coord-tooltip{
  background-color: #0f1824e8;
  color: white;
  font-weight: bold;
  font-size: 16px;
  border-color: black;
}




/* SIM */
.sim-label{
  min-width: 80px;
}
.sim-label.highlight{
  border: 2px solid black;
}
.insideAirspace{
  color: rgba(117, 0, 0, 0.808);
  font-weight: bold;
  text-shadow:
    -1px -1px 0 white,
     1px -1px 0 white,
    -1px  1px 0 white,
     1px  1px 0 white;
}
.sim-label[data-squawk="7000"]:not(.insideAirspace){
  color: green;
}


/* CROSS */
.sim-cross {
  pointer-events: none;
}

.sim-cross .cross {
  position: relative;
  width: 12px;
  height: 12px;
}

.sim-cross .cross span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  background: black;
  transform-origin: center;
}

.sim-cross .cross span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

.sim-cross .cross span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}


/* ADSB LABEL */
.adsb-wrap {
  position: relative;
  pointer-events: none;
}

/* ❌ liegt EXAKT auf der Position */
.adsb-x {
  position: absolute;
  left: -6px;     /* halbe Breite des X */
  top: -6px;      /* halbe Höhe des X */
  font-size: 12px;
  line-height: 1;
  user-select: none;
  color: black;
  text-shadow:
    -1px -1px 0 white,
     1px -1px 0 white,
    -1px  1px 0 white,
     1px  1px 0 white;
}

/* 🏷️ Label 12–18px rechts daneben */
.adsb-label {
  position: absolute;
  left: 14px;   /* 👉 Abstand vom X */
  top: -7px;    /* vertikal auf X zentrieren */
  white-space: nowrap;
  border: 1px solid rgba(36, 34, 34, 0.651);
  font-size: 14px;
}
.adsb-label.highlight {
  color: red
}