/* ============================= */
/* Allgemeine Layouts & Reset    */
/* ============================= */
html, body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: white;
    background: linear-gradient(135deg, #1c3d6e, #a6b8c5); /* Dunkleres Blau (#1c3d6e) */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100%;
    -webkit-overflow-scrolling: touch;
    overflow: hidden;
    padding-top:14px;
}

body {
    display: flex;
    flex-direction: column;
}

:root {
    --safe-top: 0px;
}
body.yo-app {
    --safe-top: env(safe-area-inset-top, 0px);
    padding-top: calc(var(--safe-top) + 26px);
}
body.yo-app .footer {
    bottom: 46px;
}

h3 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

/* ============================= */
/* Buttons                        */
/* ============================= */
button {
    cursor: pointer;
    border: none;
    padding: 10px 50px; /* Größere Buttons für mobile Ansicht */
    border-radius: 8px;
    font-size: 1rem; /* Größere Schrift für bessere Lesbarkeit */
    transition: background-color 0.2s, color 0.2s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 4px;
}

button:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.5;
    cursor: default;
}

/* Stil für den "Account löschen"-Button */
.delete-btn {
    background-color: #00000026;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    font-size: 1rem;
    cursor: pointer;
    margin-top: 12px;
}

.delete-btn:hover {
    background-color: #534c4c;
}

/* Stil für den "Standort freigeben"-Button */
.location-btn {
    background-color: #00000026;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    font-size: 1rem;
    cursor: pointer;
    margin-top: 12px;
}

.location-btn:hover {
    background-color: #534c4c;
}

.clearCache {
    background-color: #00000026;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    font-size: 1rem;
    cursor: pointer;
    margin-top: 12px;
}

.clearCache:hover {
    background-color: #534c4c;
}

/* Anmelden Button */
#loginBtn {
    background-color: #00000026;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 12px;
    border: none;
}

#loginBtn:hover {
    background-color: #534c4c; 
}

/* Registrieren Button */
#registerBtn {
    background-color: #28a745; /* Grün */
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-top: 12px;
    border: none;
}

#registerBtn:hover {
    background-color: #218838; /* Dunkleres Grün bei Hover */
}

/* Allgemeine Gestaltung des Registrierungshinweises */
.registration-hint {
  margin-top: 12px;
  font-size: 1rem;
  background-color: rgba(0, 123, 255, 0.1); /* sanfte Hintergrundfarbe (blau) */
  padding: 15px;
  border-left: 5px solid #007bff; /* Blaue Linie links */
  border-radius: 5px;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* leichter Schatten für Tiefe */
  transition: all 0.2s ease;
}

/* Hover-Effekt für eine lebendigere Interaktion */
.registration-hint:hover {
  background-color: rgba(0, 123, 255, 0.15);
  transform: scale(1.02);
}

.bubbles-active .registration-hint {
    background-color: #00000026;
    border-left: 5px solid #ffb800;
}

/* Optional: für den Fall, dass der Text auf Mobilgeräten besser skaliert werden soll */
@media (max-width: 768px) {
  .registration-hint {
    font-size: 0.9rem; 
    padding-top: 0px;
    margin-top: 12px !important;
    
  }

  .registration-hint h4,
  .registration-hint p {
    margin-block-start: 0.33rem;
    margin-block-end: 0.33em;
}

}

/* ============================= */
/* Sende-Button                    */
/* ============================= */
.send-btn {
    background-color: #00000026;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    font-size: 1rem;
    cursor: pointer;
    margin-top: 12px;
}

.send-btn:hover {
    background-color: #534c4c;
}

/* ============================= */
/* Löschen / Akzeptieren / Ablehnen */
.delete {
    background-color: #c41717;
    color: white;
    margin-left:auto;
}

.call {
     margin-left:auto;
}

.delete:hover {
    background-color: red;
}

.accept {
    background-color: #00000026;
    color: white;
}

.accept:hover {
    background-color: #388e3c;
}

.reject {
    background-color: #00000026;
    color: white;
}

.reject:hover {
    background-color: #c41717;
}

.search-btn {
    background-color: #00000026;
    color: white;
}

.search-btn:hover {
    background-color: #534c4c;
}

