/* Hilfe-Sprechblase im Stil der anderen Sprechblasen */
.help-bubble {
  position: fixed;
  top: 15vw;
  left: 1vw;
  padding: 30px 35px 20px 35px;
  background: #fffbe6;
  border: solid 3px #000;
  border-radius: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  font-size: 1.15em;
  font-family: "Promisupria", Arial, sans-serif;
  width: 300px;
  text-align: center;
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.4s ease-out;
  z-index: 1000;
  line-height: 1.3;
}

/* Tail/Schwanz für alle Hilfsbubbles (immer tail-side.png) */
.help-bubble::after,
.help-bubble.contextual::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 60px;
  left: 41px;
  top: -40px;
  transform: translateX(-50%) rotate(153deg);
  background-image: url(../img/tail-side.png);
  background-size: contain;
  background-position: top;
  background-repeat: no-repeat;
  pointer-events: none;
}

.help-bubble.visible {
  opacity: 1;
  transform: scale(1);
}

/* Dezente Aufmerksamkeits-Animation */
.help-bubble.visible {
  animation: help-attention 3s ease-in-out infinite;
}

@keyframes help-attention {
  0%,
  90%,
  100% {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  }
  5%,
  10% {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  }
}

/* Pausenanzeige für die Uhr */
#timer.paused {
  animation: timer-pause-pulse 1.5s ease-in-out infinite;
}

@keyframes timer-pause-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Deaktivierte Spielelemente während der Pause */
.place.disabled {
  opacity: 0.5;
  cursor: help !important;
  pointer-events: auto; /* Erlaubt Klicks für Hilfeanzeige */
}

.place.disabled::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1);
  border-radius: inherit;
  pointer-events: none;
}

/* Sicherstellen, dass Placemarks nicht verschoben werden */
.paused .place {
  cursor: help !important;
  transition: all 0.2s ease;
  position: absolute !important; /* Placemarks sind absolute positioniert */
  opacity: 1 !important; /* Überschreibt die .disabled opacity */
}

.paused .place:hover {
  transform: scale(1.05);
  transform-origin: center;
  opacity: 1 !important; /* Stellt sicher, dass Hover auch sichtbar ist */
}

.paused .place::after,
.paused .place::before {
  display: none !important;
}

#carousel.disabled,
.panorama-container.disabled,
#panorama.disabled,
#pano.disabled {
  pointer-events: auto; /* Erlaubt Klicks für Hilfeanzeige */
}

#carousel.disabled .character {
  pointer-events: none;
  opacity: 0.7;
}

/* Panorama-Elemente bleiben vollständig sichtbar */
.panorama-container.disabled .tile,
.panorama-container.disabled .check,
#panorama.disabled .tile,
#panorama.disabled .check,
#pano.disabled .tile {
  pointer-events: auto !important; /* Erlaubt Klicks für Hilfeanzeige */
}

/* Kontextuelle Hilfsbubble */
.help-bubble.contextual {
  background: #fffbe6;
  border-color: #000;
  animation: none;
}

/* Interaktive Elemente während der Pause hervorheben */
.paused #co2-display,
.paused #food-display,
.paused #player,
.paused #score,
.paused #score-value,
.paused #co2-scale,
.paused #food,
.paused #circle,
.paused #inner-circle,
.paused #pano .tile,
.paused #carousel .character,
.paused .tile-info,
.paused .values,
.paused .tile .values,
.paused .co2,
.paused .food,
.paused .co2-value,
.paused .food-value {
  cursor: help !important;
  position: relative;
  transition: all 0.2s ease;
}

/* Panorama Check-Button muss absolut positioniert bleiben */
.paused #panorama .navicon.check {
  cursor: help !important;
  position: absolute !important;
  transition: all 0.2s ease;
}

/* Placemarks separat behandeln - siehe oben */

.paused #co2-display:hover,
.paused #food-display:hover,
.paused #score:hover,
.paused #score-value:hover,
.paused #co2-scale:hover,
.paused #food:hover,
.paused #circle:hover,
.paused #inner-circle:hover,
.paused #pano .tile:hover,
.paused #panorama .navicon.check:hover,
.paused #carousel .character:hover,
.paused .tile-info:hover,
.paused .values:hover,
.paused .tile .values:hover,
.paused .co2:hover,
.paused .food:hover,
.paused .co2-value:hover,
.paused .food-value:hover {
  transform: scale(1.05);
  transform-origin: center;
}

/* Spezielle Regel für Player - sicherstellen dass Zoom funktioniert */
.paused #player {
  transform-origin: center;
}

.paused #player:hover img {
  transform: scale(1.05);
  transform-origin: center;
}

.paused #player img {
  pointer-events: none;
  transform-origin: center;
  transition: transform 0.2s ease;
}

/* Pausierte Timer-Anzeige */
.pause-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -37%);
  width: 38%;
  height: 35%;
  border-radius: 6px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes pause-pulse {
  0%,
  100% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

/* Fix: Player im Pausenmodus klickbar machen */
.paused #player,
.paused .player-img-container,
.paused .player-img {
  pointer-events: auto !important;
  cursor: help !important;
}

/* Fix: Placemarks im Pausenmodus immer klickbar */
.paused .place.disabled {
  pointer-events: auto !important;
  cursor: help !important;
}

/* Fix: Sicherstellen, dass alle Elternelemente von Placemarks klickbar sind */
.paused .map-container,
.paused #map {
  pointer-events: auto !important;
}

.paused .place,
.paused .place img {
  pointer-events: auto !important;
  cursor: help !important;
}
