/* === Allgemein === */
body, html {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  background: #121317;
  color: #e2e7ee;
}

#map {
  position: absolute;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
}

/* === Top Right Buttons === */
.top-right {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1000;
  display: flex;
  gap: 10px;
}
.top-right button {
  background: #0078d7;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  font-weight: 500;
  transition: background 0.18s;
}
.top-right button:hover {
  background: #005fa3;
}

/* === Overlay-Fenster (Login/Register/Profile/Info) === */
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.62);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.overlay-content {
  background: #23282e;
  padding: 26px 22px 22px 22px;
  border-radius: 13px;
  width: 95vw;
  max-width: 420px;
  position: relative;
  box-shadow: 0 0 30px #000a;
  color: #e2e7ee;
  min-width: 0;
}
@media (max-width: 480px) {
  .overlay-content {
    padding: 17px 4vw 15px 4vw;
    max-width: 96vw;
  }
}
.close-btn {
  position: absolute;
  top: 8px;
  right: 13px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}

/* === Formulare (Login, Register, Profil) === */
.wrap {
  max-width: 380px;
  padding: 20px 0 8px 0;
  margin: 0 auto;
}
h2 { margin-bottom: 24px; }
label { display:block; margin-top:16px; font-weight: 500; }
input, select {
  width:95%;
  padding:8px;
  border-radius:5px;
  border:1px solid #555;
  margin-top:4px;
  background: #1d2027;
  color: #e2e7ee;
  font-size: 1em;
}
input:focus, select:focus {
  outline: 2px solid #45c6ff;
  border-color: #45c6ff;
}
.btn {
  width:100%;
  padding:12px;
  margin-top:24px;
  background:#0078d7;
  color:#fff;
  font-weight:bold;
  border:0;
  border-radius:7px;
  cursor:pointer;
  font-size: 1em;
  box-shadow: 0 1px 8px #0002;
  transition: background 0.15s;
}
.btn:hover {
  background: #005fa3;
}
.logout {
  background:#222;
  color:#fff;
  margin-top:8px;
}

/* === Info-Text etc. === */
.info-text {
  margin-top: 16px;
  font-size: 0.98em;
  color: #b3cdfb;
  text-align: center;
}
.info-text a {
  color: #45c6ff;
  text-decoration: none;
  font-weight: 500;
}
.info-text a:hover {
  text-decoration: underline;
}

/* === Icons im Profilformular === */
.icons, #iconBar {
  display: flex;
  gap: 7px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}
.icon-btn {
  font-size: 26px;
  padding: 5px 8px;
  border: 2px solid #333;
  border-radius: 8px;
  background: #262b33;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 4px;
  outline: none;
}
.icon-btn.active {
  border-color: #45c6ff;
  background: #28303b;
  box-shadow: 0 0 6px #45c6ff80;
}
.icon-btn:focus {
  border-color: #67eaff;
  background: #27384a;
}

/* === Fehler / Erfolgsmeldungen === */
.error { color: #f44; margin-top: 10px; }
.success { color: #3f4; margin-top: 10px; }

/* === Member Sidebar === */
.member-sidebar {
  position: fixed;
  top: 0;
  right: -350px;
  width: 300px;
  height: 100vh;
  background: #1e1e24;
  color: #eaeaea;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.6);
  transition: right 0.33s cubic-bezier(.6,0,.4,1);
  padding: 60px 24px 20px;
  overflow-y: auto;
  z-index: 999;
}
.members-container {
  display: flex;
  flex-wrap: wrap; /* erlaubt Zeilenumbruch */
  gap: 0.5rem;      /* optionaler Abstand zwischen Einträgen */
}
.member-sidebar.open {
  right: 0;
}
.member-sidebar h3 {
  margin-bottom: 20px;
  font-size: 1.3em;
  color: #78c2ff;
  border-bottom: 1px solid #333;
  padding-bottom: 6px;
}
.member-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.member-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.member-list-item {
  margin-bottom: 12px;
}
.member-entry {
  background: #2d333b;
  margin: 6px 0;
  padding: 6px 10px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}
.member-entry.offline {
  opacity: 0.45;
  filter: grayscale(65%);
}
.member-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.member-right {
  display: flex;
  gap: 6px;
}
.icon {
  width: 20px;
  display: inline-block;
  text-align: center;
}

.name {
  white-space: nowrap;
}
.track-toggle {
  font-size: 18px;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  border-radius: 5px;
  padding: 4px 6px;
}
.track-toggle.active {
  border-color: #0078d7;
  background: #1c2733;
}

.history-btn {
  font-size: 18px;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  border-radius: 5px;
  padding: 4px 6px;
}
.history-btn.active {
  border-color: #0078d7;
  background: #1c2733;
}

.expand-btn {
  background: none;
  border: none;
  color: #ccc;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.2s;
}
.member-details {
  background: #2a2f38;
  padding: 10px 16px;
  font-size: 0.9em;
  color: #ccc;
  border-radius: 0 0 8px 8px;
  display: none;
}

/* === History-Overlay === */
.history-list {
  margin-top: 12px;
}
.history-day-btn {
  display: block;
  width: 100%;
  margin: 6px 0;
  padding: 10px;
  background: #0078d7;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.history-day-btn:hover {
  background: #005fa3;
}

/* === Info-Knopf === */
#infoCircleBtn {
  position: fixed;
  bottom: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  background: rgba(20, 20, 20, 0.6);
  border-radius: 50%;
  color: #fff;
  font-weight: bold;
  font-size: 22px;
  text-align: center;
  line-height: 40px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.13);
  cursor: pointer;
  z-index: 999;
  transition: transform 0.2s;
}
#infoCircleBtn:hover {
  transform: scale(1.1);
}

/* === Leaflet Marker Emoji === */
.custom-div-icon {
  /* kein zusätzlicher Style nötig, da alles inline per JS gerendert */
}

/* === Footer (optional) === */
.footer {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 100%;
  text-align: center;
  z-index: 5;
  font-size: 0.95em;
  color: #aaa;
}
.footer a {
  color: #45c6ff;
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
}
.footer-content {
  background: rgba(20, 20, 20, 0.5);
  display: inline-block;
  padding: 6px 14px;
  border-radius: 8px;
  box-shadow: 0 0 12px #0006;
}