/* ============================= */
/* Input Fields                   */
/* ============================= */
input[type="text"], input[type="email"], input[type="password"], .input-field {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 8px;
    outline: none;
    width: 99%; 
    margin: 8px 0;
    font-size: 1rem;
    border-left: 5px solid #007bff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
.input-field:focus {
    border-top-color: red;
    border-right-color: red;
    border-bottom-color: red;
    border-left: 5px solid red;

    box-shadow: 0 0 3px rgba(0,123,255,0.5);
}

body.bubbles-active input[type="text"],
body.bubbles-active input[type="email"],
body.bubbles-active input[type="password"],
body.bubbles-active .input-field {
    /* hier nur das, was sich ändern soll */
    border-left-color: #ffb800;
}

body.bubbles-active input[type="text"]:focus,
body.bubbles-active input[type="email"]:focus,
body.bubbles-active input[type="password"]:focus,
body.bubbles-active .input-field:focus {
    border-left: 5px solid red;
}

body.bubbles-active #password {
  border-left: 5px solid #ff9800;
}

/* Container für Passwortfeld und Button */
.password-container {
  position: relative;
  display: flex; /* Setzt das Passwortfeld und den Button nebeneinander */
  align-items: center; /* Vertikale Zentrierung */
  width: 100%;
}

/* Passwort-Eingabefeld */
#password {
  width: 100%;
  padding: 8px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  margin: 8px 0;
  outline: none;
  border-left: 5px solid #007bff;
}

#password:focus {
  border-left: 5px solid red;
  border-color: red;
}

body.bubbles-active #password:focus {
  border-left: 5px solid red;
  border-color: red;
}

/* Button Styling (Augensymbol) */
#togglePassword {
  background: none;
  border: none;
  color:black; /* Farbe für das Auge */
  cursor: pointer;
  font-size: 1.4rem; /* Größe des Symbols */
  position: absolute;
  right: -47px; /* Setzt den Button ganz rechts im Container */
}

/* Styling für das Auge-Symbol */
#togglePassword i {
  font-size: 1.5rem; /* Größe des Symbols */
}

/* ============================= */
/* Kontakte & Suchbereich         */
/* ============================= */

.request-item {
    flex-wrap: wrap;          /* erlaubt Umbruch */
    gap: 8px;                 /* Abstand zwischen Elementen */
}

.request-item span {
    flex: 1 1 100%;           /* Text bekommt eigene Zeile wenn nötig */
    word-break: break-word;   /* lange E-Mails brechen */
}

.result-item, .contact-item, .request-item {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.result-item:hover,
.contact-item:hover {
    background-color: #534c4c;
}

.request-item:hover {
    background-color: #00000026;
    color: white;
}

.request-item button {
    flex: 1;                  /* Buttons gleich breit */
    min-width: 120px;
}

.contact {
    padding: 6px 8px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    border-radius: 8px;
    font-size: x-large;
    background: #00000026;
    margin-bottom: 0.5vh;
}
.contact:hover {
    background-color: #534c4c;
    color: white;
}

.contact.active {
    background-color: #534c4c;
    color: white;
}

.contact.has-new-message::after {
    content: '•';
    color: #ff4d4f;
    margin-left: 5px;
}

/* ============================= */
/* Container Sections            */
/* ============================= */
#loginContainer,
#contactsContainer,
#mapContainer,
#infoContainer,
#groupChatContainer  {
    color: #ededed;
    display: none;
    padding: 10px;
    margin: 15px;
}

#groupChatContainer,
#infoContainer,
#contactsContainer{
  margin: 0px!important;
  height: 65vh;
  overflow: scroll!important;
}

#mapContainer {
  position: relative;
}

#loginContainer{
    overflow-y: scroll;
    height: 65vh;
    overflow-x: hidden;
    margin-top: auto;
}

#messengerContainer {
    display: flex;
    flex-direction: row;
    gap: 10px;
    height: 500px;
    padding: 10px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s;
    height:700px;
}

/* Aktiv sichtbarer Container */
#loginContainer.active,
#contactsContainer.active,
#mapContainer.active,
#infoContainer.active,
#groupChatContainer.active {
    display: block;
}

#messengerContainer.active {
    visibility: visible;
    opacity: 1;
}

#contactsContainer.active + #messengerContainer {
    display:none;
}


/* Suchbereich */
#contactsContainer div:first-child {
    margin-bottom: 20px;   
}

/* ============================= */
/* Messenger Hintergrund
/* ============================= */
#messages {
    max-height: 54vh;
    height: 55vh;
    padding: 10px;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid;
    border-radius: 8px;
    flex: 1;
    overflow-y: auto;
    -webkit-user-select: text;
    user-select: text;
    -webkit-overflow-scrolling: touch;
}
body.keyboard-open #messages {
    max-height: 30vh !important;
}

