/* ========================================
   FOOTER (neu strukturiert, responsive)
======================================== */

footer {
  background-color: transparent;
  padding: 0;
  color: #ccc;
  font-size: 1.1rem;
  line-height: 2.4;
}

.footer-inner {
  background-color: #282828;
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.25rem 1rem;              /* ← sorgt für linken/rechten Innenabstand */
  box-sizing: border-box;
}

.container.footer-flex {
  max-width: none;
  padding: 0;
  margin: 0;
}

.footer-flex {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-copy {
  padding: 0.5rem 1rem 0.3rem 1rem;
  font-size: 0.85rem !important;
  color: #aaa;
  text-align: left;
  margin: 0;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.25rem 0.5rem;           /* ← NEU: immer gleich */
  border-radius: 0.25rem;
  transition: all 0.2s ease;         /* optional, für weiches Hover */
}

.footer-links a:hover {
  color: #fff;
  background-color: #444;
  text-decoration: underline;
}

.footer-status {
  color: limegreen;
  font-size: 0.8rem;
  font-weight: 300;
  padding: 0.15rem 0.3rem;
  margin-left: 0.4rem;
  border-radius: 0.25rem;
  white-space: nowrap;
}

.footer-status:hover {
  background-color: #444;
  color: #fff;
  text-decoration: underline;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;         /* für Desktop */
  align-items: center;
  gap: 1.25rem;
  margin-top: 0.3rem;
  padding-right: 0.75rem;            /* Justierung rechts */
  }

.footer-nav a,
.footer-status-links a,
.footer-status-links span {
  font-size: 0.85rem;
  padding: 0.2rem 0.4rem;
  display: inline-block;
  line-height: 1.2;
  vertical-align: middle;
  color: #ccc;
  text-decoration: none;
}

.footer-status-links span {
  color: limegreen;
  font-weight: 600;
}

.footer-status-links a:hover {
  background-color: #444;
  color: #fff;
  text-decoration: underline;
}

.footer-nav,
.footer-status-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  }

/* Mailto-Links überall gleich behandeln */
a[href^="mailto:"] {
  color: #ccc;
  text-decoration: underline;
  font-size: 1.1rem;
}

a[href^="mailto:"]:hover {
  color: #fff;
  background-color: #444;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.footer-userzeile {
  display: flex;               /* Ordnet die Elemente nebeneinander an */
  align-items: baseline;       /* ⬅️ NEU: sorgt für gemeinsame Grundlinie */
  justify-content: flex-end;   /* Schiebt die Elemente ganz nach rechts */
  flex-wrap: wrap;             /* Erlaubt Zeilenumbruch bei kleiner Breite */
  gap: 1rem;                   /* Abstand zwischen den Links */
  margin-top: -0.8rem;         /* Optische Annäherung an die obere Zeile */
  
  max-width: 1040px;           /* Exakte Breite wie der Hauptcontainer */
  width: fit-content;          /* Breite nur so groß wie nötig */
  margin-left: auto;           /* Schiebt den Block ganz nach rechts */
  
  padding-right: 0.6rem;       /* Feine Ausrichtung unter "Impressum" */
}

.footer-userzeile a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.85rem;

  display: inline-block;
  line-height: 1.1;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  text-decoration: none;
  border-bottom: none;
}

.footer-userzeile a:hover {
  text-decoration: underline;
  background-color: #444;
  color: #fff;
  text-decoration: underline;
}

.footer-userzeile .eingeloggt-name {
  color: limegreen;
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.85rem; 
}

/* =========================================
   Adminbereich: Footer wie bei allen Seiten
   ========================================= */
