/* ========================================
   FOOTER (neu strukturiert, responsive)
======================================== */

footer {
  background-color: transparent;
  padding: 0;
  color: #ccc;
  font-size: 1.1rem;
}

.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: '';
  }
}