.message {
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    max-width: 94%;
    word-wrap: break-word;
    font-size: 1rem;
    line-height: 1;
    -webkit-user-select: text;
    user-select: text;
    -webkit-overflow-scrolling: touch;
}

.msg-text {
  -webkit-user-select: text;
  user-select: text;
}

.msg-text a {
  -webkit-user-select: text;
  user-select: text;
}

/* Sende-Nachrichten */
.message.sent {
    background-color: #00000026; 
    color: white;
    align-self: flex-end;
}

/* Empfangene Nachrichten */
.message.received {
    background-color: #e0e0e05e; 
    color: white;
    align-self: flex-start;
}

/* Systemnachrichten */
.system-msg {
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 10px 0;
}

/* Chat-Input */
#messageInput {
    width: calc(100% - 120px);
    padding: 8px;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-right: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); /* Leichter Schatten */
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

#sendBtn {
    padding: 3px 5px; 
    border-radius: 8px; 
    background-color: #00000026;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Leichter Schatten für den abgehobenen Effekt */
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s; /* Sanfte Übergänge */
    font-size: 1.8rem;
    top: 8px;
    position: relative;
}

#sendBtn:hover {
    background-color: #534c4c; /* Dunkleres Blau bei Hover */
    transform: translateY(-2px); /* Hebt den Button leicht an */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Verstärkter Schatten bei Hover */
}

#sendBtn:active {
    transform: translateY(1px); /* Leichte Senkung des Buttons bei Klick */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); /* Dezentere Schatten bei Aktivierung */
}

/* ============================= */
/* Menü-Buttons                  */
/* ============================= */

#topMenuBar {
    display: flex;
    flex-direction: row;
    gap: 5px;
    padding: 8px 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    align-items: center;
    flex-wrap: nowrap; /* keine Zeilenumbrüche */
    border-radius: 8px;
    width: 97.5%;
    margin-left: 1.5vh;
    background-color: #00000026;

}

#topMenuBar button {
    background-color: transparent;
    border: 1px solid #ffffff;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 1.4rem;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05), inset 0 1px 2px rgba(255,255,255,0.4);
    transition: background-color 0.2s, transform 0.1s;
    min-width: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hover-Effekt für alle Buttons */
#topMenuBar button:hover {
    background-color: #b1bbc8;
    color: white;
    transform: translateY(-1px);
}

.contact-nickname {
  display: inline-block;
  padding: 10px 10px;
  background-color: #00000026; 
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color 0.2s, transform 0.1s;
  width: 30vh;
}

.contact-nickname:hover {
  background-color: #534c4c;
  transform: scale(1.05);
}

.contact-nickname:active {
  background-color: #00408a;
  transform: scale(0.95);
}

/* Symbole über CSS ::before */
#menuMapBtn::before { content: "🗺️"; }
#menuChatBtn::before { content: "💬"; }
#menuSettingsBtn::before { content: "⚙️"; }
#menuGroupBtn::before { content: "👨‍👩‍👦"; }
#menuInfoBtn::before { content: "ℹ️"; }

#menuChatBtn {
  position: relative;
}

#chatBadge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  border-radius: 50%;
  background: red;
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

#menuContactsBtn {
  position: relative;
}

#contactsBadge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  border-radius: 50%;
  background: red;
  color: white;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

/* Für den Kontakte-Button */
#menuContactsBtn::before {
    content: "👤"; /* Standard-Symbol */
    transition: content 0.2s ease; /* Sanfter Übergang für das Symbol */
}

/* Hover-Effekt nur für den Kontakte-Button */
#menuContactsBtn:hover::before {
    content: "🧑🏻‍💻"; /* Weißes Symbol (mit einer helleren Darstellung) */
}

/* Logout-Button */
#logoutBtn {
    background-color: #ff0202!important;
    margin-left: auto; /* Schiebt den Logout-Button ans Ende */
}

#logoutBtn:hover {
    background-color: #a71d2a!important;
}


#map {
  width: 100%;  /* Setze die Breite */
  height: 50vh;  /* Setze die Höhe */
  border-radius: 8%;  /* Macht den Container kreisförmig */
  overflow: hidden;  /* Verhindert, dass Elemente aus dem Container herausragen */
  border: 2px solid #000;  /* Optional: Fügt einen Rand hinzu */
  opacity: 0.85;
}

#mapControls {
  display: flex;
  flex-direction: column;
  background-color: transparent;
  padding: 10px;
  border-radius: 8px;
}