body.admin-mitglieder .footer-flex {
  max-width: 1040px;
  margin: 0 auto;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

body.admin-mitglieder .footer-copy,
body.admin-mitglieder .footer-links {
  font-size: 0.85rem;
  color: #aaa;
}
  
/* ========================================
   Smartphone-Optimierung (max 767px)
   Footerstruktur von außen nach innen:
   - .footer-flex   → Spaltenausrichtung
   - .footer-inner  → Innenabstände
   - .footer-copy   → Copyrightzeile
   - .footer-nav    → Linkanordnung (neu: flexbasiert)
======================================== */
@media (max-width: 767px) {

  .footer-flex {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    padding-left: 1rem;
    padding-right: 0;
  }

  .footer-copy {
    flex: 1 0 100%;
    text-align: left !important;
    padding-left: 0;
    margin-bottom: 0;
  }

  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem 0.8rem;
  }

  .footer-nav a[href="release-notes.php"],
  .footer-nav a[href="datenschutz.php"],
  .footer-nav a[href="impressum.php"] {
    order: 0;
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .footer-nav a {
    padding: 0 !important;
    white-space: nowrap;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08); /* zur besseren Visualisierung */
  }

  /* Mitgliederbereich auf eigene Zeile setzen */
  #mitgliederbereich-link {
    display: inline-block;
    order: 1;
    margin-top: 0;
    margin-bottom: 0.6rem;
    pointer-events: auto;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    padding: 0 !important;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Optional: falls du visuell etwas hervorheben willst */
  #mitgliederbereich-link.blocked {
    /* leer, bewusst neutral */
  }

  #mitgliederbereich-link.blocked::after {
    content: '';
  }
}

@media (max-width: 767px) {
  /* Nur Zeilenabstände reduzieren – keine Änderungen an Padding/Größen */
  .footer-copy,
  .footer-nav,
  .footer-nav a,
  .footer-status-links,
  .footer-status-links a,
  .footer-links a,
  .footer-userzeile,
  .footer-userzeile a,
  .footer-userzeile .eingeloggt-name {
    line-height: 1.15; /* vorher höher – jetzt kompakter */
  }

  /* Nur Smartphone, nur Abstände, Desktop bleibt unberührt */
  .footer-inner { padding-top: 0.3rem; padding-bottom: 0.3rem; }
  .footer-flex   { gap: 0.3rem; }
  .footer-links  { gap: 0.3rem; }

}

/* ========================================
   Footer – Smartphone-Feinjustierung
   stabile 2-Zeilen-Anordnung
======================================== */
@media (max-width: 767px) {

  footer {
    line-height: 1.35;
  }

  .footer-inner {
    padding: 0.65rem 1rem 0.85rem 1rem;
  }

  .footer-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .footer-copy {
    padding: 0;
    margin: 0 0 0.45rem 0;
    line-height: 1.25;
  }

  .footer-links {
    width: 100%;
    padding-right: 0;
    margin-top: 0;
    justify-content: flex-start;
    gap: 0;
  }

  .footer-nav {
    display: grid;
    grid-template-columns: max-content max-content;
    column-gap: 1.45rem;
    row-gap: 0.65rem;
    align-items: baseline;
    margin: 0;
    padding: 0;
  }

  .footer-nav a {
    margin: 0;
    padding: 0.08rem 0.18rem !important;
    line-height: 1.1;
    white-space: nowrap;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
  }

  .footer-nav a[href="release-notes.php"] {
    grid-column: 1;
    grid-row: 1;
  }

  .footer-nav a[href="datenschutz.php"] {
    grid-column: 2;
    grid-row: 1;
  }

  .footer-nav a[href="impressum.php"] {
    grid-column: 1;
    grid-row: 2;
  }

  #mitgliederbereich-link {
    grid-column: 2;
    grid-row: 2;
    display: inline-block;
    margin: 0;
    padding: 0.08rem 0.18rem !important;
    line-height: 1.1;
    white-space: nowrap;
    pointer-events: auto;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
  }

  .footer-userzeile {
    width: 100%;
    justify-content: flex-start;
    margin-top: 0.6rem;
    padding-right: 0;
    gap: 0.55rem 0.8rem;
    line-height: 1.15;
  }

  .footer-userzeile a,
  .footer-userzeile .eingeloggt-name {
    line-height: 1.15;
  }
}


