/* ==== Container ==== */
.tile-map-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: auto;            /* Standard → Seite darf scrollen */
}
.tile-map-container.map-active {
  touch-action: none;            /* Nur bei aktiver Karte blocken */
}

/* ==== Pan-Wrapper ==== */
.map-pan {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
  transform-origin: 0 0;
}

/* ==== Tile-Layer ==== */
.tile-layer {
  display: grid;
  will-change: transform;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
}
.map-tile {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* ==== Controls ==== */
.map-controls {
  z-index: 100;
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.map-controls button {
  margin: 2px;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #fff;
  border: none;
  font-size: 18px;
  line-height: 1;
}

/* ==== Zoom Display ==== */
.map-zoom-display {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 15px;
  border-radius: 6px;
  z-index: 100;
}

/* ==== Overlay ==== */
.map-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.6) 0%,
    rgba(0,0,0,0.4) 20%,
    rgba(0,0,0,0.3) 50%,
    rgba(0,0,0,0.4) 80%,
    rgba(0,0,0,0.6) 100%
  );
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 200;
  gap: 20px;
  opacity: 1;
  transition: all 0.6s ease-out;
}
.map-overlay svg {
  width: 180px;
  filter: drop-shadow(0 0px 15px rgba(0,0,0,0.4));
  transition: all 0.6s ease, opacity 0.6s ease;
}
.map-overlay h4 {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  filter: drop-shadow(0 0px 15px rgba(0,0,0,0.6));
  transition: all 0.6s ease, opacity 0.6s ease;
  text-align: center;
  translate: 0% 0%;
}

.map-elements {
    user-select: none; -webkit-user-select: none; -ms-user-select: none; 
}

/* Overlay Aktivierung/Return */
.map-overlay.activation,
.map-overlay.idle,
.map-overlay.idle.returning {
  opacity: 0;
}
.map-overlay.activation svg,
.map-overlay.idle svg,
.map-overlay.idle.returning svg {
  transform: scale(3);
  opacity: 0;
}
.map-overlay.activation h4,
.map-overlay.idle h4,
.map-overlay.idle.returning h4 {
  opacity: 0;
  translate: 0 50%;
}

/*UI Active Animation*/
.tile-map-container .map-elements {
  translate: -100%;
  transition: all 0.9s ease;
}

.tile-map-container.map-active .map-elements {
  translate: 0%;
}

.tile-map-container .map-elements *{
  translate: -10%;
  transition: all 0.9s ease;
}

.tile-map-container.map-active .map-elements *{
  translate: 0%;
}

/* Controls/ZoomDisplay Ein-/Ausblendanimation */
.tile-map-container .map-controls {
  translate: 10em;
  transition: all 0.6s ease, opacity 0.6s ease;
}
.tile-map-container .map-zoom-display {
  translate: -10em;
  transition: all 0.6s ease, opacity 0.6s ease;
}
.tile-map-container .map-controls * {
  scale: 2;
  transition: all 0.6s ease, opacity 0.6s ease;
}
.tile-map-container.map-active .map-controls,
.tile-map-container.map-active .map-zoom-display {
  translate: 0em;
}
.tile-map-container.map-active .map-controls * {
  scale: 1;
}