#info{
    width: 100%;  /* Setze die Breite */
    height: 65vh;  /* Setze die Höhe */
    overflow: auto;
}

#groupChat{
    width: 100%;  /* Setze die Breite */
    height: 65vh;  /* Setze die Höhe */
    overflow: auto;
}

.settings-container {
  display: none;
  padding: 10px;
  margin: 15px; /* wie #contactsContainer */
  color: white;
  overflow: scroll;
  height: 65vh;
}

.settings-container.active {
  display: block;
}

#chatList {
        color:#dfdfdf;
        display: flex;
        flex-direction: column;
        width:100%;
        overflow-y: auto;
        border-radius: 8px;
        height: 65vh;
        overflow: scroll;

    }


#chatList.active {
  display: flex;
}
#closeChatWindowBtn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: transparent;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}

#closeChatWindowBtn:hover {
  color: var(--primary-color); /* passt zu deinem Theme */
}

#chatWindow {
    display: none;
    color:white;
    position: relative;
    width: 100%;
    max-height: 300px;
    margin-top: 10px;

}

/* Aktiv angezeigt */
#chatWindow.active {
        display: flex;
        flex-direction: column;
}

/* Header-Leiste im Chat */
#chatHeaderBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  line-height: 24px;;
}

/* Buttons rechts nebeneinander */
.chatHeaderButtons {
  display: flex;
  gap: 6px;
  top: -23px;
  position: relative;
}

/* Close-Button rot */
#closeChatWindowBtn {
  background-color: #ff4d4f;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1rem;
  cursor: pointer;
}

#closeChatWindowBtn:hover {
  background-color: #cc0000;
}

/* Positioniere den Footer immer am unteren Rand */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  color: white;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 400;
}

/* Inhalt innerhalb des Footers zentrieren */
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Footer-Link-Styling */
.footer-link {
  color: #007bff;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Der Container für die Datenschutzseite */
.privacy-policy-container {
    display: none; /* Standardmäßig ist der Container versteckt */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    width: 80%;
    max-width: 800px;
    z-index: 1000;
    overflow-y: auto;
    max-height: 90vh;
}

/* Header des Containers mit Titel und Schließen-Button */
.privacy-policy-header {
    display: flex;
    justify-content: space-between; /* Verteilt Titel und Button */
    align-items: center;
}

.privacy-policy-header h2 {
    font-size: 1.8rem;
    margin: 0;
}

/* Schließen-Button nach rechts verschieben */
.close-btn {
    background: #f44336; /* Rote Hintergrundfarbe */
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.close-btn:hover {
    background: #d32f2f;
}

/* Inhalt der Datenschutzrichtlinie */
.privacy-policy-content {
    margin-top: 20px;
    font-size: 1rem;
    line-height: 1.6;
    color: black;
}

/* Link-ähnlicher Button */
.link-button {
    background: none;
    border: none;
    color: #007bff; /* Blau wie ein typischer Link */
    text-decoration: underline;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
}

.link-button:hover {
    color: #0056b3; /* Dunkleres Blau beim Hover */
    text-decoration: none; /* Entfernt die Unterstreichung beim Hover */
}

/* Button zum Öffnen der Datenschutz-Seite */
#openPrivacyPolicyBtn {
    background-color: transparent;
    color: red;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
}

#fileInput {
    display: inline-block;
    padding: 3px;
    font-size: 0.8rem;
    cursor: pointer;
    background-color: transparent; /* Hintergrundfarbe für den Input */
    width: auto; /* Der Input passt sich seiner Größe an */
    color:white;
}

/* ============================= */
/* Responsive Anpassungen         */
/* ============================= */
@media (max-width: 1024px) {
    /* Für Tablets und kleinere Bildschirme */
    #messengerContainer {
        flex-direction: column;
        height: auto; /* Verhindert festgelegte Höhe */
    }
    #chatList {
        width: 100%;
        overflow-y: auto;
        border-radius: 8px;
    
    }
 
    #messages {
        max-height: 65vh;
    }
    #messageInput {
        width: calc(100% - 100px);
    }
    #contactList {
      height:15vh!important;
  }
}

