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

/* Kartenbereich */
#map,
.map {
  height: calc(100vh - 180px); /* Platz für das Chart lassen */
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* Header-Bereich */
.top-bar,
.simple-header {
  background: #222;
  color: white;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.simple-header .container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.simple-header .logo {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0;
}

.simple-header nav a,
.top-bar a.back-link {
  color: #ddd;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
}

.top-bar a.back-link:hover,
.simple-header nav a:hover {
  text-decoration: underline;
  color: #fff;
}

/* Buttons */
.top-bar button,
.modal-content button {
  background-color: #0077cc;
  color: white;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background-color 0.3s;
}

.top-bar button:hover,
.modal-content button:hover {
  background-color: #005fa3;
}

/* Popups für Marker */
.popup-img {
  max-width: 200px;
  border-radius: 6px;
  display: block;
  margin-bottom: 0.5rem;
}

.popup-text {
  font-size: 0.9rem;
  color: #333;
}

/* Modal Overlay */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 0 15px rgba(0,0,0,0.2);
  position: relative;
}

.modal-content h2 {
  margin-top: 0;
}

.modal-content .close {
  position: absolute;
  top: 10px; right: 15px;
  font-size: 1.4rem;
  cursor: pointer;
  color: #888;
}

/* Hauptinhalt */
main.content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
}

/* Chart.js Canvas */
canvas {
  width: 100%;
  max-height: 200px;
  margin-top: 1rem;
}

/* Responsive Anpassungen */
@media (max-width: 600px) {
  .top-bar,
  .simple-header .container {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .top-bar a.back-link,
  .top-bar button {
    font-size: 1.1rem;
    width: 100%;
    padding: 0.75rem;
  }

  .simple-header nav {
    margin-top: 0.5rem;
  }
}

/* Karte mit Fotos */
.popup-img {
  max-width: 200px;
  border-radius: 6px;
  display: block;
  margin-bottom: 0.5rem;
}

/* ----------- Navigationsbuttons am oberen Rand fixieren ------- */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255,255,255,0.95);
  padding: 1rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sticky-btn {
  font-size: 1.2rem;
  padding: 0.9rem 1.25rem;
  border: none;
  border-radius: 6px;
  background-color: #f26c23; /* var(--color-accent) wäre schöner, falls gesetzt */
  color: white;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease-in-out;
  display: inline-block;
}

.sticky-btn:hover {
  background-color: #d85e1f;
}

.sticky-btn.upload {
  background-color: #0077cc;
}

.sticky-btn.upload:hover {
  background-color: #005fa3;
}

@media (max-width: 600px) {
  .sticky-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .sticky-btn {
    width: 100%;
    text-align: center;
    font-size: 1.2rem;
    padding: 1rem;
  }
}

/* Einheitliches Button-Design */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  color: #fff;
  background-color: var(--color-accent, #f26c23);
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background-color 0.2s ease-in-out;
}

.btn:hover {
  background-color: #d85e1f;
}

.btn-blue {
  background-color: #0077cc;
}

.btn-blue:hover {
  background-color: #005fa3;
}

.btn-secondary {
  background-color: #555;
}

.btn-secondary:hover {
  background-color: #333;
}

/* Sticky-Nav für Karten-Header */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.98);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 600px) {
  .sticky-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .sticky-nav .btn {
    width: 100%;
    font-size: 1.2rem;
    padding: 1rem;
  }
}

/* ---------- Sticky-Bereich unten ---------- */
.sticky-bottom-toolbar {
  position: sticky;
  bottom: 0;
  z-index: 998;
  background: rgba(255, 255, 255, 0.95);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
  margin-top: 1rem;
  border-top: 1px solid #ddd;
}

.sticky-bottom-toolbar .btn {
  font-size: 1rem;
  padding: 0.6rem 1.25rem;
}

@media (max-width: 600px) {
  .sticky-bottom-toolbar {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .sticky-bottom-toolbar .btn {
    width: 100%;
    font-size: 1.1rem;
  }
}

/* ---------- Höhenprofil als Sticky-Footer ---------- */
/* Höhenprofil als Overlay – jetzt höher angehoben */
.sticky-elev-chart {
  position: fixed;
  bottom: 100px; /* statt 70px – mehr Luft zur Footer-Bar */
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1000px;
  height: 150px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  z-index: 900;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  padding: 0.5rem;
}

/* Genug Platz unten lassen, damit nichts überlappt */
body {
  padding-bottom: 270px; /* Chart (150px) + Abstand (100px) + Reserve */
}

@media (max-width: 600px) {
  .sticky-elev-chart {
    height: 120px;
    bottom: 100px;
  }

  body {
    padding-bottom: 240px;
  }
}


/* Damit nichts vom Chart verdeckt wird */
body {
  padding-bottom: 240px; /* Höhe Chart + Abstand + Footer */
}


@media (max-width: 600px) {
  .sticky-elev-chart {
    height: 120px;
  }

  body {
    padding-bottom: 130px;
  }
}

/* ---------- Neuer Sticky-Footer mit Logo und Druck ---------- */
.sticky-footer-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  z-index: 950;
  border-top: 1px solid #ccc;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
}

.footer-logo {
  height: 32px;
  max-width: 120px;
  object-fit: contain;
}

.sticky-footer-bar .btn {
  font-size: 1rem;
  padding: 0.6rem 1rem;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .sticky-footer-bar {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .sticky-footer-bar .btn {
    width: 100%;
    font-size: 1.1rem;
    padding: 0.8rem;
  }

  .footer-logo {
    height: 28px;
  }
}


/* --------- Kopf mit Logo und Titel ----- */
.tour-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.tour-title {
  margin: 0;
  font-size: 1.5rem;
}

.tour-logo {
  height: 48px;
  max-width: 160px;
  object-fit: contain;
}

@media (max-width: 600px) {
  .tour-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .tour-logo {
    height: 40px;
  }
}


/* ------ zweispaltiges Kopfdesign mit Logo ---- */

.tour-info-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 1rem;
}

.tour-info-logo-img {
  height: 96px;
  max-width: 160px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.tour-info-details h2 {
  margin-top: 0;
  font-size: 1.5rem;
}

@media (max-width: 600px) {
  .tour-info-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .tour-info-logo-img {
    height: 72px;
    margin-bottom: 0.5rem;
  }
}

.map-style-switcher {
  position: fixed;
  bottom: 140px;
  right: 20px;
  z-index: 1002;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.style-toggle-btn {
  background-color: #0077cc;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.style-toggle-btn:hover {
  background-color: #005fa3;
}

.style-menu {
  margin-top: 0.5rem;
  background: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}

.style-menu button {
  background: none;
  border: none;
  padding: 0.7rem 1rem;
  text-align: left;
  font-size: 1rem;
  cursor: pointer;
  width: 150px;
}

.style-menu button:hover {
  background-color: #eee;
}

.hidden {
  display: none;
}

.drop-area {
  border: 2px dashed #aaa;
  padding: 1.5rem;
  border-radius: 8px;
  background: #f8f8f8;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s;
}
.drop-area.dragover {
  background: #e0f7fa;
  border-color: #0077cc;
}
