/* style.css – Styling für HackApp */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: sans-serif;
  background: #f5f5f5;
}

#map {
  height: 100vh;
  width: 100%;
}

.custom-marker {
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-dot {
  width: 14px;
  height: 14px;
  border: 2px solid white;
  border-radius: 50%;
  background-color: gray; /* nur als Fallback, wird durch JS überschrieben */
  box-shadow: 0 0 3px rgba(0,0,0,0.6); /* besser sichtbar auf heller Karte */
}

/* Kreuzmarkierung fuer Spezialpunkte */
.marker-x {
  position: relative;
  width: 18px;
  height: 18px;
}
.marker-x::before,
.marker-x::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: red;
  box-shadow: 0 0 0 2px white;
}
.marker-x::before { transform: translateX(-50%) rotate(45deg); }
.marker-x::after  { transform: translateX(-50%) rotate(-45deg); }

.popup-button {
  display: block;
  width: 100%;
  margin: 5px 0;
  padding: 8px 12px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.popup-button.delete {
  background-color: #f44336;
}

.popup-button.map {
  background-color: #2196F3;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74px;
  padding: 6px 10px calc(6px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #f4fbf5 0%, #e6f5e9 100%);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 6px;
  border-top: 1px solid #b7d8bf;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -6px 18px rgba(18, 71, 38, 0.18);
  z-index: 1000;
}

.nav-item {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  flex: 1 1 0;
  min-height: 62px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-decoration: none;
  color: #1f5f3b;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.12s ease;
}

.nav-item img {
  height: 22px;
  width: 22px;
  display: block;
  margin: 0;
  filter: brightness(0) saturate(100%) invert(27%) sepia(30%) saturate(824%) hue-rotate(96deg) brightness(94%) contrast(90%);
  opacity: 0.92;
}


.nav-item svg {
  height: 22px;
  width: 22px;
  display: block;
  color: currentColor;
  opacity: 0.95;
}

.nav-item:hover,
.nav-item:focus-visible {
  background: rgba(58, 143, 88, 0.16);
  color: #0f4f2f;
  outline: none;
}

.nav-item:active {
  transform: translateY(1px);
  background: rgba(58, 143, 88, 0.24);
}

.nav-button {
  cursor: pointer;
  font-family: inherit;
}

@media (min-width: 768px) {
  .bottom-nav {
    left: 12px;
    right: 12px;
    bottom: 10px;
    border-radius: 18px;
  }
}

#coordBox {
  position: fixed;
  right: 10px;
  bottom: calc(96px + env(safe-area-inset-bottom));
  width: min(320px, calc(100vw - 20px));
  max-height: min(60vh, 520px);
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.97);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #cfe4d4;
  box-shadow: 0 10px 24px rgba(14, 58, 31, 0.18);
  z-index: 1100;
  display: none;
}

@media (min-width: 768px) {
  #coordBox {
    right: 16px;
    bottom: 106px;
  }
}

#loginPopup {
  display: none;
  position: fixed;
  bottom: 70px;
  left: 10px;
  background: white;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  z-index: 2000;
}

#loginPopup input {
  width: 160px;
  margin-bottom: 8px;
}

#roleInfo {
  margin-top: 8px;
  font-size: 0.9em;
  color: #444;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#updateToast {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #4CAF50;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  z-index: 2000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
}

#no-markers {
  display: none;
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #f44336;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  z-index: 2001;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.rotate {
  animation: rot 1s linear infinite;
}
@keyframes rot {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#orthoOpacityControl {
  position: fixed;
  top: 60px;
  left: 10px;
  z-index: 1000;
  background: white;
  padding: 4px 8px;
  border-radius: 4px;
}

#orthoOpacity {
  width: 120px;
}