@media (max-width: 768px) {
    /* Für Mobilgeräte und kleine Tablets */
    #messengerContainer {
        flex-direction: column;
        height: auto;
        padding:0;
    }
    #contactsContainer {
        width: 94%;
        margin: 0;
        height: 65vh;
        overflow: scroll;
    }
    .result-item, .contact-item, .request-item {
        font-size: 14px;
        padding: 8px;
    }
    #messages {
        max-height: 60vh;
    }
    #messageInput {
        width: calc(100% - 80px);
    }
    #topMenuBar button {
        font-size: 1.8rem; /* kleinere Symbole */
        padding: 6px;
        min-width: 32px;
    }

    #togglePassword {
         right: -8px; 
    }
    #fileInput, #otherButton {
        width: 80%; /* Beide Elemente teilen sich den verfügbaren Platz */
    }
    button {
        padding: 1px 10px; /* Kleinere Polsterung */
        font-size: 1rem; /* Kleinere Schriftgröße */
    }
    .send-btn{
        padding: 1px 10px; /* Kleinere Polsterung */
        font-size: 1rem; /* Kleinere Schriftgröße */
        margin:0px;
    }
    .delete-btn{
        padding: 1px 10px; /* Kleinere Polsterung */
        font-size: 1rem; /* Kleinere Schriftgröße */
        margin:0px;
        margin-top: 0px !important;
    }
    .location-btn{
        padding: 1px 10px; /* Kleinere Polsterung */
        font-size: 1rem; /* Kleinere Schriftgröße */
        margin:4px;
        margin-top: 0px !important;
    }
    .clearCache{
        padding: 1px 10px!important; /* Kleinere Polsterung */
        font-size: 1rem!important; /* Kleinere Schriftgröße */
        margin:0px;
    }
    .footer{
        padding: 2px 0;
        font-size: 10px;;
    }
    #openPrivacyPolicyBtn{
        padding: 2px 0;
        font-size: 10px;
    }

    #topMenuBar {
        padding: 1px 9px;
        margin-left: 1vh;
        width: 95%;
        gap:4px;
    }   
    .contact-nickname{
            padding: 1px 10px;
            font-size: 1rem;
            width: 15vh;
    }

    #mapControls button {
        font-size: 14px;
        padding: 8px;
    }

    #sendBtn {
        font-size: 1.4rem;
    }
    #toggleBubbles{
        padding: 1px 10px!important; /* Kleinere Polsterung */
        font-size: 1rem; /* Kleinere Schriftgröße */
    }
    .password-container {
        width: 104%;
    }   

.privacy-policy-content{
            font-size: 0.6rem;
    }
  #loginContainer{
    border-bottom: 1px solid white;
    border-radius: 8px;
  }

  #infoContainer{
    border-bottom: 1px solid white;
    border-radius: 8px;
  }
  #mapContainer.active{
        border-bottom: 1px solid white;
        border-radius: 8px;
  }

}
@media (max-width: 768px) {
    .settings-container.active {
        flex-direction: row; /* Buttons horizontal */
        justify-content: space-between; /* erster links, letzter rechts */
        flex-wrap: wrap; /* falls zu viele Buttons, umbrechen */
        gap: 8px; /* kleinerer Abstand */
        display: flex;
        height: 65vh;
        overflow: scroll!important;
        border-bottom: 1px solid white;
        border-radius: 8px;
    }

    .settings-container.active button {
        flex: 0 1 auto; /* Buttons passen sich nur an, werden nicht gleichmäßig gedehnt */
        flex: 1 1 140px;
        justify-content: center;
        align-items: center;
    }
    .voice-container .file-timer {
    font-size: 1rem;
    }
    .voice-container audio {
    width: 260px!important;
    height: 25px;
    }
     #audioVisualizer {
    height: 30px;
    }
    #audioVisualizer {
    height: 30px !important;
    margin-top:-29px !important;
    }
    #mapControls {
    overflow: scroll;
    width: 90%!important;
    }

    #map{
      height:35vh;
    }

    #group-list {
    }
    .group-item {
        padding: 1px 10px!important;
        font-size: 1rem!important;
    }
    #groupChatContainer {
      overflow: scroll;
      height: 65vh;
      margin: 0px!important;
    }
    .group-delete-btn{
      font-size: 1rem!important;
      padding: 6px 8px!important;
    }
    .group-settings-btn{
      font-size: 1rem!important;
      padding: 6px 8px!important;
    }
    .group-nickname{
      font-size: 1rem!important;
      padding: 6px 8px!important;
    }
    #contactList {
     height:15vh!important;
    }
}

@media (max-width: 600px) {

    .request-item {
        flex-direction: column;
        align-items: stretch;
    }

    .request-item button {
        width: 100%;
    }

    #contactList {
      height:15vh!important;
    }
}

@media (max-width: 480px) {
    /* Für sehr kleine Geräte (Smartphones) */
    #topMenuBar {
        gap: 8px;
        padding: 5px;
    }
   
    .message {
        font-size: 16px; /* Größere Schrift für Nachrichten */
    }
    #scrollToBottomBtn {
        padding: 12px 20px;
        font-size: 1rem;
    }
    #topMenuBar {
        gap: 3px; 
        padding: 4px 6px;
    }

    #topMenuBar button {
        font-size: 1.4rem; /* noch kleinere Symbole */
        padding: 4px;
        min-width: 28px;
    }

    .voice-container .file-timer {
    font-size: 1rem;
  }
    .voice-container audio {
    width: 260px!important;
    height: 25px;
    }

    #audioVisualizer {
    height: 30px !important;
    margin-top:-29px !important;
    }
    #messengerContainer {
        flex-direction: column;
        height: auto;
        padding:0;
    }

    #contactList {
     height:30vh!important;
    }

}

/* ============================= */
/* Scroll-to-bottom Button */
#scrollToBottomBtn {
    z-index: 1000;
    padding: 3px 5px; /* Etwas mehr Padding für einen größeren Button */
    background-color: #00000026;
    color: white;
    border: none;
    border-radius: 8px; /* Erhöht den Radius für eine rundere Form */
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Fügt einen leichten Schatten hinzu, um den Button abzuheben */
    transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s; /* Sanfte Übergänge */
    font-size: 1.1rem;
}

#scrollToBottomBtn:hover {
    background-color: #534c4c; /* Dunkleres Blau bei Hover */
    transform: translateY(-2px); /* Hebt den Button leicht an */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Verstärkt den Schatten bei Hover */
}

#scrollToBottomBtn:active {
    transform: translateY(1px); /* Leichte Senkung des Buttons bei Klick */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); /* Dezentere Schatten bei Aktivierung */
}


#resetPasswordBtn {
  margin-top: 12px;
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 0;
  transition: color 0.2s ease, transform 0.1s ease;
}

#resetPasswordBtn:hover {
  color: var(--primary-color-dark);
  text-decoration: underline;
}

#resetPasswordBtn:active {
  transform: scale(0.97);
}

#bubble-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;          
  inset: 0;
}
body > * {
  position: relative;
  z-index: 1;
}

#toggleBubbles {
  top: 20px;
  right: 20px;
  padding: 8px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  background-color: #00000026;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

#toggleBubbles:hover {
  background-color: red;
  transform: scale(1.05);
}

#toggleBubbles:active {
  background-color: #33527c;
  transform: scale(0.95);
}

#uploadStatusContainer {
  display: none;
  width: 100%;
  height: 24px; /* ausreichend Höhe für Text */
  background: #00000026; 
  margin-top: -108px;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.upload-progress-bar {
  width: 0%; 
  height: 100%;
  background-color: aliceblue;
  border-radius: 8px 0 0 8px; 
  transition: width 0.2s ease;
}

.upload-progress-bar::after {
  content: ''; /* leer, kein externes Label */
}

.upload-progress-text {
  position: absolute;
  width: 100%;
  text-align: center;
  top: 0;
  left: 0;
  line-height: 24px; /* gleich wie Container-Höhe */
  font-size: 20px;
  font-weight: bold;
  color: black;
  pointer-events: none;
}

#recordingControls{
    background-color: #00000026;
    padding: 8px 12px;
    border-radius: 8px;
}

/* ======================= */
/* Voice-Container */
.voice-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background-color: #333; /* optional leicht abgesetzt */
  padding: 5px 8px;
  border-radius: 8px;
  max-width: 300px; /* oder 80% der Nachrichtenbreite */
}

/* Timer im Voice-Container */
.voice-container .file-timer {
  font-size: 0.75rem;
  color: #ccc;
  text-align: right;
}

/* Audio-Element im Voice-Container */
.voice-container audio {
  width: 300px;
}

#audioVisualizer {
    width: 100%;
    height: 60px;
    background: #00000026;
    margin-top: -63px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

#adminlist {
    height: 20vh;
    overflow: scroll;
}

#contactList {
    display: block;
    height: 20vh;
    overflow: scroll;
}

/* Wenn das Element die 'hidden'-Klasse hat, bleibt es versteckt */
#contactList.hidden {
    display: none;
}

/* Wenn die 'hidden'-Klasse entfernt wird, wird das Element angezeigt */
#contactList.visible {
    display: block;
    cursor: pointer;
}

#contactList .contact-item:hover {
  background-color: #534c4c;
}

#mapControls button {
    background-color: #00000026;
    color: #ffffff;
    position: relative;
    padding-left: inherit;
    margin: unset;
    border-bottom: 1px solid #eee;
}

#mapControls button:hover {
  background-color: #534c4c;
}



/* Marker Info Window */

/* 🔥 Wrapper reset */
.gm-style-iw-c {
  padding: 0 !important;
  border-radius: 10px !important;
  max-height: none!important;
}

.gm-style-iw-d {
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

.gm-style-iw {
  max-width: none !important;
}

/* 🔥 HEADER (das was du willst) */
.gm-style-iw-chr {
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  top: -6px;
  position: relative;
  left: 10px;
}

/* optional: X Button kleiner/enger */
.gm-ui-hover-effect {
  top: 2px !important;
  right: 2px !important;
  transform: scale(0.8);
}

.info-window {
  min-width: 180px;
  max-width: 260px;
  padding: 10px;
  box-sizing: border-box;
}

/* Name */
.info-window-title {
  font-weight: bold;
  margin-bottom: 10px;
  color: black;
  word-break: break-word;
}

/* Buttons Layout */
.info-window-buttons {
  display: flex;
  gap: 6px;
}

/* Buttons */
.info-btn {
  flex: 1;
  padding: 8px;
  font-size: 13px;
  cursor: pointer;
  border: none;
  background: #0000005c;
  color: white;
  border-radius: 8px;
  justify-content: center;
}

/* Hover */
.info-btn:hover {
  background: #534c4c;
}

@media (max-width: 768px) {
  .info-window {
    min-width: 140px;
    max-width: 200px;
    padding: 8px;
    width:170px;
  }

  .info-window-buttons {
    flex-direction: column;
  }

  .info-btn {
    width: 100%;
    font-size: 12px;
    padding: 7px;
  }
}

/* Container */
.live-marker {
  position: relative;
  width: 20px;
  height: 20px;
}

/* Blauer Punkt */
.live-marker-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #1a73e8; /* Google Blue */
  border-radius: 50%;
  top: 4px;
  left: 4px;
  z-index: 2;
  border: 2px solid white;
  box-shadow: 0 0 6px rgba(26,115,232,0.8);
}

/* Pulsierender Ring */
.live-marker-pulse {
  position: absolute;
  width: 20px;
  height: 20px;
  background: rgba(26, 115, 232, 0.3);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
  top: 0;
  left: 0;
  z-index: 1;
}

/* Animation */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  70% {
    transform: scale(2.5);
    opacity: 0;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Marker Info Window */

/* 🔥 Wrapper reset */
.gm-style-iw-c {
  padding: 0 !important;
  border-radius: 10px !important;
}

.gm-style-iw-d {
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
}

.gm-style-iw {
  max-width: none !important;
}

/* 🔥 HEADER (das was du willst) */
.gm-style-iw-chr {
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  top: -6px;
  position: relative;
  left: 10px;
}

/* optional: X Button kleiner/enger */
.gm-ui-hover-effect {
  top: 2px !important;
  right: 2px !important;
  transform: scale(0.8);
}

/* InfoWindow2 Style */
.iw2 {
  min-width: 180px;
  max-width: 260px;
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

/* Header */
.iw2-header {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 8px;
  color: black;
  word-break: break-word;
}

/* Image */
.iw2-image img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 8px;
}

/* Buttons Layout */
.iw2-actions {
  display: flex;
  gap: 8px;
}

/* Buttons */
.iw2-actions button {
  flex: 1;
  padding: 8px;
  font-size: 14px;
  border: none;
  background: #0000005c;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

/* Hover */
.iw2-actions button:hover {
  background: #534c4c;
}

.iw2-status{
  color: black;
}

/* Mobile Anpassung */
@media (max-width: 768px) {
  .iw2 {
    min-width: 140px;
    max-width: 200px;
    padding: 8px;
    width: 28vh;
  }

  .iw2-actions {
    flex-direction: column;
  }

  .iw2-actions button {
    width: 100%;
    font-size: 12px;
    padding: 7px;
  }
}

/* Container für den Profilbereich */
#nearbySetup {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #eeeeee;
  padding: 20px;
  box-sizing: border-box;
  z-index: 9999;
  width: 250px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  border: 1px solid #333;
}

/* Header */
#nearbySetup h4 {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

/* Select und Input Felder */
#nearbySetup select,
#nearbySetup input {
  width: 100%;
  padding: 8px;
  margin-bottom: 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 14px;
  background-color: #534c4c;
  color: white;
}

/* Buttons */
#nearbySetup button {
  padding: 10px;
  background: #536a83;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 10px;
  font-weight: bold;
}

#nearbySetup button:hover {
  background: green;
}

/* Schließen Button */
#closeNearbySetup {
    position: relative;
    background-color: #536a83;
    color: white;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

/* Schließen Button Hover */
#closeNearbySetup:hover {
  background-color: red!important;
}

.gm-style .gm-style-iw-d {
    height: 100% !important;
    max-height: 100%!important;
}

.send-request{
    background-color: #00000026;
    color: white;
}


.group-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 9999;
}

.group-modal-content {
  background: #1e1e1e;
  padding: 20px;
  border-radius: 12px;
  width: 320px;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-modal-content input {
  padding: 10px;
  border-radius: 6px;
  border: none;
}

.group-modal-content button {
  padding: 10px;
  cursor: pointer;
}

.group-create-btn {
    background-color: #00000026;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 16px;
}

.group-create-btn:hover {
    background-color: #534c4c;
}

.group-create-btn:active {
    background-color: #534c4c;
}

#group-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.group-item {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #eee;
  border-radius: 8px;
  transition: background-color 0.2s;
  cursor: pointer;
}
.group-item:hover{
    background-color: #534c4c;
}

.group-nickname {
  display: inline-block;
  padding: 10px 50px;
  background-color: #00000026;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  -webkit-user-select: none;
  user-select: none;
  transition: background-color 0.2s, transform 0.1s;
}

.group-nickname:hover {
  background-color: #534c4c;
  transform: scale(1.05);
}

.group-nickname:active {
  background-color: #00408a;
  transform: scale(0.95);
}

.group-settings-btn {
  background-color: #00000026;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  padding: 10px 50px;
}

.group-settings-btn:hover {
  background-color: #534c4c;
  transform: scale(1.05);
}

.group-settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);

  display: flex;
  justify-content: center;
  align-items: center;
}

.group-settings-modal {
  background: white;
  padding: 20px;
  border-radius: 8px;
  color: black;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 80vh;
  overflow:scroll;
}

#adminList{
  height:30vh;
  overflow: scroll;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
}

.invite-contact-item {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background-color 0.2s;
  cursor: pointer;
  border-bottom: 1px solid #3d5b83;
}

/* Standard Hover */
.invite-contact-item:hover {
  background-color: #3d5b83;
  color: white;
}

/* ✅ Mitglied aktiv */
.invite-contact-added {
  background-color: #3d5b83;
  color: white;
  border-bottom: 1px solid #534c4c;
}

/* optional: Hover auf aktivem Zustand */
.invite-contact-added:hover {
  background-color: #534c4c;
}

.group-delete-btn {
  background-color:#c41717;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1rem;
  padding: 10px 50px;
  margin-left: auto;
}

.group-delete-btnr {
  background-color: red;
  transform: scale(1.05);
}

.admin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #534c4c;
  border-radius: 8px;
}
.admin-item:hover{
  background-color: #534c4c;
  color: white;

}

.admin-item button {
  margin-left: auto;
}

/* Admin entfernen */
.btn-remove-admin {
  background-color: red;
  color: white;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 1rem;
}

/* Admin machen */
.btn-make-admin {
  background-color: #3d5b83;
  color: white;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 1rem;
}

#closeModalBtn{
  background: #536a83;
  color: white;
}

#saveGroupBtn{
  background: #536a83;
  color: white;
}

.icon-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-btn svg {
  width: 28px;
  height: 28px;
  stroke: white;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Farben */
.calling-text {
  text-align: center;
  color: #fff;
  margin-bottom: 10px;
}

#loginContainer h1 {
  display: inline-block;
  margin-right: 10px;
  vertical-align: middle;
}

#apkDownloadBtn {
  display: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 6px 12px;
  border-radius: 8px;

  background: #ff3b30;
  color: white;

  font-size: 13px;
  font-weight: 600;
  text-decoration: none;

  cursor: pointer;
  vertical-align: middle;

  transition: 0.2s ease;
}

#apkDownloadBtn i {
  font-size: 14px;
}

#apkDownloadBtn:hover {
  background: #e63228;
  transform: scale(1.03);
}

.yo-app #apkDownloadBtn,
.yo-app #menuApkBtn {
  display: none !important;
}

.contact-item .contact-icon {
  width: 16px;
  height: 16px;
  fill: #fff;
  flex-shrink: 0;
  margin:-2px;
  padding-right: 10px;
}