/* Globale Tokens (für Sidebars außerhalb .m8-social) */
html[data-m8-ef-scope="easyforum"],
body[data-m8-ef-scope="easyforum"],
body.m8-ef-page{
  --m8-border: rgba(0,0,0,.10);
}
html[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"],
body[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"],
body.m8-ef-page[data-m8-ef-theme="dark"]{
  --m8-border: rgba(255,255,255,.12);
}

/* M8 EasyForum Portal – Grundlayout (modern/flat, grid-basiert) */
.m8-social {
  /* Instagram-aehnlicher, schmaler Postbereich */
  font-size: 0.86rem;
  font-family: "Trebuchet MS", Trebuchet, Arial, sans-serif;
  --m8-gap: .5rem;
  --m8-radius: 6px;
  --m8-border: rgba(0,0,0,.10);
  --m8-bg: #fff;
  --m8-bg-soft: rgba(0,0,0,.03);
  --m8-text: rgba(0,0,0,.86);
  --m8-muted: rgba(0,0,0,.60);
  --m8-accent: #111;
  /* Like-Farbe (Herz) */
  --m8-like: #ed4956;
  /* Einheitliche UI-Fontsize (Buttons + Labels) */
  --m8-ef-ui-font-size: .95em;
  color: var(--m8-text);
}

/* Basis-Variablen auch auf dem Body (für Core-Module wie Login/Registrieren/LostPassword) */
body[data-m8-ef-scope="easyforum"],
body.m8-ef-page{
  font-size: 0.86rem;
  font-family: "Trebuchet MS", Trebuchet, Arial, sans-serif;
  --m8-gap: .5rem;
  --m8-radius: 6px;
  --m8-border: rgba(0,0,0,.10);
  --m8-bg: #fff;
  --m8-bg-soft: rgba(0,0,0,.03);
  --m8-text: rgba(0,0,0,.86);
  --m8-muted: rgba(0,0,0,.60);
  --m8-accent: #111;
  --m8-like: #ed4956;
  --m8-ef-ui-font-size: .95em;
  color: var(--m8-text);
}

body[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"],
body.m8-ef-page[data-m8-ef-theme="dark"]{
  --m8-radius: 8px;
  --m8-border: rgba(255,255,255,.12);
  --m8-bg: #10141a;
  --m8-bg-soft: rgba(255,255,255,.05);
  --m8-text: rgba(255,255,255,.92);
  --m8-muted: rgba(255,255,255,.62);
  --m8-accent: #f2f2f2;
  color: var(--m8-text);
}

/* FE-Layout: Innenpadding (damit nichts am Fensterrand klebt)
   -> Contao Standard-Layout (fe_page): linke + Haupt + rechte Spalte.
   -> Auf anderen Layout-Templates ohne diese IDs greift die Regel einfach nicht.
*/
#left .inside,
#right .inside {
  padding: 30px;
  box-sizing: border-box;
}
#main .inside {
  padding: 30px 0;
  box-sizing: border-box;
}

.m8-social * { box-sizing: border-box; }
/* Schmale Bereiche wie Insta (Feed + Einladungen + Benachrichtigungen) */
.m8-ef-narrow {
  max-width: 500px;
  margin: 0 auto;
  padding-top: 25px;
}

/* Forumseiten: Theme-unabhaengig kein Top-Padding am Container */
body[data-m8-ef-scope="easyforum"] #container {
  padding-top: 0px !important;
}

/* Forumseiten: manche Themes packen Abstand in #main > .inside (oder wir selbst ueber padding:30px)
   -> nur Top-Padding entfernen, links/rechts/bottom bleiben unberuehrt */
body[data-m8-ef-scope="easyforum"] #main > .inside {
  padding-top: 0px !important;
}

/* Container Queries: #main als Container (responsive nach echter Main-Breite, nicht nach Viewport) */
body[data-m8-ef-scope="easyforum"] #main,
body.m8-ef-page #main {
  container-type: inline-size;
  container-name: m8-ef-main;
}

/* Forum: Containers immer etwas Luft nach oben */
.m8-social .m8-ef-container{padding-top:25px;}

/* Nicht-Feed-Hauptbereiche: Bootstrap-Container + fixe Breite */
.m8-social .m8-ef-container.container {
  width: 100%;
  max-width: 100% !important;
  margin-left: auto;
  margin-right: auto;
}

/* Einladungen: Erstellbereich soll konsequent volle #main-Breite nutzen */
.m8-social-invites .m8-ef-container.container {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Gruppen: breitere Contentbreite + Eintraege volle Breite */
.m8-social-groups .m8-ef-container.container {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.m8-social-groups .m8-groups-list{
  list-style: none;
  padding-left: 0 !important;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}
@media (max-width: 900px){
  .m8-groups-list{ grid-template-columns: 1fr; }
}

/* Gruppen: Create-Box oben */
.m8-group-create{
  width: 100%;
  background: var(--m8-bg);
  border: 1px solid var(--m8-border);
  border-radius: var(--m8-radius);
  padding: .75rem;
  margin: 0 0 .75rem;
}
.m8-group-create__row{
  display: flex;
  align-items: center;
  gap: .5rem;
}

.m8-group-create__title{
  flex: 1 1 auto;
  min-width: 160px;
  border: 1px solid var(--m8-border);
  background: transparent;
  border-radius: 10px;
  padding: .45rem .55rem;
  color: var(--m8-text);
  font-size: 16px;
}
.m8-group-create__title:focus{ outline: none; border-color: var(--m8-accent); box-shadow: 0 0 0 2px rgba(0,0,0,.06); }
.m8-group-create__desc{
  width: 100%;
  margin-top: .5rem;
  font-size: 16px;
}
.m8-group-create__topic{
  width: 100%;
  margin-top: .5rem;
  border: 1px solid var(--m8-border);
  background: transparent;
  border-radius: 10px;
  padding: .45rem .55rem;
  color: var(--m8-text);
  font-size: 16px;
}
.m8-group-create__topic:focus{ outline: none; border-color: var(--m8-accent); box-shadow: 0 0 0 2px rgba(0,0,0,.06); }
.m8-group-create__hint{ margin: 0; opacity: .85; }

/* Gruppen: Create-Form (Titel + Thema zweispaltig, Button rechts unten) */
.m8-group-create__grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  align-items: end;
}

/* Gruppen: Create-Form (Titel + Thema + Thema-Auswahl dreispaltig) */
.m8-group-create__grid--3{
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 700px){
  .m8-group-create__grid{ grid-template-columns: 1fr; }
}

.m8-group-create__col{ min-width: 0; }

/* Inputs innerhalb der Grid-Cols sollen volle Breite haben */
.m8-group-create__grid .m8-group-create__title{
  width: 100%;
  min-width: 0;
  flex: 0 0 auto;
}
.m8-group-create__grid .m8-group-create__topic{
  margin-top: 0;
}

.m8-group-create__topicWrap{
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.m8-group-create__topicWrap .m8-group-create__topic{
  width: 100%;
}

.m8-group-create__topic-select{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--m8-border);
  border-radius: 10px;
  background: var(--m8-bg);
  color: var(--m8-text);
  padding: .45rem .55rem;
  font-size: 16px;
  outline: none;
}
.m8-group-create__topic-select:focus{ outline: none; border-color: var(--m8-accent); box-shadow: 0 0 0 2px rgba(0,0,0,.06); }

.m8-group-create__topic-input{ margin-top: .4rem; }

.m8-group-create__actions{
  display: flex;
  justify-content: flex-end;
  margin-top: .6rem;
}

/* Gruppen-Seite: Filter/Suche (unterhalb der Erstellung) */
.m8-ef-groups-page__filter{
  width: 100%;
  margin: 0 0 .75rem;
}
.m8-ef-groups-page__filter-row{
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.m8-ef-groups-page__search{
  position: relative;
  flex: 1 1 260px;
  min-width: 220px;
}
.m8-ef-groups-page__search-input{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--m8-border);
  border-radius: 10px;
  background: var(--m8-bg);
  color: var(--m8-text);
  padding: .55rem .75rem;
  font-size: .95em;
  outline: none;
}
.m8-ef-groups-page__search-input:focus{
  border-color: rgba(255,255,255,.28);
}
.m8-ef-groups-page__search-clear{
  position: absolute;
  right: .55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  color: var(--m8-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.m8-ef-groups-page__search-clear:before{
  content: "×";
  font-size: 18px;
  line-height: 1;
}
.m8-ef-groups-page__theme{
  flex: 0 0 220px;
  min-width: 180px;
  border: 1px solid var(--m8-border);
  border-radius: 10px;
  background: var(--m8-bg);
  color: var(--m8-text);
  padding: .55rem .75rem;
  font-size: .95em;
  outline: none;
}
.m8-ef-groups-page__empty{
  margin: .45rem 0 0;
  opacity: .75;
  font-size: .95em;
}
@media (max-width: 720px){
  .m8-ef-groups-page__theme{ flex: 1 1 100%; width: 100%; }
  .m8-ef-groups-page__search{ flex: 1 1 100%; min-width: 0; }
}

/* Gruppen: Löschen-Button (nur Initiator) – oben rechts, ohne Kontur/Hintergrund */
.m8-group-delete-form{ display: inline; margin: 0; }
.m8-group-delete-form--top{
  position: absolute;
  top: .55rem;
  right: .55rem;
  z-index: 2;
}
.m8-group-delete-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: .1rem;
  border-radius: 999px;
  line-height: 1;
  color: var(--m8-muted);
  cursor: pointer;
}
.m8-group-delete-btn:hover{
  background: transparent !important;
  opacity: .75;
}
.m8-group-delete-btn:focus{ outline: none !important; box-shadow: none !important; }

.m8-social-groups .m8-group{
  position: relative;
  width: 100%;
  background: var(--m8-bg);
  border: 1px solid var(--m8-border);
  border-radius: var(--m8-radius);
  padding: .7rem;
}

.m8-social-groups .m8-group__head{
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .35rem;
}

.m8-social-groups .m8-group__title{
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
}

.m8-social-groups .m8-group__meta{
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin: 0 0 .35rem;
}

.m8-social-groups .m8-group__meta-label{
  opacity: .75;
  font-weight: 600;
  font-size: var(--m8-ef-ui-font-size);
}

.m8-social-groups .m8-group__owner{
  color: inherit;
  text-decoration: none;
}

.m8-social-groups .m8-group__owner:hover{
  text-decoration: underline;
}

.m8-social-groups .m8-group__members{
  opacity: .75;
  font-size: var(--m8-ef-ui-font-size);
  white-space: nowrap;
}

/* Gruppen-Kachel: Badges (Initiator / Mitglieder / Posts) */
.m8-social-groups .m8-group__badge{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .18rem .55rem;
  border: 1px solid var(--m8-border);
  background: var(--m8-bg-soft);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
}

.m8-social-groups .m8-group__badge--topic{
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
}

.m8-social-groups .m8-group__badge-label{
  opacity: .75;
  font-weight: 600;
}

.m8-social-groups .m8-group__badge a{
  color: inherit;
  text-decoration: none;
}

.m8-social-groups .m8-group__badge a:hover{
  text-decoration: underline;
}

.m8-social-groups .m8-group__desc{
  margin: 0 0 .6rem;
  font-size: .9rem;
  opacity: .9;
}

.m8-social-groups .m8-group__actions{
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.m8-social-groups .m8-group__form{
  display: inline;
  margin: 0;
}

.m8-social-groups .m8-group__login-hint{
  opacity: .8;
}

/* Gruppen-Feed: Zurueck (Pfeil + Gruppen-Icon) + Aktionen in einer Zeile */
.m8-group-header{
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 .55rem;
}
.m8-group-header--actions{
  flex-wrap: nowrap;
}
.m8-group-header__title{
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m8-group-header__buttons{
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  flex: 0 0 auto;
}
.m8-group-header__form{
  display: inline;
  margin: 0;
}

.m8-ef-backgroups{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 .2rem;
  gap: .2rem;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 999px;
  text-decoration: none;
  line-height: 1;
}
.m8-ef-backgroups:hover{
  opacity: .85;
}
.m8-ef-backgroups__arrow{
  display: inline-block;
  font-size: 1.05rem;
  line-height: 1;
  transform: translateY(-.5px);
}
.m8-ef-backgroups__groups{
  display: inline-block;
  width: 1.05rem;
  height: 1.05rem;
  background-color: currentColor;
  -webkit-mask: url('icons/groups.svg') no-repeat center / contain;
  mask: url('icons/groups.svg') no-repeat center / contain;
  opacity: .9;
}
/* Pushes/Benachrichtigungen: sollen mehrere Spalten zulassen (Like, Kommentare, ...)
   -> deshalb nicht so schmal wie der Feed begrenzen */
.m8-social-notifications .m8-ef-container.container {
  width: 100%;
  max-width: 100% !important;
  margin-left: auto;
  margin-right: auto;
}

.m8-social__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--m8-gap);
  margin: 0 0 var(--m8-gap);
}

.m8-social__title { margin: 0; font-size: 1.35rem; line-height: 1.2; }
.m8-social__subtitle { margin: .25rem 0 0; color: var(--m8-muted); }

/* Invites: Responsive
   - Standard: stacked (Form oben volle Breite, Liste darunter scrollt)
   - Ab #main >= 1100px: 2-Spalten (links Form, rechts Liste), gleiche Hoehe, Liste scrollt
*/
.m8-social-invites .m8-ef-invites-split {
  display: grid;
  gap: var(--m8-gap);
  grid-template-columns: 1fr;
  align-items: start;
  min-height: 0;
}

.m8-social-invites .m8-ef-invites-pane--form {
  width: 100% !important;
  max-width: none !important;
}

.m8-social-invites .m8-ef-invites-pane {
  height: auto;
  min-height: 0;
}

.m8-social-invites .m8-ef-invites-pane--list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}

/* Stacked Layout: Liste soll scrollen und nicht die komplette Seite sprengen */
@media (min-width: 900px) {
  .m8-social-invites .m8-ef-invites-pane--list {
    max-height: 80vh;
  }
}

.m8-social-invites .m8-ef-invites-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: .2rem;
}

.m8-social-invites .m8-ef-invites-empty {
  margin: 0;
}

/* Ab #main >= 1100px: 2-Spalten (Form links, Liste rechts); Hoehe wird via JS synchronisiert */
@container m8-ef-main (min-width: 1100px) {
  .m8-social-invites .m8-ef-invites-split {
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  }

  /* max-height aus stacked deaktivieren (Hoehe kommt via JS) */
  .m8-social-invites .m8-ef-invites-pane--list {
    max-height: 80vh !important;
  }

  /* Einladungen: volle Breite (keine 2-Spalten-Kacheln) */
  .m8-social-invites .m8-invites-list {
    display: flex;
    flex-direction: column;
    gap: var(--m8-gap);
  }
  .m8-social-invites .m8-invite-row {
    margin: 0;
  }
}

/* Fallback (Browser ohne Container Queries): sehr breite Viewports als Ersatz */
@media (min-width: 1400px) {
  .m8-social-invites .m8-ef-invites-split {
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  }
  .m8-social-invites .m8-ef-invites-pane--list {
    max-height: 80vh !important;
  }
  /* Einladungen: volle Breite (keine 2-Spalten-Kacheln) */
  .m8-social-invites .m8-invites-list {
    display: flex;
    flex-direction: column;
    gap: var(--m8-gap);
  }
  .m8-social-invites .m8-invite-row {
    margin: 0;
  }
}
.m8-social__grid {
  display: grid;
  gap: var(--m8-gap);
  grid-template-columns: 1fr;
}

@media (min-width: 900px) {
  .m8-social__grid--2 { grid-template-columns: 1fr 1fr; }
  .m8-social__grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.m8-card {
  background: var(--m8-bg);
  border: 1px solid var(--m8-border);
  border-radius: var(--m8-radius);
  padding: .6rem;
}

.m8-card--soft { background: var(--m8-bg-soft); }

.m8-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}

.m8-meta { color: var(--m8-muted); font-size: .95rem; }

.m8-badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid var(--m8-border);
  background: var(--m8-bg-soft);
  font-size: .85rem;
}

/* Frontend-Badge (z.B. Pushes-Anzahl) */
.m8-ef-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 .35rem;
  border-radius: 999px;
  background: var(--m8-like);
  color: #fff;
  font-weight: 700;
  font-size: .72rem;
  line-height: 1;
}

.m8-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .45rem .85rem;
  border-radius: 10px;
  border: 1px solid var(--m8-border);
  background: var(--m8-bg-soft);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.m8-btn:hover { filter: brightness(0.98); }
.m8-btn:active { transform: translateY(1px); }

.m8-btn--primary {
  background: var(--m8-accent);
  color: #fff;
  border-color: var(--m8-accent);
}

.m8-input, .m8-textarea, .m8-select {
  width: 100%;
  max-width: 460px;
  border: 1px solid var(--m8-border);
  border-radius: 10px;
  padding: .45rem .7rem;
  background: var(--m8-bg);
  color: inherit;
}

.m8-textarea { min-height: 5.2rem; resize: vertical; max-width: 100%; }

.m8-field { margin: 0 0 .6rem; }
.m8-field label { font-weight: 600; display: inline-block; margin: 0 0 .25rem; }

.m8-alert {
  border-radius: 10px;
  padding: .6rem .9rem;
  border: 1px solid var(--m8-border);
  background: var(--m8-bg-soft);
}

.m8-alert--success { border-color: rgba(0,0,0,.18); }
.m8-alert--error { border-color: rgba(0,0,0,.25); }

/* Einladungen (kompakt) */
.m8-invites-grid { display: grid; gap: .65rem; }
.m8-invite-item { padding: .45rem; }
.m8-invite-item p { margin: .2rem 0; }
.m8-invite-item code { font-size: .9em; }
.m8-input--link { max-width: 100%; font-size: .92em; }

/* --- Kompakt-Overrides (1.0.16) --- */
/* .m8-social: Breitenbegrenzung nur in Feed-Bereichen (siehe oben) */
.m8-section-title { margin: .9rem 0 .5rem; font-size: 1.05rem; }

.m8-card--compact { padding: .65rem; }
.m8-card__title { margin: 0 0 .5rem; font-size: 1.05rem; }

.m8-form--compact .m8-form__row { margin: 0 0 .55rem; }
.m8-form__row label { display: block; margin: 0 0 .25rem; }
.m8-help { display: block; margin-top: .25rem; opacity: .75; font-size: .9em; }

.m8-input { max-width: 420px; }
.m8-input--link { max-width: 100%; width: 100%; font-size: .92em; }

/* --- Form Controls: Feed soll volle Breite + gleiches Styling haben --- */
.m8-social :where(
  input[type="text"],
  input[type="email"],
  input[type="url"],
  input[type="search"],
  input[type="password"],
  input[type="number"],
  input[type="tel"],
  textarea,
  select
) {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--m8-border);
  border-radius: 10px;
  padding: .45rem .7rem;
  background: var(--m8-bg);
  color: var(--m8-text);
}

.m8-social textarea { resize: vertical; }

.m8-btn { padding: .45rem .7rem; font-size: var(--m8-ef-ui-font-size); }

/* Einheitliche UI-Typografie: Buttons + Labels gleich gross */
.m8-social :where(label, .m8-field label, .m8-form__row label, .m8-ef-upload__hint, .m8-help){
  font-size: var(--m8-ef-ui-font-size);
}

.m8-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .45rem; }

/* Invites: Action-Buttons (Icon-Buttons) */
.m8-actions--iconlinks .m8-btn--icon{
  padding: .35rem .45rem;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.m8-actions--iconlinks .m8-btn__icon{
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: no-repeat center / contain;
  mask: no-repeat center / contain;
  opacity: .9;
}
.m8-actions--iconlinks .m8-btn__icon--open{ -webkit-mask-image: url('icons/open-link.svg'); mask-image: url('icons/open-link.svg'); }
.m8-actions--iconlinks .m8-btn__icon--copy{ -webkit-mask-image: url('icons/link-copy.svg'); mask-image: url('icons/link-copy.svg'); }
.m8-actions--iconlinks .m8-btn__icon--send{ -webkit-mask-image: url('icons/send-link.svg'); mask-image: url('icons/send-link.svg'); }

/* Invites: Annehmen-Formular – Code-Feld + Prüfen-Button in einer Zeile */
.m8-form-invite-check .m8-invite-check-row{
  display: flex;
  gap: .6rem;
  align-items: flex-end;
  flex-wrap: wrap;
}
.m8-form-invite-check .m8-invite-check-col{
  flex: 1 1 320px;
  min-width: 220px;
}
.m8-form-invite-check .m8-invite-check-col--btn{
  flex: 0 0 auto;
  min-width: 0;
}
.m8-form-invite-check .m8-invite-check-col--btn .m8-btn{
  white-space: nowrap;
}
.m8-invite-accept-facts{ margin: .55rem 0 .15rem; }

/* Registrierung (/registrieren): Desktop 2-spaltig, um Platz zu sparen */
.m8-form-register .m8-form-row{ margin: 0 0 .55rem; }
.m8-form-register .m8-form-row--btn{ margin-top: .25rem; }

@media (min-width: 900px){
  .m8-form-register{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem .8rem;
    align-items: start;
  }
  .m8-form-register .m8-form-row{ margin: 0; }
  .m8-form-register .m8-form-row--full,
  .m8-form-register hr{ grid-column: 1 / -1; }
}

@media (max-width: 520px){
  .m8-form-invite-check .m8-invite-check-row{ flex-direction: column; align-items: start; }
  .m8-form-invite-check .m8-invite-check-col{ min-width: 0; }
  .m8-form-invite-check .m8-invite-check-col--btn .m8-btn{ width: 100%; }
}

/* Invites: Erstellen-Formular – 2 Spalten + Reset-Button links */
.m8-ef-invite-form .m8-form__row--cols2{
  display: flex;
  gap: .6rem;
  align-items: flex-start;
}
.m8-ef-invite-form .m8-form__row--cols2 .m8-form__col{
  flex: 1 1 0;
  min-width: 0;
}
.m8-ef-invite-form .m8-form__actions{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  margin-top: .55rem;
}

@media (max-width: 520px){
  .m8-ef-invite-form .m8-form__row--cols2{ flex-direction: column; }
  .m8-ef-invite-form .m8-form__actions{ flex-direction: column; align-items: start; }
  .m8-ef-invite-form .m8-form__actions .m8-btn{ width: 100%; }
}

.m8-invites-list { display: flex; flex-direction: column; gap: .65rem; }
/* Invites: Kachel-Layout */
.m8-invite-row{
  width: 100%;
  position: relative;
  padding-top: 1.15rem; /* Platz fuers Top-Right Icon (auch ohne Titel) */
}
.m8-invite-row__deleteform{
  position: absolute;
  top: .35rem;
  right: .35rem;
  margin: 0;
  z-index: 2;
}
.m8-invite-row__deletebtn{
  color: var(--m8-like);
}
.m8-ef-invite-delete-icon{
  display: inline-block;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url('icons/deleter.svg') no-repeat center / contain;
  mask: url('icons/deleter.svg') no-repeat center / contain;
}

.m8-invite-row__meta{
  display: grid;
  grid-template-columns: 1fr;
  gap: .45rem;
  padding-right: 2rem; /* Platz für Lösch-Icon rechts oben */
}
.m8-invite-row__code-label{
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
}
.m8-invite-row__code-value{
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: .25rem;
  padding: .45rem .6rem;
  border: 1px solid var(--m8-border);
  border-radius: 10px;
  background: var(--m8-bg-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1.15em;
}

/* Einladung annehmen: Code-Feld wie Code-Block (gleiche Farbe wie in Einladungs-Kacheln) */
.m8-form-invite-check #m8_invite_code{
  max-width: 460px;
  background: var(--m8-bg-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 1.15em;
}

/* Einladung-Statusfarben (gültig/ungültig) */
.m8-invite-status{ font-weight: 700; }
.m8-invite-status--valid{ color: #2b6f3a; }
.m8-invite-status--invalid{ color: #b00020; }
.m8-invite-row__facts{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .35rem .6rem;
}
.m8-invite-row__fact-label{
  display: block;
  color: var(--m8-muted);
  font-size: .82rem;
  line-height: 1.1;
}
.m8-invite-row__fact-value{
  display: block;
  font-weight: 700;
}

/* Invites: Badge-Pills (rund konturiert) */
.m8-invite-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .15rem .55rem;
  border: 1px solid var(--m8-border);
  border-radius: 999px;
  background: transparent;
  font-weight: 700;
  font-size: .85rem;
  line-height: 1.1;
  white-space: nowrap;
}
.m8-invite-badge--valid{ border-color: #2b6f3a; color: #2b6f3a; }
.m8-invite-badge--invalid{ border-color: #b00020; color: #b00020; }
.m8-invite-badge--active{ border-color: #2b6f3a; color: #2b6f3a; }
.m8-invite-badge--inactive{ border-color: var(--m8-border); color: var(--m8-muted); }


@media (max-width: 520px){
  .m8-invite-row__facts{ grid-template-columns: 1fr; }
}

.m8-invite-row__link{ margin-top: .55rem; }

/* --- Feed (Posts/Kommentare) -------------------------------------------- */

/* Patch 1.1.62: kleine FE-Style-Anpassungen (nur CSS) */

/* Haupt-Posting-Formular: mehr Abstand zum Feed darunter */
.m8-social-form.m8-social-form-post{
  margin-bottom: 1.15rem;
}

.m8-social-posts{
  display:flex;
  flex-direction: column;
  gap: var(--m8-gap);
}

.m8-post{
  background: var(--m8-bg);
  border: 1px solid var(--m8-border);
  border-radius: var(--m8-radius);
  padding: .6rem;
  position: relative;
}

/* Neue Posts (Polling/AJAX) weich einblenden */
.m8-post.m8-ef-post-fade{
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .25s ease, transform .25s ease;
}
.m8-post.m8-ef-post-fade.m8-ef-post-fade--in{
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce){
  .m8-post.m8-ef-post-fade{
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.m8-post-head{
  margin: 0 0 .45rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  padding-right: 4.6rem; /* Platz für Löschen + Bearbeiten rechts oben */
}
.m8-post-head__meta{ flex: 1 1 auto; min-width: 0; }

/* Avatar (robust, rund) */
.m8-post-head__meta{ display:flex; align-items:center; gap:.45rem; flex-wrap:wrap; }
.m8-ef-avatar-link{ display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:999px; overflow:hidden; flex:0 0 40px; text-decoration:none; }
.m8-ef-avatar{ width:40px; height:40px; border-radius:999px; overflow:hidden; display:inline-flex; align-items:center; justify-content:center; flex:0 0 40px; text-decoration:none; }
img.m8-ef-avatar{ display:block; width:100%; height:100%; object-fit:cover; border-radius:999px; }
.m8-ef-avatar-link img{ display:block; width:100%; height:100%; object-fit:cover; border-radius:999px; }
span.m8-ef-avatar{ font-weight:700; color:#fff; font-size:.85rem; letter-spacing:.02em; }
.m8-ef-avatar--sm{ width:26px; height:26px; flex:0 0 26px; font-size:.7rem; }

.m8-comment-head{
  margin: 0 0 5px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  padding-right: 4.6rem; /* Platz für Löschen + Bearbeiten rechts oben */
}

.m8-comment-head small{ color: var(--m8-muted); }

/* Kommentar-Userlinks: keine Unterstreichung, gleiche Textfarbe */
.m8-comment-head a,
.m8-comment-head a:visited{
  color: inherit;
  text-decoration: none;
}
.m8-comment-head a:hover{
  color: inherit;
  text-decoration: none;
}

/* Replies */
.m8-comment--reply{ margin-left:.9rem; border-left: 3px solid rgba(0,0,0,.08); }
html[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] .m8-comment--reply{ border-left-color: rgba(255,255,255,.12); }

.m8-ef-reply-btn{ border:0; background:transparent; padding:0; margin-left:.35rem; color: var(--m8-muted); font-size:.85rem; cursor:pointer; }
.m8-ef-reply-btn:hover{ text-decoration: underline; }

.m8-ef-replybar{ margin: .25rem 0 .35rem; padding: .35rem .5rem; border: 1px solid var(--m8-border); border-radius: 10px; background: var(--m8-bg-soft); display:flex; align-items:center; justify-content:space-between; gap:.5rem; }
.m8-ef-replybar__text{ font-size: var(--m8-ef-ui-font-size); color: var(--m8-text); }
.m8-ef-replybar__cancel{ border:1px solid var(--m8-border); background: transparent; border-radius: 8px; padding: .1rem .35rem; cursor:pointer; color: var(--m8-muted); }
.m8-ef-replybar__cancel:hover{ background: var(--m8-bg); }

/* Username- und Gruppen-Links: kein Unterstreichen, Farbton wie Text */
.m8-post-head__meta a{
  color: inherit;
  text-decoration: none;
}
.m8-post-head__meta a:hover{
  text-decoration: none;
  opacity: .85;
}

/* Eigene Posts: Löschen-Button */
.m8-post-delete-form{ margin: 0; position: absolute; top: .45rem; right: .45rem; z-index: 3; }
.m8-post-delete-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--m8-border);
  background: transparent;
  padding: .15rem .4rem;
  border-radius: 8px;
  font-size: .85rem;
  line-height: 1;
  color: var(--m8-muted);
  cursor: pointer;
}
.m8-post-delete-btn:hover{ background: var(--m8-bg-soft); }

/* Eigene Posts: Bearbeiten-Button (Summary in <details>) */
.m8-post-edit{ margin: 0; }
.m8-post-edit > summary{
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--m8-border);
  background: transparent;
  padding: .15rem .4rem;
  border-radius: 8px;
  font-size: .85rem;
  line-height: 1;
  color: var(--m8-muted);
  cursor: pointer;

  /* Position neben dem Löschen-Button */
  position: absolute;
  top: .45rem;
  right: 2.55rem;
  z-index: 3;
}
.m8-post-edit > summary:hover{ background: var(--m8-bg-soft); }
.m8-post-edit > summary::-webkit-details-marker{ display: none; }

.m8-post-edit-form{ margin-top: .5rem; }
.m8-post-edit-actions{
  margin-top: .35rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

/* Eigene Kommentare: Bearbeiten-Button (Summary in <details>) */
.m8-comment{ padding-right: 4.6rem; /* Platz für Bearbeiten + Löschen */ }
.m8-comment-edit{ margin: 0; }
.m8-comment-edit > summary{
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  width: 32px;
  border: 0 !important;
  background: transparent;
  padding: 0;
  border-radius: 8px;
  font-size: .85rem;
  line-height: 1;
  color: var(--m8-muted);
  cursor: pointer;

  /* Position neben dem Löschen-Button */
  position: absolute;
  top: .45rem;
  right: 2.55rem;
  z-index: 3;
}
.m8-comment-edit > summary:hover{ background: var(--m8-bg-soft); }
.m8-comment-edit > summary::-webkit-details-marker{ display: none; }

.m8-comment-edit-form{ margin-top: .5rem; }
.m8-comment-edit-actions{
  margin-top: .35rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
/* Kommentare */
.m8-comments{
  margin-top: .65rem;
  margin-left: .85rem; /* leicht eingerückt, bleibt aber klar dem Post zugehörig */
  padding-left: .75rem;
  border-left: 2px solid var(--m8-border);
}
.m8-comment{
  position: relative;
  /* kompaktere Kommentar-Kacheln (weniger vertikaler Platzverbrauch) */
  padding: .02rem .5rem;
  padding-right: 4.6rem; /* Platz für Löschen + Bearbeiten */
  margin-top: .10rem;
  border: 1px solid var(--m8-border);
  border-radius: 12px;
  background: var(--m8-bg-soft);
}

/* Eigene Kommentare: Löschen-Button */
.m8-comment-delete-form{ margin: 0; position: absolute; top: .45rem; right: .45rem; z-index: 3; }
.m8-comment-delete-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--m8-border);
  background: transparent;
  padding: .15rem .4rem;
  border-radius: 8px;
  font-size: .85rem;
  line-height: 1;
  color: var(--m8-muted);
  cursor: pointer;
}
.m8-comment-delete-btn:hover{ background: var(--m8-bg-soft); }

.m8-post-body{ line-height: 1.45; }

.m8-post-group__link{
  display:inline-flex;
  align-items:center;
  padding: .12rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--m8-border);
  background: var(--m8-bg-soft);
  text-decoration:none;
}

.m8-post-pin{ font-weight: 700; }

/* Like-Button (kleiner + farblich zurückhaltend) */
.m8-like-form{ margin-top: .35rem; }
.m8-like-btn{
  display:inline-flex;
  align-items:center;
  gap:.25rem;
  border: 1px solid var(--m8-border);
  background: transparent;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .85rem;
  line-height: 1.2;
  color: var(--m8-like);
  cursor: pointer;
}
.m8-like-btn:hover{ background: var(--m8-bg-soft); }
.m8-like-btn.is-liked{ color: var(--m8-like); font-weight: 600; }
.m8-like-btn[disabled]{ opacity:.5; cursor:not-allowed; }

/* Status-/Toast-Meldung (oben mittig, fixed) */
.m8-ef-toast{
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 99999;
  max-width: min(92vw, 720px);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.25;
  letter-spacing: .2px;
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.m8-ef-toast.is-show{ opacity: 1; transform: translateX(-50%) translateY(0); }
.m8-ef-toast.is-ok{ background: rgba(18,18,18,.92); color: #fff; }
.m8-ef-toast.is-error{ background: rgba(176,0,32,.92); color: #fff; }
.m8-ef-toast__text{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width:520px){
  .m8-ef-toast{ white-space: normal; border-radius: 18px; }
  .m8-ef-toast__text{ white-space: normal; }
}

/* Post-Actions (Insta-aehnlich): Like + Kommentar-Toggle */
.m8-post-actions{
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .35rem;
}
.m8-post-actions .m8-like-form{ margin: 0; }
.m8-ef-comment-toggle{
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  border: 1px solid var(--m8-border);
  background: transparent;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .85rem;
  line-height: 1.2;
  color: var(--m8-muted);
  text-decoration: none;
}
.m8-ef-comment-toggle .m8-ef-comment-icon{
  display: inline-block;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url('icons/make-comment.svg') no-repeat center / contain;
  mask: url('icons/make-comment.svg') no-repeat center / contain;
}
.m8-ef-comment-toggle:hover{ background: var(--m8-bg-soft); }

/* Kommentar-Formular einklappen (smooth via JS) */
.m8-ef-commentform-wrap{
  margin-top: .5rem;
  overflow: hidden;
}
.m8-ef-commentform-wrap.is-collapsed{
  height: 0;
  opacity: 0;
}
.m8-ef-commentform-wrap.is-open{
  opacity: 1;
}

/* Kommentare: maximal 5 sichtbar, Rest ueber Aufklapper */
.m8-ef-comments-more-btn{
  margin: .35rem 0;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: .85rem;
  color: var(--m8-muted);
  cursor: pointer;
}
.m8-ef-comments-more-btn:hover{ text-decoration: underline; }

.m8-ef-comments-hidden{
  overflow: hidden;
}
.m8-ef-comments-hidden.is-collapsed{
  height: 0;
  opacity: 0;
}
.m8-ef-comments-hidden.is-open{
  opacity: 1;
}

/* Emoji-Picker (Kommentare) – WhatsApp-ähnlich: Toggle-Button im Textarea + Panel */
.m8-ef-textarea-wrap{
  position: relative;
}

/* Platz schaffen, damit der Button unten links nicht über den Text liegt */
.m8-ef-textarea--emoji{
  padding-left: 38px;
  padding-bottom: 32px;
}

.m8-ef-emoji-toggle{
  position: absolute;
  z-index: 30;
  left: 8px;
  bottom: 8px;
  height: 25px;
  width: 25px;
  max-height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--m8-border);
  background: var(--m8-bg-soft);
  border-radius: 8px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.m8-ef-emoji-toggle:hover{ filter: brightness(0.98); }

.m8-ef-emoji-panel{
  position: absolute;
  z-index: 40;
  left: 0;
  bottom: 38px;
  /* bewusst breiter als das Textfeld (WhatsApp-Feeling) */
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: 100px;
  overflow-y: auto;
  display: none;
  flex-wrap: wrap;
  gap: .25rem;
  padding: 0;
  border: 1px solid var(--m8-border);
  background: var(--m8-bg);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  z-index: 50;
}

.m8-ef-emoji-panel.is-open{
  display: flex;
}

.m8-ef-emoji-btn{
  /* vom User gewünscht: komplett neutral (kein padding/border/bg) */
  border: 0;
  background: transparent;
  padding: 0;

  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.m8-ef-emoji-btn:hover{ opacity: .85; }

/* Slider (Instagram-aehnlich) */
.m8-ef-slider{ position:relative; width:100%; overflow:hidden; border-radius: 12px; background: #000; }
.m8-ef-slider__viewport{ width:100%; overflow:hidden; aspect-ratio: 1 / 1; position: relative; }
.m8-ef-slider__track{ display:flex; will-change: transform; height: 100%; }
.m8-ef-slider__slide{ flex: 0 0 100%; height: 100%; }
.m8-ef-slider__slide > a{ display:block; width:100%; height:100%; }
.m8-ef-slider__slide img{ width:100%; height:100%; object-fit: cover; display:block; }
.m8-ef-slider__slide video{ width:100%; height:100%; object-fit: cover; display:block; }

/* Video-Wrapper + Lightbox-Button (für Videos) */
.m8-ef-videoWrap{ position: relative; width:100%; height:100%; }
.m8-ef-lightbox-btn.m8-ef-lightbox-btn--video{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  line-height: 1;
  z-index: 5;
}
.m8-ef-lightbox-btn.m8-ef-lightbox-btn--video:hover{ background: rgba(0,0,0,.55); }

.m8-ef-slider__btn{ position:absolute; top:50%; transform: translateY(-50%); border:1px solid rgba(255,255,255,.35); background: rgba(0,0,0,.25); color:#fff; width:34px; height:34px; border-radius: 999px; display:flex; align-items:center; justify-content:center; cursor:pointer; z-index: 5; }
.m8-ef-slider__btn:hover{ background: rgba(0,0,0,.35); }
.m8-ef-slider__btn--prev{ left: .5rem; }
.m8-ef-slider__btn--next{ right: .5rem; }
.m8-ef-slider__dots{ position:absolute; left:0; right:0; bottom:.45rem; display:flex; justify-content:center; gap:.35rem; z-index:5; }
.m8-ef-slider__dot{ width:8px; height:8px; border-radius:999px; border:0; background: rgba(255,255,255,.5); cursor:pointer; padding:0; }
.m8-ef-slider__dot.is-active{ background: rgba(255,255,255,.95); }

/* Angepinnte Beiträge sollen sichtbarer sein */
.m8-post--pinned{
  border-color: rgba(0,0,0,.25);
  background: linear-gradient(0deg, var(--m8-bg) 0%, rgba(0,0,0,.02) 100%);
}
html[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] .m8-post--pinned{
  border-color: rgba(255,255,255,.22) !important;
  background: linear-gradient(0deg, var(--m8-bg) 0%, rgba(255,255,255,.04) 100%) !important;
}

/* =========================
   Core-Module Styling (Demo)
   - lostPassword (Passwort vergessen)
   - login (falls separat gerendert)
   ========================= */
body[data-m8-ef-scope="easyforum"] .mod_lostPassword,
body[data-m8-ef-scope="easyforum"] .mod_login,
body.m8-ef-page .mod_lostPassword,
body.m8-ef-page .mod_login {
  max-width: 980px;
  margin: 0 auto;
  padding: 1rem 0;
}

body[data-m8-ef-scope="easyforum"] .mod_lostPassword .formbody,
body[data-m8-ef-scope="easyforum"] .mod_login .formbody,
body.m8-ef-page .mod_lostPassword .formbody,
body.m8-ef-page .mod_login .formbody {
  background: var(--m8-bg);
  border: 1px solid var(--m8-border);
  border-radius: var(--m8-radius);
  padding: .9rem;
}

body[data-m8-ef-scope="easyforum"] .mod_lostPassword .widget,
body[data-m8-ef-scope="easyforum"] .mod_login .widget,
body.m8-ef-page .mod_lostPassword .widget,
body.m8-ef-page .mod_login .widget {
  margin: 0 0 .65rem;
}

body[data-m8-ef-scope="easyforum"] .mod_lostPassword label,
body[data-m8-ef-scope="easyforum"] .mod_login label,
body.m8-ef-page .mod_lostPassword label,
body.m8-ef-page .mod_login label {
  display: block;
  margin: 0 0 .25rem;
  font-weight: 600;
}

body[data-m8-ef-scope="easyforum"] .mod_lostPassword input,
body[data-m8-ef-scope="easyforum"] .mod_login input,
body.m8-ef-page .mod_lostPassword input,
body.m8-ef-page .mod_login input {
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--m8-border);
  border-radius: 10px;
  padding: .45rem .7rem;
  background: var(--m8-bg);
  color: var(--m8-text);
}

body[data-m8-ef-scope="easyforum"] .mod_lostPassword button,
body[data-m8-ef-scope="easyforum"] .mod_login button,
body[data-m8-ef-scope="easyforum"] .mod_lostPassword .submit,
body[data-m8-ef-scope="easyforum"] .mod_login .submit,
body.m8-ef-page .mod_lostPassword button,
body.m8-ef-page .mod_login button,
body.m8-ef-page .mod_lostPassword .submit,
body.m8-ef-page .mod_login .submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem .85rem;
  border-radius: 10px;
  border: 1px solid var(--m8-border);
  background: var(--m8-accent);
  color: var(--m8-bg);
  font-weight: 700;
  cursor: pointer;
}

body[data-m8-ef-scope="easyforum"] .mod_lostPassword p.error,
body[data-m8-ef-scope="easyforum"] .mod_login p.error,
body[data-m8-ef-scope="easyforum"] .mod_lostPassword .error,
body[data-m8-ef-scope="easyforum"] .mod_login .error,
body.m8-ef-page .mod_lostPassword p.error,
body.m8-ef-page .mod_login p.error,
body.m8-ef-page .mod_lostPassword .error,
body.m8-ef-page .mod_login .error {
  color: var(--m8-text);
}

/* Welcome (Forum-Startseite) – optionales Bild + editierbarer Text */
body[data-m8-ef-scope="easyforum"] .m8-welcome-media,
body.m8-ef-page .m8-welcome-media {
  margin: 0.75rem 0;
}

body[data-m8-ef-scope="easyforum"] .m8-welcome-media img,
body.m8-ef-page .m8-welcome-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}

body[data-m8-ef-scope="easyforum"] .m8-welcome-text p,
body.m8-ef-page .m8-welcome-text p {
  margin: 0 0 0.6rem 0;
}

/* Navigation: Logout-Button (per JS ans Ende des EasyForum-Menüs gehängt)
   -> wie ein normaler Menüpunkt (Icon + Text) */
body[data-m8-ef-scope="easyforum"] .m8-ef-nav-logout,
body.m8-ef-page .m8-ef-nav-logout {
  list-style: none;
}

body[data-m8-ef-scope="easyforum"] .m8-ef-nav-logout .m8-ef-logout,
body.m8-ef-page .m8-ef-nav-logout .m8-ef-logout {
  display: flex;
  align-items: center;
  gap: .45rem;
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  padding: .45rem .55rem;
  border-radius: 10px;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

body[data-m8-ef-scope="easyforum"] .m8-ef-nav-logout .m8-ef-logout .m8-ef-nav-icon,
body.m8-ef-page .m8-ef-nav-logout .m8-ef-logout .m8-ef-nav-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 1.05rem;
  display: block;
}

body[data-m8-ef-scope="easyforum"] .m8-ef-nav-logout .m8-ef-logout:hover,
body.m8-ef-page .m8-ef-nav-logout .m8-ef-logout:hover {
  background: var(--m8-bg-soft);
}

/* Forum-Seitenmenü (Contao Navigation/Custom Navigation in linker Spalte)
   Hinweis: die Demo nutzt "customnav" (Klasse: .mod_customnav). */
body[data-m8-ef-scope="easyforum"] #left .mod_navigation,
body[data-m8-ef-scope="easyforum"] #left .mod_customnav,
body.m8-ef-page #left .mod_navigation,
body.m8-ef-page #left .mod_customnav {
  position: sticky;
  top: 16px;
  border: 1px solid var(--m8-border);
  border-radius: var(--m8-radius);
  /* gleiche Kartenflaeche wie Posts */
  background: var(--m8-bg);
  padding: .6rem;
  display: block !important;
}

/* Gewuenscht: Custom-Navigation links ohne Kontur (Border). */
body[data-m8-ef-scope="easyforum"] #left .mod_customnav,
body.m8-ef-page #left .mod_customnav {
  border: 0 !important;
}

/* Sidebar-Navigation: Logo (oberhalb der Links, etwas groesser als die Icon-Groesse) */
body[data-m8-ef-scope="easyforum"] #left .m8-ef-nav-logo,
body.m8-ef-page #left .m8-ef-nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .35rem 0 .55rem;
}

body[data-m8-ef-scope="easyforum"] #left .m8-ef-nav-logo__link,
body.m8-ef-page #left .m8-ef-nav-logo__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

body[data-m8-ef-scope="easyforum"] #left .m8-ef-nav-logo__img,
body.m8-ef-page #left .m8-ef-nav-logo__img {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
}

body[data-m8-ef-scope="easyforum"] #left .mod_navigation ul,
body[data-m8-ef-scope="easyforum"] #left .mod_navigation ol,
body[data-m8-ef-scope="easyforum"] #left .mod_customnav ul,
body[data-m8-ef-scope="easyforum"] #left .mod_customnav ol,
body.m8-ef-page #left .mod_navigation ul,
body.m8-ef-page #left .mod_navigation ol,
body.m8-ef-page #left .mod_customnav ul,
body.m8-ef-page #left .mod_customnav ol {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

body[data-m8-ef-scope="easyforum"] #left .mod_navigation li,
body[data-m8-ef-scope="easyforum"] #left .mod_customnav li,
body.m8-ef-page #left .mod_navigation li,
body.m8-ef-page #left .mod_customnav li {
  margin: 0 0 3px 0;
}

body[data-m8-ef-scope="easyforum"] #left .mod_navigation li:last-child,
body[data-m8-ef-scope="easyforum"] #left .mod_customnav li:last-child,
body.m8-ef-page #left .mod_navigation li:last-child,
body.m8-ef-page #left .mod_customnav li:last-child {
  margin-bottom: 0;
}

body[data-m8-ef-scope="easyforum"] #left .mod_navigation a,
body[data-m8-ef-scope="easyforum"] #left .mod_customnav a,
body.m8-ef-page #left .mod_navigation a,
body.m8-ef-page #left .mod_customnav a {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .45rem;
  font-size: 16px;border-radius: 10px;
  color: inherit;
  text-decoration: none;
}

/* Rechte Sidebar Icon-Farben (Light/Dark) */
body[data-m8-ef-scope="easyforum"],
body.m8-ef-page{
  --m8-ef-rightnav-itemicon: rgba(0,0,0,.85);
  --m8-ef-rightnav-titleicon: rgba(0,0,0,.85);
}
html[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] body[data-m8-ef-scope="easyforum"],
body[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"],
body.m8-ef-page[data-m8-ef-theme="dark"]{
  --m8-ef-rightnav-itemicon: rgba(255,255,255,.7);
  --m8-ef-rightnav-titleicon: rgba(255,255,255,.7);
}

/* Rechte Sidebar (Gruppenliste) – gleiches Verhalten/Styling wie linke Navigation */
body[data-m8-ef-scope="easyforum"] #right .mod_m8_easyforum_groups_sidebar,
body.m8-ef-page #right .mod_m8_easyforum_groups_sidebar {
  position: sticky;
  top: 16px;
  /* Sicherheitsnetz: falls ein Theme/Modul-Wrapper eine Kontur setzt */
  border: 0 !important;
}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar,
body.m8-ef-page #right .m8-ef-groups-sidebar {
  /* Gewuenscht: keine Kontur am rechten Gruppen-Block */
  border: 0 !important;
  border-radius: var(--m8-radius);
  background: var(--m8-bg);
  padding: .6rem;
  display: block !important;
}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__head,
body.m8-ef-page #right .m8-ef-groups-sidebar__head {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .15rem .25rem .45rem;
}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__icon,
body.m8-ef-page #right .m8-ef-groups-sidebar__icon {
  display: none !important;
}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__title,
body.m8-ef-page #right .m8-ef-groups-sidebar__title {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .95em;

}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__title:before,
body.m8-ef-page #right .m8-ef-groups-sidebar__title:before{
  content: "";
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-block;
  background-color: var(--m8-ef-rightnav-titleicon);
  -webkit-mask: url("icons/group-title.svg") no-repeat center / contain;
  mask: url("icons/group-title.svg") no-repeat center / contain;
}

/* Rechte Gruppenliste: Suche (unter "Gruppen") */
body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__search,
body.m8-ef-page #right .m8-ef-groups-sidebar__search{
  position: relative;
  padding: .1rem .25rem .55rem;
}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__search-input,
body.m8-ef-page #right .m8-ef-groups-sidebar__search-input{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--m8-border);
  border-radius: 10px;
  background: var(--m8-bg);
  color: var(--m8-text);
  padding: .55rem .75rem;
  font-size: .95em;
  outline: none;
}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__search-input:focus,
body.m8-ef-page #right .m8-ef-groups-sidebar__search-input:focus{
  border-color: rgba(255,255,255,.28);
}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__noresults,
body.m8-ef-page #right .m8-ef-groups-sidebar__noresults{
  padding: .5rem .6rem;
  opacity: .75;
  font-size: .95em;
}

/* Rechte Gruppenliste: Icon vor jedem Eintrag (Dark/Light via CSS-Variable) */
body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__item-icon,
body.m8-ef-page #right .m8-ef-groups-sidebar__item-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-block;
  background-image: url("icons/grouplist.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  /* Lightmode: dunkles Icon */
  opacity: .85;
  filter: none;
}

/* Darkmode: weisses Icon (0.7) */
html[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__item-icon,
body[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] #right .m8-ef-groups-sidebar__item-icon,
body.m8-ef-page[data-m8-ef-theme="dark"] #right .m8-ef-groups-sidebar__item-icon {
  filter: brightness(0) invert(1);
  opacity: .7;
}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__text,
body.m8-ef-page #right .m8-ef-groups-sidebar__text {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Rechte Gruppenliste: Themen-Badge (klein, rechts) */
body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__badge,
body.m8-ef-page #right .m8-ef-groups-sidebar__badge {
  flex: 0 0 auto;
  max-width: 45%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  opacity: .9;
}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__badge.is-hidden,
body.m8-ef-page #right .m8-ef-groups-sidebar__badge.is-hidden {
  display: none !important;
}

/* Badge nur anzeigen, wenn das Thema selbst ein Treffer ist */
body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__item.is-topic-match .m8-ef-groups-sidebar__badge.is-hidden,
body.m8-ef-page #right .m8-ef-groups-sidebar__item.is-topic-match .m8-ef-groups-sidebar__badge.is-hidden {
  display: inline-flex !important;
}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__list,
body.m8-ef-page #right .m8-ef-groups-sidebar__list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__item,
body.m8-ef-page #right .m8-ef-groups-sidebar__item {
  margin: 0 0 3px 0;
  min-width: 0;
}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__item:last-child,
body.m8-ef-page #right .m8-ef-groups-sidebar__item:last-child {
  margin-bottom: 0;
}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__link,
body.m8-ef-page #right .m8-ef-groups-sidebar__link {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .45rem;
  font-size: 16px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__link:hover,
body.m8-ef-page #right .m8-ef-groups-sidebar__link:hover {
  background: var(--m8-bg-soft);
}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__item.is-active > .m8-ef-groups-sidebar__link,
body.m8-ef-page #right .m8-ef-groups-sidebar__item.is-active > .m8-ef-groups-sidebar__link {
  background: var(--m8-bg-soft);
  box-shadow: 0 0 0 1px rgba(0,0,0,.08) inset;
}

/* Sidebar: Pushes-Menueeintrag mit Badge zusaetzlich rot hinterlegen
   (Contao rendert aktiv je nach Template als <a> oder <strong>/<span> -> immer volle Breite erzwingen) */
body[data-m8-ef-scope="easyforum"] #left li.m8-ef-nav--pushes.m8-ef-nav--pushes-hot > :is(a, strong, span, button),
body.m8-ef-page #left li.m8-ef-nav--pushes.m8-ef-nav--pushes-hot > :is(a, strong, span, button){
  display: flex !important;
  align-items: center;
  gap: .45rem;
  padding: .45rem .55rem;
  border-radius: 10px;
  background: var(--m8-like) !important;
  color: #fff !important;
  width: 100% !important;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(237,73,86,.55) inset;
}

body[data-m8-ef-scope="easyforum"] #left li.m8-ef-nav--pushes.m8-ef-nav--pushes-hot > a:hover,
body.m8-ef-page #left li.m8-ef-nav--pushes.m8-ef-nav--pushes-hot > a:hover{
  background: var(--m8-like) !important;
  color: #fff !important;
}
/* Push-Badge in der Sidebar-Navigation: rechts am Menu-Eintrag andocken */
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) a .m8-ef-badge,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) a .m8-ef-badge,
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) li.active > :is(strong, span) .m8-ef-badge,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) li.active > :is(strong, span) .m8-ef-badge {
  margin-left: auto;
  flex: 0 0 auto;
}

/* Sidebar: Pushes-Badge immer rot (auch wenn umgebendes Theme Styles ueberschreibt) */
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) .m8-ef-badge,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) .m8-ef-badge{
  background: var(--m8-like) !important;
  color: #fff !important;
  border: 0 !important;
}

/* Push-Badge im Seitenmenue: rot wie Glocke */
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) .m8-ef-badge,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) .m8-ef-badge{
  background: var(--m8-like) !important;
  color: #fff !important;
  border: 0 !important;
}
/* Sidebar-Badge optisch erzwingen (rot, weiss) */
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) .m8-ef-badge,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) .m8-ef-badge{
  background: var(--m8-like) !important;
  color: #fff !important;
}

/* Vorbereitung: Platzhalterflaeche (quadratisch) vor jedem Nav-Eintrag fuer kommende Icons.
   -> Verhindert spaeter Layout-Shifts beim Einfuegen von Icons. */
body[data-m8-ef-scope="easyforum"] #left .mod_navigation a::before,
body[data-m8-ef-scope="easyforum"] #left .mod_customnav a::before,
body.m8-ef-page #left .mod_navigation a::before,
body.m8-ef-page #left .mod_customnav a::before,
body[data-m8-ef-scope="easyforum"] #left .mod_navigation li.active > :is(strong, span)::before,
body[data-m8-ef-scope="easyforum"] #left .mod_customnav li.active > :is(strong, span)::before,
body.m8-ef-page #left .mod_navigation li.active > :is(strong, span)::before,
body.m8-ef-page #left .mod_customnav li.active > :is(strong, span)::before {
  content: "";
  display: inline-block;
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 1.05rem;
}

/* Seitenmenue-Icons als echtes <span> (nicht ::before).
   JS fuegt .m8-ef-nav-icon in Feed/Logout ein; Groesse entspricht dem Placeholder (1.05rem). */
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon {
  display: inline-block;
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 1.05rem;
}

/* Forum-Logo-Icon (PNG, ca. 5% groesser als Standard-Icons) */
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon--forumlogo,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon--forumlogo {
  background: url('img/forum-logo-min.png') no-repeat center / contain;
  background-color: transparent;
  -webkit-mask: none;
  mask: none;
  transform: scale(1.05);
  opacity: 1;
}

/* Feed-Icon (mask) */
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon--feed,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon--feed {
  background-color: currentColor;
  -webkit-mask: url('icons/feed.svg') no-repeat center / contain;
  mask: url('icons/feed.svg') no-repeat center / contain;
  opacity: .9;
}

/* Logout-Icon (mask) */
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon--logout,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon--logout {
  background-color: currentColor;
  -webkit-mask: url('icons/logout.svg') no-repeat center / contain;
  mask: url('icons/logout.svg') no-repeat center / contain;
  opacity: .9;
}

/* Wenn per <span> Icon gearbeitet wird, pseudo-placeholder (::before) deaktivieren,
   damit es nicht doppelt Platz belegt. */
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) li.m8-ef-nav--has-icon > a::before,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) li.m8-ef-nav--has-icon > a::before,
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) li.m8-ef-nav--has-icon.active > :is(strong, span)::before,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) li.m8-ef-nav--has-icon.active > :is(strong, span)::before {
  content: none !important;
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Pushes-Icon (mask) */
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon--pushes,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon--pushes {
  background-color: currentColor;
  -webkit-mask: url('icons/pushes.svg') no-repeat center / contain;
  mask: url('icons/pushes.svg') no-repeat center / contain;
  opacity: .9;
}

/* Profil-Icon (mask) */
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon--profile,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon--profile {
  background-color: currentColor;
  -webkit-mask: url('icons/profile.svg') no-repeat center / contain;
  mask: url('icons/profile.svg') no-repeat center / contain;
  opacity: .9;
}

/* Chats-Icon (mask) */
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon--chats,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon--chats {
  background-color: currentColor;
  -webkit-mask: url('icons/chats.svg') no-repeat center / contain;
  mask: url('icons/chats.svg') no-repeat center / contain;
  opacity: .9;
}

/* Gruppen-Icon (mask) */
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon--groups,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon--groups {
  background-color: currentColor;
  -webkit-mask: url('icons/group.svg') no-repeat center / contain;
  mask: url('icons/group.svg') no-repeat center / contain;
  opacity: .9;
}

/* Einladungen-Icon (mask) */
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon--invite,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) .m8-ef-nav-icon--invite {
  background-color: currentColor;
  -webkit-mask: url('icons/invite.svg') no-repeat center / contain;
  mask: url('icons/invite.svg') no-repeat center / contain;
  opacity: .9;
}

/* Icons im Seitenmenue (dark/lightmode-konform via currentColor)
   - Feed: nutzt src/Resources/public/icons/feed.svg (Mask) */
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) li.m8-ef-nav--feed > a::before,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) li.m8-ef-nav--feed > a::before,
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) li.m8-ef-nav--feed.active > :is(strong, span)::before,
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) li.m8-ef-nav--feed.active > :is(strong, span)::before {
  background-color: currentColor;
  -webkit-mask: url('icons/feed.svg') no-repeat center / contain;
  mask: url('icons/feed.svg') no-repeat center / contain;
  opacity: .9;
}
/* Contao rendert den aktiven Punkt je nach Template als <strong> oder <span> (anstelle <a>).
   -> gleiches Padding wie Links, damit KEIN Layoutshift entsteht. */
body[data-m8-ef-scope="easyforum"] #left .mod_navigation li.active > :is(strong, span),
body[data-m8-ef-scope="easyforum"] #left .mod_customnav li.active > :is(strong, span),
body.m8-ef-page #left .mod_navigation li.active > :is(strong, span),
body.m8-ef-page #left .mod_customnav li.active > :is(strong, span) {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .55rem;
  border-radius: 10px;
  background: var(--m8-bg-soft);
  font-weight: 700;
  color: inherit;
}

body[data-m8-ef-scope="easyforum"] #left .mod_navigation a:hover,
body[data-m8-ef-scope="easyforum"] #left .mod_customnav a:hover,
body.m8-ef-page #left .mod_navigation a:hover,
body.m8-ef-page #left .mod_customnav a:hover {
  background: var(--m8-bg-soft);
}

body[data-m8-ef-scope="easyforum"] #left .mod_navigation li.active > a,
body[data-m8-ef-scope="easyforum"] #left .mod_customnav li.active > a,
body.m8-ef-page #left .mod_navigation li.active > a,
body.m8-ef-page #left .mod_customnav li.active > a {
  background: var(--m8-bg-soft);
  font-weight: 700;
}

/* Fix: Aktive Menuepunkte nicht weiss -> Textfarbe immer aus --m8-text ziehen (Light/Dark sicher) */
body[data-m8-ef-scope="easyforum"] #left :is(.mod_navigation, .mod_customnav) li.active > :is(a, strong, span),
body.m8-ef-page #left :is(.mod_navigation, .mod_customnav) li.active > :is(a, strong, span) {
  color: var(--m8-text) !important;
}

body[data-m8-ef-scope="easyforum"] #right .m8-ef-groups-sidebar__item.is-active > .m8-ef-groups-sidebar__link,
body.m8-ef-page #right .m8-ef-groups-sidebar__item.is-active > .m8-ef-groups-sidebar__link {
  color: var(--m8-text) !important;
}

/* Nicht eingeloggt: im Seitenmenue nur den EasyForum-Startpunkt anzeigen (keine Unterpunkte). */
html[data-m8-ef-logged-in="0"] body[data-m8-ef-scope="easyforum"] #left :is(nav.mod_navigation, nav.mod_customnav) :is(ul.level_2, ol.level_2) {
  display: none !important;
}

/* Nicht eingeloggt: rechte Spalte auf EasyForum-Seiten ausblenden. */
html[data-m8-ef-logged-in="0"] body[data-m8-ef-scope="easyforum"] #right,
html[data-m8-ef-logged-in="0"] body.m8-ef-page #right {
  display: none !important;
}

/* ------------------------------------------------------------
   EasyForum Sidebar-Layout (nur wenn das Layout aktiv ist)
   - #left (max 300px) und #main nebeneinander
   - volle Hoehe (Flex-Layout)
   - #right bleibt als rechte Spalte (200px) sichtbar (Platzhalter)
   - overflow sichtbar, damit Slider/Lightbox etc. nicht abgeschnitten werden
   ------------------------------------------------------------ */
/* Sidebar-Spalten: Grid statt Flex (robuster gegen fremde flex-Regeln auf #main) */
body.m8-ef-sidebar-layout #container,
html.m8-ef-sidebar-layout #container {
  display: grid !important;
  grid-template-columns: 250px minmax(0, 1fr) 250px;
  grid-template-areas: "left main right";
  align-items: start;
  min-height: 100vh;
  gap: 0 !important;
  column-gap: 0 !important;
  row-gap: 0 !important;
  overflow: visible !important;
}

body.m8-ef-sidebar-layout #left,
html.m8-ef-sidebar-layout #left {
  grid-area: left;
min-width: 0;
  /* Contao-Layout-CSS arbeitet teils mit negativen Margins (z.B. margin-left:-100%).
     Im Sidebar-Grid darf #left niemals aus dem Viewport geschoben werden. */
  margin-left: 0 !important;
  margin-right: 0 !important;
  float: none !important;
  clear: none !important;
  background: var(--m8-bg) !important;
  /* leichte, erkennbare Abtrennung zum Content */
  border-right: 1px solid var(--m8-border) !important;
  /* Links genauso fix/sticky wie rechts (volle Hoehe + internes Scrollen) */
  position: sticky;
  top: 0;
  height: 100vh;
  align-self: stretch;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

/* Linkes Seitenmenue im Sidebar-Layout: keine eigene Sticky-Position (Spalte ist bereits sticky) */
body.m8-ef-sidebar-layout #left :is(.mod_navigation, .mod_customnav),
html.m8-ef-sidebar-layout #left :is(.mod_navigation, .mod_customnav) {
  position: static !important;
  top: auto !important;
}

body.m8-ef-sidebar-layout #main,
html.m8-ef-sidebar-layout #main {
  grid-area: main;
max-width: none !important;
  min-width: 0;
  align-self: stretch;
  justify-self: stretch;
  /* verhindert, dass #main (durch fremde Regeln) ueber die Grid-Spalte hinauswachsen kann */
  max-inline-size: 100% !important;
  overflow: visible !important;
}

body.m8-ef-sidebar-layout #right,
html.m8-ef-sidebar-layout #right {
  grid-area: right;
  display: block !important;
min-width: 0;
  margin: 0 !important;
  float: none !important;
  clear: none !important;
  background: var(--m8-bg) !important;

  position: sticky;
  top: 0;
  height: 100vh;
  /* leichte Abtrennung zum Content */
  border-left: 1px solid var(--m8-border) !important;
  align-self: stretch;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

/* Nicht eingeloggt: rechte Spalte komplett ausblenden (kein leerer Bereich). */
html[data-m8-ef-logged-in="0"].m8-ef-sidebar-layout #right,
html[data-m8-ef-logged-in="0"] body.m8-ef-sidebar-layout #right {
  display: none !important;
}

html[data-m8-ef-logged-in="0"].m8-ef-sidebar-layout #container,
html[data-m8-ef-logged-in="0"] body.m8-ef-sidebar-layout #container {
  grid-template-columns: 250px minmax(0, 1fr) !important;
  grid-template-areas: "left main" !important;
}

body.m8-ef-sidebar-layout #wrapper,
html.m8-ef-sidebar-layout #wrapper {
  overflow: visible !important;
}

body.m8-ef-sidebar-layout #left .inside,
body.m8-ef-sidebar-layout #main .inside,
body.m8-ef-sidebar-layout #right .inside,
html.m8-ef-sidebar-layout #left .inside,
html.m8-ef-sidebar-layout #main .inside,
html.m8-ef-sidebar-layout #right .inside {
  height: 100%;
}

/* Mobile/Tablet: Spalten untereinander */
@media (max-width: 992px){
  body.m8-ef-sidebar-layout #container,
  html.m8-ef-sidebar-layout #container {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "left"
      "main";
    column-gap: 0;
    row-gap: 20px;
  }
  body.m8-ef-sidebar-layout #left,
  html.m8-ef-sidebar-layout #left {
    max-width: none;
  }
}

/* Forum selbst: overflow sichtbar (z.B. Slider/Overlays) */
body.m8-ef-sidebar-layout .m8-social,
html.m8-ef-sidebar-layout .m8-social {
  overflow: visible !important;
}

/* Sidebar-Layout Fallback: fuer alle Layout-Templates (Contao 5.3/5.6)
   - JS setzt data-m8-ef-sidebar="1" auf <html>/<body> und .m8-ef-layout-flex auf den Parent von #left/#main
   - Dadurch greifen diese Regeln auch dann, wenn eine Layout-CSS-Klasse nicht am <body> landet. */
html[data-m8-ef-sidebar="1"] .m8-ef-layout-flex,
body[data-m8-ef-sidebar="1"] .m8-ef-layout-flex,
html[data-m8-ef-sidebar="1"] .m8-ef-layout-grid,
body[data-m8-ef-sidebar="1"] .m8-ef-layout-grid {
  display: grid !important;
  grid-template-columns: 250px minmax(0, 1fr) 250px;
  grid-template-areas: "left main right";
  align-items: start;
  min-height: 100vh;
  /* Kein Abstand zwischen Sidebar und Content; die Trennung kommt ueber border-right von #left. */
  gap: 0 !important;
  column-gap: 0 !important;
  row-gap: 0 !important;
  overflow: visible !important;
}

html[data-m8-ef-sidebar="1"] #left,
body[data-m8-ef-sidebar="1"] #left {
  grid-area: left;
min-width: 0;
  /* Contao-Layout-CSS arbeitet teils mit negativen Margins (z.B. margin-left:-100%).
     Im Sidebar-Grid darf #left niemals aus dem Viewport geschoben werden. */
  margin-left: 0 !important;
  margin-right: 0 !important;
  float: none !important;
  clear: none !important;
  background: var(--m8-bg) !important;
  /* leichte, erkennbare Abtrennung zum Content */
  border-right: 1px solid var(--m8-border) !important;
  align-self: stretch;
  overflow: visible !important;
}

/* Darkmode: auch die linke Spalte einfärben + Textfarbe setzen (sonst wirkt das Menü "leer") */
html[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] body[data-m8-ef-scope="easyforum"] :where(#left, #container #left, #wrapper #left),
body[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] :where(#left, #container #left, #wrapper #left) {
  background-color: var(--m8-bg) !important;
  color: var(--m8-text) !important;
  border-right-color: rgba(255,255,255,0.12) !important;
}

html[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] body[data-m8-ef-scope="easyforum"] #left :where(a, a:visited),
body[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] #left :where(a, a:visited) {
  color: var(--m8-text) !important;
}

/* Darkmode: Navigation soll die gleiche Flaeche wie der Rest haben (keine helle "Karte") */
html[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] body[data-m8-ef-scope="easyforum"] #left .mod_navigation,
html[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] body[data-m8-ef-scope="easyforum"] #left .mod_customnav,
body[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] #left .mod_navigation,
body[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] #left .mod_customnav {
  background-color: var(--m8-bg) !important;
}

html[data-m8-ef-sidebar="1"] #main,
body[data-m8-ef-sidebar="1"] #main {
  grid-area: main;
max-width: none !important;
  min-width: 0;
  align-self: stretch;
  justify-self: stretch;
  max-inline-size: 100% !important;
  overflow: visible !important;
}

html[data-m8-ef-sidebar="1"] #right,
body[data-m8-ef-sidebar="1"] #right {
  grid-area: right;
  display: block !important;
min-width: 0;
  margin: 0 !important;
  float: none !important;
  clear: none !important;
  background: var(--m8-bg) !important;
  border-left: 1px solid var(--m8-border) !important;
  align-self: stretch;
  overflow: visible !important;
}

html[data-m8-ef-sidebar="1"] #wrapper,
body[data-m8-ef-sidebar="1"] #wrapper {
  overflow: visible !important;
}

/* Forum: Artikel duerfen nichts abschneiden (Contao Layout-Templates setzen teils overflow hidden). */
html[data-m8-ef-scope="easyforum"] .mod_article,
body[data-m8-ef-scope="easyforum"] .mod_article {
  overflow: visible !important;
}

@media (max-width: 992px){
  html[data-m8-ef-sidebar="1"] .m8-ef-layout-flex,
  body[data-m8-ef-sidebar="1"] .m8-ef-layout-flex,
  html[data-m8-ef-sidebar="1"] .m8-ef-layout-grid,
  body[data-m8-ef-sidebar="1"] .m8-ef-layout-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "left"
      "main";
    column-gap: 0;
    row-gap: 20px;
  }
  html[data-m8-ef-sidebar="1"] #left,
  body[data-m8-ef-sidebar="1"] #left {
    max-width: none;
  }
}

/* Benachrichtigungen: Status-Icon (gelesen/ungelesen) */
.m8-notification-head{
  display:flex;
  align-items:center;
  gap: .45rem;
}
.m8-ef-notif-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 18px;
  height: 18px;
  font-size: 14px;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid var(--m8-border);
  background: var(--m8-bg-soft);
}
.m8-ef-notif-icon.is-read{
  opacity: .55;
}

/* Pushes: Spalten-Layout + Kacheloptik
   - Desktop: Spalten nebeneinander (Likes, Kommentare, weitere Typen rechts daneben)
   - Falls viele Spalten: horizontales Scrollen statt Umbrechen (Reihenfolge bleibt erhalten)
   - Mobile/klein: wieder untereinander
*/
.m8-social-notifications .m8-ef-pushes-grid{
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  margin-top: .4rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: .15rem;
  -webkit-overflow-scrolling: touch;
}

.m8-social-notifications .m8-ef-push-col{
  display: flex;
  flex-direction: column;
  gap: .6rem;

  /* Spaltenbreite: auf Desktop nebeneinander, bei Bedarf scrollbar */
  flex: 0 0 320px;
  min-width: 280px;
  max-width: 520px;
}

/* Wenn genug Platz da ist, dürfen die Spalten auch wachsen (füllen die Breite besser aus) */
@media (min-width: 1100px){
  .m8-social-notifications .m8-ef-push-col{
    flex: 1 1 0;
    max-width: none;
  }
}

/* Mobile/klein: wieder untereinander, ohne horizontales Scrollen */
@media (max-width: 900px){
  .m8-social-notifications .m8-ef-pushes-grid{
    flex-direction: column;
    overflow-x: visible;
    overflow-y: visible;
    padding-bottom: 0;
  }
  .m8-social-notifications .m8-ef-push-col{
    flex: 1 1 auto;
    min-width: 0;
  }
}
.m8-social-notifications .m8-ef-push-col__title{
  margin: 0;
}

.m8-social-notifications .m8-ef-push-list{
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.m8-social-notifications .m8-ef-push-card{
  padding: .45rem .55rem;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--m8-bg), var(--m8-bg)) padding-box,
    linear-gradient(135deg, var(--m8-ef-push-grad-a, var(--m8-border)), var(--m8-ef-push-grad-b, var(--m8-border))) border-box;

}



/* Push-Kachel: pro Spalte eigene Border-Gradient-Farben */
.m8-ef-push-col--like{ --m8-ef-push-grad-a:#ff4d4d; --m8-ef-push-grad-b:#ffb000; }
.m8-ef-push-col--comment{ --m8-ef-push-grad-a:#34d399; --m8-ef-push-grad-b:#2dd4bf; }
.m8-ef-push-col--invite{ --m8-ef-push-grad-a:#a78bfa; --m8-ef-push-grad-b:#60a5fa; }
.m8-ef-push-col--post{ --m8-ef-push-grad-a:#fb7185; --m8-ef-push-grad-b:#f59e0b; }
.m8-ef-push-col--system{ --m8-ef-push-grad-a:#94a3b8; --m8-ef-push-grad-b:#64748b; }

.m8-social-notifications .m8-ef-push-card.is-read{
  opacity: .78;
}

.m8-social-notifications .m8-ef-push-card__head{
  justify-content: space-between;
  gap: .35rem;
  margin-bottom: .25rem;
}

.m8-social-notifications .m8-ef-push-card__date{
  color: var(--m8-muted);
  font-size: .9rem;
  white-space: nowrap;
}

.m8-social-notifications .m8-ef-push-card__msg{
  margin: .35rem 0 0;
  font-size: 14px;
  line-height: 1.35;
}

.m8-social-notifications .m8-ef-push-card__actions{
  margin-top: .45rem;
  display: flex;
  justify-content: flex-end;
}

.m8-social-notifications .m8-ef-push-card__actions form{
  margin: 0;
}

.m8-social-notifications .m8-ef-push-card__actions .m8-btn{
  padding: .3rem .55rem;
}

/* Push-Kachel: Nutzerlink */
.m8-social-notifications .m8-ef-push-user{
  font-weight: 700;
  color: inherit;
  text-decoration: none;
}
.m8-social-notifications .m8-ef-push-user:hover{
  text-decoration: underline;
}

/* Backend: Pin-Emoji in Listen-Operation */
.m8-ef-pin-emoji{
  display:inline-block;
  font-size: 16px;
  line-height: 16px;
  vertical-align: middle;
}

/* --- Infinite-Loader (Scroll-Nachlader) ---------------------------------- */
.m8-ef-infinite{
  margin: .75rem 0 0;
  padding: .55rem .75rem;
  border: 1px solid var(--m8-border);
  border-radius: var(--m8-radius);
  background: var(--m8-bg-soft);
  text-align: center;
  color: var(--m8-muted);
}
.m8-ef-infinite.is-loading{ opacity: .92; }
.m8-ef-infinite--done{ opacity: .75; }
.m8-ef-infinite__text{ display: inline-block; }

/* ========================================================================
   Patch 1.1.66 – UI-Rollback + eigenes Darkmode-Design (basierend auf 1.1.63)
   - Darkmode ist Default nach Installation (Theme-JS)
   - Optik wieder im bisherigen M8-Style (ohne Neon/Gradient-Experimente)
   - Profil: Kacheln 3-spaltig + Bio volle Breite, Titelbild/Head volle #main-Breite
   - Kommentar-Reply als Icon-Bubble neben Like
   - Lightbox-CSS (damit Overlay sichtbar ist und kein "Scrollbar weg" Bug)
   - Upload-Input wieder versteckt (Custom Button bleibt)
   ======================================================================== */

/* Dark Tokens (nur wenn Theme=dark aktiv) */
html[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] .m8-social,
body[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] .m8-social,
body.m8-ef-page[data-m8-ef-theme="dark"] .m8-social {
  --m8-radius: 8px;
  --m8-border: rgba(255,255,255,.12);
  --m8-bg: #10141a;
  --m8-bg-soft: rgba(255,255,255,.05);
  --m8-text: rgba(255,255,255,.92);
  --m8-muted: rgba(255,255,255,.62);
  --m8-accent: #f2f2f2;
  color: var(--m8-text);
}

/* Forum-Seitenhintergrund (neutral, kein Gradient) */
html[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] body[data-m8-ef-scope="easyforum"],
body[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"],
body.m8-ef-page[data-m8-ef-theme="dark"]{
  background: #0b0d10;
  color: rgba(255,255,255,.92);
}

/* Ghost Buttons (Text-Buttons) */
.m8-btn--ghost{
  background: transparent;
}

/* Icon Buttons: keine Breite, kein Hintergrund, keine Kontur */
.m8-ef-iconbtn,
.m8-ef-reply-btn,
.m8-comment-delete-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  border-radius: 999px;
  line-height: 1;
  cursor: pointer;
}

.m8-ef-iconbtn:hover,
.m8-ef-reply-btn:hover,
.m8-comment-delete-btn:hover{
  background: var(--m8-bg-soft) !important;
}

/* Kommentar-Actions: Like + Reply als Reihe */
.m8-comment-actions{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .35rem;
}

/* Like-Button in Kommentarbereich kompakter */
.m8-comment .m8-like-form{ display: inline-flex; }
.m8-comment .m8-like-btn{
  padding: 0 .35rem;
  height: 32px;
  border-radius: 999px;
}

/* Reply-Button: als Bubble neben Like */
.m8-ef-reply-btn{
  font-size: 16px;
}

/* Upload: Standard-Input verstecken (Custom Button bleibt) */
.m8-ef-upload{ position: relative; }
.m8-ef-upload__input{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* Slider: smoother Track-Transition (JS setzt Transform) */
.m8-ef-slider__track{
  transition: transform .22s ease;
}

/* Avatar immer rund (img + span) */
.m8-ef-avatar,
.m8-ef-avatar--sm,
.m8-ef-avatar--lg{
  border-radius: 50% !important;
  overflow: hidden;
}
img.m8-ef-avatar,
img.m8-ef-avatar--sm,
img.m8-ef-avatar--lg{
  object-fit: cover;
  display: block;
}

/* Avatar: feste Quadrate erzwingen (verhindert Ellipsen in manchen Browsern/Themes) */
.m8-ef-avatar,
.m8-ef-avatar-link{
  width: 40px !important;
  height: 40px !important;
  aspect-ratio: 1 / 1;
}
.m8-ef-avatar--sm{
  width: 26px !important;
  height: 26px !important;
  aspect-ratio: 1 / 1;
}
.m8-ef-avatar--lg{
  aspect-ratio: 1 / 1;
}

/* Avatar: Quadratisch erzwingen (verhindert Ellipsen) */
.m8-ef-avatar,
.m8-ef-avatar-link{
  width: 40px !important;
  height: 40px !important;
  aspect-ratio: 1 / 1;
}
.m8-ef-avatar--sm{
  width: 26px !important;
  height: 26px !important;
  aspect-ratio: 1 / 1;
}
.m8-ef-avatar--lg{
  aspect-ratio: 1 / 1;
}

/* Profil: Titelbild / Kopfbereich volle #main-Breite */
.m8-social-profile .m8-ef-profile-cover.container{
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Profil: Info-Container volle Breite + Abstaende */
.container.m8-ef-container.m8-ef-profile-info{
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 46px !important; /* Platz fuer Zahnrad rechts oben */
  position: relative;
  padding-top: 10px;
  margin-bottom: 50px;
}

/* Profil: Info-Container in .m8-social wirklich volle Breite (uebersteuert die generelle 850px-Regel) */
.m8-social .container.m8-ef-container.m8-ef-profile-info{
  max-width: 100% !important;
  width: 100% !important;
}

.m8-ef-profile-head{
  position: relative;
  border-radius: var(--m8-radius);
  overflow: hidden;
  border: 1px solid var(--m8-border);
  background: var(--m8-bg);
}

.m8-ef-profile-head__cover{
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
}

/* Profil: Kacheln 3-spaltig + responsive */
.m8-ef-profile-tiles{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .6rem;
}

@media (max-width: 900px){
  .m8-ef-profile-tiles{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px){
  .m8-ef-profile-tiles{ grid-template-columns: 1fr; }
}

.m8-ef-profile-tile{
  border: 1px solid var(--m8-border);
  background: var(--m8-bg);
  border-radius: var(--m8-radius);
  padding: .75rem;
}

.m8-ef-profile-tile__label{
  font-size: var(--m8-ef-ui-font-size);
  opacity: .75;
  margin: 0 0 .25rem;
}

.m8-ef-profile-tile__value{
  font-weight: 700;
  word-break: break-word;
}

/* Profil: Bio volle Breite */
.m8-ef-profile-bio{
  margin-top: .75rem;
  border: 1px solid var(--m8-border);
  background: var(--m8-bg);
  border-radius: var(--m8-radius);
  padding: .75rem;
}

.m8-ef-profile-bio__label{
  font-size: var(--m8-ef-ui-font-size);
  opacity: .75;
  margin: 0 0 .35rem;
}

/* Lightbox: sichtbar + zentriert (verhindert "Scrollbar weg" ohne Overlay) */
.m8-ef-lightbox{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.m8-ef-lightbox.is-open{ display: block; }

.m8-ef-lightbox__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
}

.m8-ef-lightbox__dialog{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.m8-ef-lightbox__img{
  max-width: min(96vw, 980px);
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
}


.m8-ef-lightbox__video{
  max-width: min(96vw, 980px);
  max-height: 90vh;
  width: min(96vw, 980px);
  height: auto;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  display: none;
}

.m8-ef-lightbox__close{
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.m8-ef-lightbox__nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: rgba(0,0,0,.28);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.m8-ef-lightbox__nav--prev{ left: 1rem; }
.m8-ef-lightbox__nav--next{ right: 1rem; }

.m8-ef-lightbox__count{
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  padding: .25rem .6rem;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.92);
  font-size: .85rem;
}

/* ========================================================================
   Patch 1.1.66 – Toolbar-Icons vereinheitlichen + Push-Badge + Avatar-Kreis
   - Toolbar: kompakt, Icon-only, ohne Hintergrund/Kontur
   - ThemeToggle: SVG-Icon per JS (Sonne/Mond)
   - Push-Badge: in Seitenmenue an „Pushes“ andocken
   - Avatar: echte Kreise (auch bei ...--lg)
   ======================================================================== */

/* Toolbar: Icon-Buttons kompakt & einheitlich */
.m8-ef-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: .2rem;
  width: 100%;
}

.m8-ef-toolbar > *{
  margin: 0 !important;
}

.m8-ef-toolbar :is(.m8-ef-iconbtn, .m8-ef-theme-toggle, .m8-ef-logout-module button, .m8-ef-logout-module a){
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 999px;
  overflow: visible;
}

.m8-ef-toolbar :is(.m8-ef-iconbtn, .m8-ef-theme-toggle, .m8-ef-logout-module button, .m8-ef-logout-module a):hover{
  background: transparent !important;
  filter: none !important;
  opacity: .85;
}

.m8-ef-toolbar :is(.m8-ef-iconbtn, .m8-ef-theme-toggle, .m8-ef-logout-module button, .m8-ef-logout-module a):active{
  transform: none;
  opacity: .75;
}

.m8-ef-toolbar .m8-ef-icon{
  width: 18px;
  height: 18px;
  min-width: 18px;
}


/* Toolbar: Push-Badge absolut positionieren, damit das Glocken-Icon nicht schrumpft */
.m8-ef-toolbar .m8-ef-notifications{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.m8-ef-toolbar .m8-ef-notifications .m8-ef-icon{
  flex: 0 0 18px;
}
.m8-ef-toolbar .m8-ef-notifications .m8-ef-badge{
  position: absolute;
  top: -3px;
  right: -3px;
  margin: 0 !important;
}

/* Toolbar: Hauptfeed-Button als kompaktes Icon (Feed) – ohne Pfeil */
.m8-ef-toolbar .m8-ef-backfeed{
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 999px;
  text-decoration: none;
  line-height: 1;
}
.m8-ef-toolbar .m8-ef-backfeed:hover{
  opacity: .85;
}

/* Falls alte Templates noch den Pfeil ausgeben: hart ausblenden */
.m8-ef-backfeed__arrow{
  display: none !important;
}
.m8-ef-backfeed__feed{
  display: inline-block;
  width: 1.05rem;
  height: 1.05rem;
  background-color: currentColor;
  -webkit-mask: url('icons/feed.svg') no-repeat center / contain;
  mask: url('icons/feed.svg') no-repeat center / contain;
  opacity: .9;
}
.m8-ef-theme-toggle__icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width: 100%;
  height: 100%;
}

.m8-ef-theme-toggle__icon svg{
  display:block;
  width: 18px;
  height: 18px;
}

/* Avatar: immer wirklich rund (auch wenn irgendwo width/height ueberschrieben werden) */
.m8-ef-avatar,
.m8-ef-avatar-link{
  aspect-ratio: 1 / 1;
}

.m8-ef-avatar--lg{
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
}

/* ========================================================================
   Patch 1.1.67 – Kommentar-Reply Toggle wie Post-Kommentare + Icon + Slider-Fill
   - Kommentar-Toggle (Post) als Icon-Button (Sprechblase) + optionaler Zähler-Badge
   - Reply auf Kommentar klappt wie der Post-Kommentar-Button (erneuter Klick = zuklappen)
   - ThemeToggle Icon im Darkmode sicher weiss
   - Slider: Slide/Anchor/Img füllen Viewport wirklich voll (cover)
   ======================================================================== */

/* ThemeToggle: Icon im Darkmode weiss (currentColor) */
html[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] .m8-ef-theme-toggle,
body[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] .m8-ef-theme-toggle,
body.m8-ef-page[data-m8-ef-theme="dark"] .m8-ef-theme-toggle{
  color: rgba(255,255,255,.92) !important;
}

/* Kommentar-Button (Post): Icon + kleiner Count-Badge */
.m8-ef-comment-toggle{ position: relative; }
.m8-ef-comment-toggle .m8-ef-count{
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 16px;
  background: var(--m8-bg);
  border: 1px solid var(--m8-border);
  color: var(--m8-text);
}

/* ========================================================================
   Patch 1.1.68 – UI-Feinschliff
   - Replybar klickbar (einklappen) ist JS-seitig, hier nur optische Feinschliffe
   - Like: ohne Kontur + Count als Badge rechts oben
   - Delete/Edit: ohne Kontur
   - Emoji-Panel: Breite passt sich Inhalt an
   - .m8-ef-post-actions: wieder flex (nebeneinander)
   - Toolbar: alle Elemente rechtsbündig
   - .m8-comments: linke Kontur + left-padding entfernen
   ======================================================================== */

/* Toolbar rechtsbündig */
.m8-ef-toolbar{
  justify-content: flex-end;
}

/* Post-Actions (Templates nutzen .m8-ef-post-actions) */
.m8-post-actions,
.m8-ef-post-actions{
  display: flex;
  align-items: center;
  gap: .35rem;
}
.m8-post-actions .m8-like-form,
.m8-ef-post-actions .m8-like-form{ margin: 0; }

/* Kommentare-Aufklapper (Pfeil rechts in den Actions) */
.m8-ef-comments-more-toggle{
  margin-left: auto; /* ganz rechts */
  /* Pfeil muss klar sichtbar sein: Light = schwarz, Dark = weiss */
  color: #000;
}
.m8-ef-comments-more-toggle svg{ display:block; width: 18px; height: 18px; }
html[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] .m8-ef-comments-more-toggle,
body[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] .m8-ef-comments-more-toggle,
body.m8-ef-page[data-m8-ef-theme="dark"] .m8-ef-comments-more-toggle{
  color: #fff;
}
.m8-ef-comments-more-toggle .m8-ef-icon--chev{
  transition: transform .2s ease;
}
.m8-ef-comments-more-toggle[aria-expanded="true"] .m8-ef-icon--chev{
  transform: rotate(180deg);
}

/* Upload-Thumbs (Auswahl vor dem Posten): Thumbnails + kleines X oben rechts */
.m8-ef-upload{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.m8-ef-upload__input{ display: none; }

.m8-ef-upload__thumbs{
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  max-width: 100%;
  padding: 2px 0;
}
.m8-ef-upload__thumb{
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 10px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid var(--m8-border);
  background: var(--m8-bg-soft);
}
.m8-ef-upload__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.m8-ef-upload__thumb video{ width: 100%; height: 100%; object-fit: cover; display: block; }
.m8-ef-upload__badge{ position:absolute; left: 3px; bottom: 3px; padding: 1px 4px; font-size: 9px; line-height: 1; border-radius: 6px; background: rgba(0,0,0,.65); color: #fff; letter-spacing: .04em; }
.m8-ef-upload__thumb-remove{
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0,0,0,.65);
  color: #fff;
  font-size: 14px;
  line-height: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.m8-ef-upload__thumb-remove:hover{
  background: rgba(0,0,0,.85);
}

/* Like: Icon-only, kein Border/Background, Count als Badge */
.m8-like-btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  border-radius: 999px;
  line-height: 1;
}
.m8-like-btn:hover{ background: var(--m8-bg-soft) !important; }
.m8-like-btn .m8-ef-like-icon{
  display: inline-block;
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url('icons/like-heart.svg') no-repeat center / contain;
  mask: url('icons/like-heart.svg') no-repeat center / contain;
  opacity: .55;
}
.m8-like-btn.is-liked .m8-ef-like-icon{ opacity: 1; }
.m8-like-btn .m8-ef-count{
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 16px;
  background: var(--m8-bg);
  border: 1px solid var(--m8-border);
  color: var(--m8-text);
}

/* Delete/Edit Buttons: keine Kontur */
.m8-post-delete-btn,
.m8-post-edit > summary{
  width: 32px;
  height: 32px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 999px;
}
.m8-post-delete-btn:hover,
.m8-post-edit > summary:hover{ background: var(--m8-bg-soft) !important; }

/* Emoji-Panel: Breite am Inhalt ausrichten */
.m8-ef-emoji-panel.is-open{
  width: max-content;
}

/* Kommentare: linke Kontur + Padding entfernen */
.m8-comments{
  margin-left: 0;
  padding-left: 0;
  border-left: 0;
}

/* ========================================================================
   Patch 1.1.69 – UI Korrekturen
   - Posten-Button im Hauptformular rechts ausrichten
   - Primary Buttons im Darkmode mit Textfarbe #000 (Posten/Beitreten/Verlassen)
   - Gruppenliste: keine Bullets + kein left-padding
   - Toolbar oben fixiert (sticky)
   - Kommentare: linke Kontur + left-padding sicher entfernen
   - Profil: Cover/Avatar/Edit wieder als Einheit + Empty-Cover sichtbar
   - Profil-Avatar Groesse: nur ca. 20% groesser als Standardavatar
   ======================================================================== */

/* Postformular: Upload links, Posten rechts */
.m8-ef-post-actions{
  display: flex;
  align-items: center;
  gap: .35rem;
}
.m8-ef-post-actions .m8-ef-upload{
  flex: 1 1 auto;
}
.m8-ef-post-actions > .m8-btn--primary{
  margin-left: auto;
}

/* Primary Buttons im Darkmode: Textfarbe schwarz (Accent ist hell) */
html[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] .m8-social .m8-btn--primary,
body[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] .m8-social .m8-btn--primary,
body.m8-ef-page[data-m8-ef-theme="dark"] .m8-social .m8-btn--primary{
  color: #000 !important;
}

/* Gruppenliste (Uebersicht): keine Listenpunkte/Einrueckung */
.m8-groups-list{
  list-style: none;
  margin: 0;
  padding-left: 0 !important;
}
.m8-groups-list > li{
  list-style: none;
}

/* Toolbar oben fixiert (sticky) */
.m8-ef-toolbar{
  position: sticky;
  top: 0;
  z-index: 10000;
  padding: .35rem .5rem;
  background: var(--m8-bg);
  border-bottom: 1px solid var(--m8-border);
}

/* Kommentare: linke Kontur + left-padding hart entfernen (auch wenn ein anderes Theme dagegen arbeitet) */
body[data-m8-ef-scope="easyforum"] .m8-comments,
body.m8-ef-page .m8-comments{
  margin-left: 0 !important;
  padding-left: 0 !important;
  border-left: 0 !important;
}

/* Profil: Kopfbereich als Einheit (Cover + Avatar + Edit) */
.m8-ef-profile-head{
  position: relative;
}

/* Empty Cover sichtbar abzeichnen */
.m8-ef-profile-head__cover--empty{
  width: 100%;
  height: 240px;
  background: repeating-linear-gradient(
    45deg,
    rgba(0,0,0,.03),
    rgba(0,0,0,.03) 10px,
    rgba(0,0,0,.06) 10px,
    rgba(0,0,0,.06) 20px
  );
  border-bottom: 1px dashed var(--m8-border);
}
html[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] .m8-ef-profile-head__cover--empty,
body[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] .m8-ef-profile-head__cover--empty{
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,.04),
    rgba(255,255,255,.04) 10px,
    rgba(255,255,255,.07) 10px,
    rgba(255,255,255,.07) 20px
  );
}

/* Titelbild-Upload-Button oben rechts im Titelbild (erzwingen) */
.m8-ef-profile-head .m8-ef-profile-head__edit{
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  bottom: auto !important;
  left: auto !important;
  margin: 0 !important;
  transform: none !important;
  z-index: 6;
}

/* Profil: Upload-Forms + Buttons (Avatar/Titelbild) */
.m8-ef-profile-upload{
  margin: 0;
}
.m8-ef-profile-upload__input{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
}

.m8-ef-profile-uploadBtn{
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.8);
  background: rgba(0,0,0,.68);
  color: #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,.25);
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.m8-ef-profile-uploadBtn:hover{
  filter: brightness(1.05);
}
.m8-ef-profile-uploadBtn:active{
  transform: none;
}

html[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] .m8-ef-profile-uploadBtn,
body[data-m8-ef-scope="easyforum"][data-m8-ef-theme="dark"] .m8-ef-profile-uploadBtn{
  border-color: rgba(255,255,255,.38);
}

/* Avatar-Edit oben rechts am Avatar */
.m8-ef-profile-head__avatar{
  position: relative;
}
.m8-ef-profile-avatar__edit{
  position: absolute;
  top: -5px;
  right: -5px;
  z-index: 7;
  width: 30px;
  height: 30px;
  padding: 0;
}
.m8-ef-profile-avatar__edit .m8-ef-icon{
  width: 14px;
  height: 14px;
}
/* Profildaten-Edit (Zahnrad) rechts neben Profilinfos */
.m8-ef-profile-head__meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .25rem;
  min-width: 0;
  flex: 1;
}
.m8-ef-profile-head__metaText{
  min-width: 0;
}
.m8-ef-profile-settings{
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--m8-border);
  background: var(--m8-bg-soft);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.m8-ef-profile-settings:hover{
  filter: brightness(0.98);
}
.m8-ef-profile-settings:active{
  transform: none;
}
.m8-ef-profile-settings__icon{
  font-size: 16px;
  line-height: 1;
}

/* Zahnrad in Profil-Info-Block rechts oben */
.m8-ef-profile-info .m8-ef-profile-settings{
  position: absolute;
  top: 10px;
  right: 5px;
  z-index: 8;
}

/* Avatar + Name direkt am Cover (zusammen) */
.m8-ef-profile-head__content{
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  margin-top: -24px;
  background: var(--m8-bg);
  border-top: 1px solid var(--m8-border);
  position: relative;
  z-index: 3;
}

/* Profil-Avatar: nur ~20% groesser als Standard (40px -> 48px) */
.m8-ef-avatar--lg{
  width: 48px !important;
  height: 48px !important;
  flex: 0 0 48px !important;
}

/* -------------------------------------------------------------------------- */
/* Profildaten bearbeiten: Stammdaten wieder 2-spaltig (responsive)            */
/* -------------------------------------------------------------------------- */

/*
  Hinweis: Das Grid (.m8-ef-form-grid) wird aktuell nur im Profil-Edit-Template genutzt.
  Daher ist die Regel bewusst eng und beeinflusst keine anderen Formulare.
*/

[data-m8-ef-scope="easyforum"] .m8-social-profile .m8-ef-form-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  margin: 0 0 12px 0;
}

@media (max-width: 900px){
  [data-m8-ef-scope="easyforum"] .m8-social-profile .m8-ef-form-grid{
    grid-template-columns: 1fr;
  }
}

[data-m8-ef-scope="easyforum"] .m8-social-profile .m8-ef-form-grid > p{
  margin: 0;
}

[data-m8-ef-scope="easyforum"] .m8-social-profile .m8-ef-form-grid label{
  display: block;
}

[data-m8-ef-scope="easyforum"] .m8-social-profile .m8-ef-form-grid input,
[data-m8-ef-scope="easyforum"] .m8-social-profile .m8-ef-form-grid select,
[data-m8-ef-scope="easyforum"] .m8-social-profile .m8-ef-form-grid textarea{
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Kompaktere Kommentar-Kacheln (weniger vertikaler Platz) */
.m8-comments .m8-comment {
  /* mind. 5px Abstand nach unten (pro Kommentar) */
  margin: 0px 0 5px 0 !important;
  padding: 0px 6px !important;
  padding-top: 5px !important;
}
.m8-comments .m8-comment-head {
  margin-bottom: 1px !important;
  line-height: 1.1;
}
.m8-comments .m8-comment-body {
  line-height: 1.25;
}

/* -------------------------------------------------------------------------- */
/* M8 Simple Member Chat (Vollchat-Seite im Forum)                             */
/* -------------------------------------------------------------------------- */

/* Wenn der Vollchat (page-mode) im EasyForum ausgegeben wird:
   - keine Rundungen / Kontur an der Chat-Windows-Box
   - Artikel-Wrapper streckt auf volle Viewport-Höhe, damit der Chat die Höhe nutzen kann */

[data-m8-ef-scope="easyforum"] .m8-chat-dock[data-mode="page"] .m8-chat-windows{
  border-radius: 0 !important;
  border: none !important;
  outline: none !important;
}

/* Moderne Browser: das konkrete Artikel-Element, das den Vollchat enthält */
[data-m8-ef-scope="easyforum"] .mod_article:has(.m8-chat-dock[data-mode="page"]){
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
[data-m8-ef-scope="easyforum"] .mod_article:has(.m8-chat-dock[data-mode="page"]) .m8-chat-dock[data-mode="page"]{
  flex: 1 1 auto;
  min-height: 0;
}

/* Damit der Chat wirklich die Resthoehe nutzt, muss das umgebende CE/Modul ebenfalls flexen */
[data-m8-ef-scope="easyforum"] .mod_article:has(.m8-chat-dock[data-mode="page"]) > .ce_module:has(.m8-chat-dock[data-mode="page"]){
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
[data-m8-ef-scope="easyforum"] .mod_article:has(.m8-chat-dock[data-mode="page"]) > .ce_module:has(.m8-chat-dock[data-mode="page"]) .mod_m8_chat{
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
[data-m8-ef-scope="easyforum"] .mod_article:has(.m8-chat-dock[data-mode="page"]) > .ce_module:has(.m8-chat-dock[data-mode="page"]) .m8-chat-dock[data-mode="page"]{
  flex: 1 1 auto;
  min-height: 0;
}

/* Fallback (ohne :has): JS setzt body.m8-ef-has-fullchat-page */
body.m8-ef-has-fullchat-page #main .mod_article{
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
body.m8-ef-has-fullchat-page #main .mod_article .m8-chat-dock[data-mode="page"]{
  flex: 1 1 auto;
  min-height: 0;
}

/* Präzise Fallback-Variante: JS markiert exakt den Artikel + das zugehörige Modul-Content-Element */
.m8-ef-fullchat-article{
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.m8-ef-fullchat-ce{
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.m8-ef-fullchat-ce .mod_m8_chat,
.m8-ef-fullchat-ce .m8-chat-dock[data-mode="page"]{
  flex: 1 1 auto;
  min-height: 0;
}

/* -------------------------------------------------------------------------- */
/* M8 Simple Member Chat – Partner-Bubbles: Text immer dunkel (chat-partner-text-dark) */
/* -------------------------------------------------------------------------- */
/*
  Problem: In Darkmode erbt der Text in den Chatpartner-Bubbles teilweise eine helle Schriftfarbe.
  Ziel: Partner-Nachrichten (nicht is-me) immer mit dunkler Schrift.
*/
[data-m8-ef-scope="easyforum"] .m8-chat-msg:not(.is-me) .m8-chat-bubble{
  color:#000 !important;
}
[data-m8-ef-scope="easyforum"] .m8-chat-msg:not(.is-me) .m8-chat-bubble .m8-chat-text,
[data-m8-ef-scope="easyforum"] .m8-chat-msg:not(.is-me) .m8-chat-bubble .m8-chat-text *{
  color:#000 !important;
}
[data-m8-ef-scope="easyforum"] .m8-chat-msg:not(.is-me) .m8-chat-bubble a,
[data-m8-ef-scope="easyforum"] .m8-chat-msg:not(.is-me) .m8-chat-bubble a *{
  color:#000 !important;
}

/* Vollchat: Leerseite/Empty-State Text immer dunkel (Light/Dark) */
[data-m8-ef-scope="easyforum"] .m8-chat-pageEmpty,
[data-m8-ef-scope="easyforum"] .m8-chat-pageEmpty *{
  color:#000 !important;
}

/* Loggedout-Meldung: zentriert + Padding */
.m8-chat.m8-chat--loggedout,
.m8-chat--loggedout,
.m8-chat--loggedOut,
.m8-chat--logged-out{
  text-align: center;
  padding: 15px;
}
/* Loggedout-Meldung NICHT auf Forum-Startseite, Registrieren und Passwort-vergessen */
body.m8-ef-authpage .m8-chat-pageEmpty,
body.m8-ef-authpage .m8-chat.m8-chat--loggedout,
body.m8-ef-authpage .m8-chat .m8-chat--loggedout,
body.m8-ef-authpage .m8-chat--loggedout,
body.m8-ef-authpage .m8-chat.m8-chat--loggedOut,
body.m8-ef-authpage .m8-chat .m8-chat--loggedOut,
body.m8-ef-authpage .m8-chat--loggedOut,
body.m8-ef-authpage .m8-chat.m8-chat--logged-out,
body.m8-ef-authpage .m8-chat .m8-chat--logged-out,
body.m8-ef-authpage .m8-chat--logged-out{
  display: none !important;
}

/* Chats-Seite: rechte Spalte ausblenden (links bleibt sichtbar) */
body.m8-ef-chats #right{
  display: none !important;
}
body.m8-ef-chats.m8-ef-sidebar-layout #container{
  display: grid !important;
  grid-template-columns: 260px minmax(0, 1fr) !important;
  grid-template-areas: "left main" !important;
}
body.m8-ef-chats.m8-ef-sidebar-layout #left{ grid-area: left; }
body.m8-ef-chats.m8-ef-sidebar-layout #main{ grid-area: main; }
/* Registrieren + Passwort-vergessen: kein linkes/rechtes Menü + zentriertes Formular (gleiches Layout) */
body.m8-ef-register #left,
body.m8-ef-register #right,
body.m8-ef-lostpassword #left,
body.m8-ef-lostpassword #right{
  display: none !important;
}

body.m8-ef-register.m8-ef-sidebar-layout #container,
body.m8-ef-lostpassword.m8-ef-sidebar-layout #container{
  display: grid !important;
  grid-template-columns: 1fr !important;
}

body.m8-ef-register.m8-ef-sidebar-layout #main,
body.m8-ef-lostpassword.m8-ef-sidebar-layout #main{
  grid-column: 1 / -1 !important;
}

/* Passwort-vergessen (und Register-Formulare): Breite/Spacing wie m8-ef-container */
body.m8-ef-lostpassword .mod_lostPassword,
body.m8-ef-lostpassword .mod_lost_password{
  width: 100%;
  max-width: 850px !important;
  margin-left: auto;
  margin-right: auto;
  padding-top: 25px;
}

/* Core-Formulare auf Auth-Seiten: Inputs/Buttons volle Breite + untereinander */
body.m8-ef-authpage :is(.mod_login, .mod_lostPassword, .mod_lost_password) form p,
body.m8-ef-authpage :is(.mod_login, .mod_lostPassword, .mod_lost_password) form .widget{
  display: block;
  width: 100%;
}

body.m8-ef-authpage :is(.mod_login, .mod_lostPassword, .mod_lost_password) input[type="text"],
body.m8-ef-authpage :is(.mod_login, .mod_lostPassword, .mod_lost_password) input[type="email"],
body.m8-ef-authpage :is(.mod_login, .mod_lostPassword, .mod_lost_password) input[type="password"]{
  width: 100% !important;
  max-width: 460px;
  border: 1px solid var(--m8-border);
  border-radius: 10px;
  padding: .45rem .7rem;
  background: var(--m8-bg);
  color: inherit;
  box-sizing: border-box;
}

body.m8-ef-authpage :is(.mod_login, .mod_lostPassword, .mod_lost_password) button,
body.m8-ef-authpage :is(.mod_login, .mod_lostPassword, .mod_lost_password) input[type="submit"],
body.m8-ef-authpage :is(.mod_login, .mod_lostPassword, .mod_lost_password) .submit{
  display: block;
  width: 100% !important;
  max-width: 460px;
}

/* Forumstartseite: Login-Box (Welcome) -> Inputs + Button volle Breite */
body.m8-ef-authpage .m8-social-welcome .m8-welcome-login :is(input, button, .submit){
  width: 100% !important;
  max-width: 460px;
  display: block;
}

body.m8-ef-authpage .m8-social-welcome .m8-welcome-login p,
body.m8-ef-authpage .m8-social-welcome .m8-welcome-login .widget{
  width: 100%;
  display: block;
}

/* -------------------------------------------------------------------------- */
/* Chats-Seite: Toolbar oben fix + Body-Scroll aus (nur Vollchat-Seite)         */
/* -------------------------------------------------------------------------- */
/* Fallback (empfohlen): JS setzt body.m8-ef-has-fullchat-page auf der Chats-Seite */
body.m8-ef-has-fullchat-page{
  overflow: hidden;
}
body.m8-ef-has-fullchat-page #main .module-m8-easyforum-toolbar,
body.m8-ef-has-fullchat-page #main .mod_m8_easyforum_toolbar{
  position: sticky;
  top: 0;
  z-index: 2000;
  background: var(--m8-bg);
}

/* Progressive Enhancement: auch ohne JS-Flag, wenn :has() verfügbar ist */
@supports(selector(:has(*))){
  [data-m8-ef-scope="easyforum"] body:has(.m8-chat-dock[data-mode="page"]){
    overflow: hidden;
  }
  [data-m8-ef-scope="easyforum"] body:has(.m8-chat-dock[data-mode="page"]) #main .module-m8-easyforum-toolbar,
  [data-m8-ef-scope="easyforum"] body:has(.m8-chat-dock[data-mode="page"]) #main .mod_m8_easyforum_toolbar{
    position: sticky;
    top: 0;
    z-index: 2000;
    background: var(--m8-bg);
  }
}

/* -------------------------------------------------------------------------- */
/* M8 Operator CSS Tweaks (Layout/Glow/Emoji/Sidebar)                          */
/* -------------------------------------------------------------------------- */

.m8-ef-layout-flex{
  background-color:#111;
  position: relative;
}

.m8-ef-layout-flex main > .inside{
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

.m8-ef-layout-flex main::before{
  content:"";
  position:fixed;
  left:0;
  bottom:0;
  z-index:0;
  width:30vw;
  height:30vw;
  transform:translate(-30%, 10%);

  background: linear-gradient(
    45deg,
    #2900e2 0%,
    #4f00e0 20%,
    #7c00db 40%,
    #a23ac4 70%,
    #cb60b3 100%
  );

  opacity: 0.25;
  mix-blend-mode: color-dodge;

  filter: blur(80px);
  pointer-events:none;

  animation: gradientFloat 30s ease-in-out infinite alternate;
  will-change: transform;
}

.m8-ef-layout-flex main::after{
  content:"";
  position:fixed;
  top:0;
  right:0;
  z-index:0;
  width:30vw;
  height:30vw;
  transform:translate(30%, -10%);

  background: linear-gradient(
    120deg,
    #24c9c9 0%,
    #2a9fe8 30%,
    #4265e8 60%,
    #6a4be3 100%
  );

  opacity: 0.15;
  mix-blend-mode: color-dodge;

  filter: blur(80px);
  pointer-events:none;

  animation: gradientFloat 25s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes gradientFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  25% {
    transform: translate3d(10vw, -5vh, 0) scale(1.05);
  }
  50% {
    transform: translate3d(5vw, 5vh, 0) scale(0.98);
  }
  75% {
    transform: translate3d(-5vw, 0, 0) scale(1.03);
  }
  100% {
    transform: translate3d(0, -3vh, 0) scale(1);
  }
}

[data-m8-ef-scope="easyforum"] aside{
  box-shadow: rgba(0, 0, 0, 0.3) 0px 0px 32px;
}

.m8-social-feed .m8-ef-emoji-toggle{
  border:0 !important;
  background-color:transparent !important;
  left:5px;
}

.m8-social-feed .m8-ef-textarea--emoji{
  padding-left:15px;
  padding-right:15px;
}

/* Dark-only: Theme-Umschalter komplett ausblenden (falls irgendwo noch im Markup) */
.m8-ef-theme-toggle{
  display:none !important;
}

/* Gruppen-Feed: Thema nach Gruppenname */
.m8-group-header__topic{
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-left: .35rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  font-size: 12px;
  line-height: 1;
  opacity: .9;
}


/* Operator Custom Gradient Cards + Buttons (2026-01-29) */
.m8-groups-list .m8-group, article.m8-post, div.m8-ef-profile-tile, div.m8-group-create, div.m8-ef-profile-bio, div.m8-ef-invites-pane, div.m8-card.m8-welcome-right, div.m8-card.m8-welcome-left, div.m8-ef-push-card{
  border: 1px solid transparent;
  background:
    linear-gradient(#10141a, #10141a) padding-box,
    linear-gradient(120deg,
      rgba(36, 171, 201, 0.5),    /* #24abc9 mit 50% Opacity */
      rgba(106, 75, 227, 0.5),    /* #6a4be3 mit 50% Opacity */
      rgba(36, 171, 201, 0.3)     /* #24abc96e angepasst */
    ) border-box;
  background-size: 200% 100%;
  transition: background-position 0.2s ease-in-out, box-shadow 0.3s ease;

  box-shadow: rgba(0, 0, 0, 0.25) 0px 14px 28px, rgba(0, 0, 0, 0.22) 0px 10px 10px;
}

.m8-groups-list .m8-group:hover, article.m8-post:hover, div.m8-ef-profile-tile:hover, div.m8-ef-profile-bio:hover, div.m8-ef-invites-pane:hover, div.m8-card.m8-welcome-right:hover, div.m8-card.m8-welcome-left:hover, div.m8-ef-push-card:hover{
  background-position: 100% 0;
}


.m8-ef-page article.m8-post{
  margin-bottom:15px;
}

div.m8-ef-toolbar + .m8-ef-profile-top{
  display:none;
}

div.m8-social{
  padding-left:20px;
  padding-right:20px;
  position: relative;
  padding-top:30px;
}

.m8-social > .m8-ef-toolbar{
  left:250px;
  width:inherit;
  position: fixed;
  right:250px;
  flex-grow:1;
}


body.m8-ef-has-fullchat-page #right{
  display:none !important;
}


body.m8-ef-page div.m8-social .mod_login button, body.m8-ef-page div.m8-social .m8-btn.m8-btn--primary,
body.m8-ef-page .m8-social-form.m8-social-form-comment .m8-btn{
  border-radius: 999px;
  border: 1px solid #24abc9;
  background: #10141a;
  color: #f5f7ff !important;
  padding: 0.4rem 1.2rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  font-size:14px !important;
}


body.m8-ef-page div.m8-social .mod_login button:hover, body.m8-ef-page div.m8-social .m8-btn.m8-btn--primary:hover,
body.m8-ef-page .m8-social-form.m8-social-form-comment .m8-btn:hover{
  background: radial-gradient(circle at 0% 0%, #24abc930 0%, #10141a 55%);
  border-color: #6a4be3;
}



/* Sonstiger button Style */

.m8-ef-page .m8-form__actions .m8-btn:not(.m8-btn--primary), .m8-ef-page .m8-social .m8-btn--icon, .m8-ef-page div.m8-invite-row__facts + p .m8-btn, .m8-ef-page div .m8-btn--ghost{
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #141924;
  color: #f5f7ff !important;
  padding: 0.4rem 1.2rem;
  font-size: 0.92rem;
  transition: all 0.25s ease;
  cursor: pointer;
  font-size:14px !important;
}

.m8-ef-page .m8-form__actions .m8-btn:not(.m8-btn--primary):hover, .m8-ef-page .m8-social .m8-btn--icon:hover, .m8-ef-page div.m8-invite-row__facts + p .m8-btn:hover, .m8-ef-page div .m8-btn--ghost:hover{
  border-color: rgba(106, 75, 227, 1);
  background: #181e2a;
  color: #ffffff;
  box-shadow: 0 5px 15px rgba(106, 75, 227, 0.2);
}

.m8-ef-push-user{ font-weight:600; text-decoration:none; }
.m8-ef-push-user:hover{ text-decoration:underline; }


/* ===== PT20 Pushes/Layout Fixes ===== */
/* Container im Forum immer volle Breite */
.m8-ef-page .container.m8-ef-container{
  max-width: 100% !important;
}

/* Kommentar-Kopf in Seitenansicht linksbündig */
.m8-ef-page div.m8-comment-head{
  justify-content: flex-start !important;
  align-items: center !important;
  margin-bottom: 5px !important;
}

/* Push-Spalten: kompakter + leere Spalten sichtbar */
.m8-social-notifications .m8-ef-pushes-grid{
  gap: 0.7rem;
}
.m8-social-notifications .m8-ef-push-list{
  gap: 0.35rem;
}
.m8-social-notifications .m8-ef-push-card{
  padding: 0.45rem 0.55rem;
}
.m8-social-notifications .m8-ef-push-empty{
  padding: 0.45rem 0.55rem;
  opacity: 0.75;
  font-size: 0.9rem;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
}

/* Spalten-Header leicht markieren (Gradient-Unterstrich) */
.m8-social-notifications .m8-ef-push-col__title{
  position: relative;
  padding-bottom: 0.35rem;
}
.m8-social-notifications .m8-ef-push-col__title:after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 99px;
  opacity: 0.85;
  background: linear-gradient(90deg,#6b7280,#9ca3af);
}

/* zusätzliche, präventive Gradients */
.m8-social-notifications .m8-ef-push-col--follow .m8-ef-push-card{
  border-image: linear-gradient(90deg, #22c55e, #06b6d4) 1;
}
.m8-social-notifications .m8-ef-push-col--follow .m8-ef-push-col__title:after{
  background: linear-gradient(90deg, #22c55e, #06b6d4);
}

.m8-social-notifications .m8-ef-push-col--mention .m8-ef-push-card{
  border-image: linear-gradient(90deg, #a855f7, #ec4899) 1;
}
.m8-social-notifications .m8-ef-push-col--mention .m8-ef-push-col__title:after{
  background: linear-gradient(90deg, #a855f7, #ec4899);
}

.m8-social-notifications .m8-ef-push-col--invite_accepted .m8-ef-push-card{
  border-image: linear-gradient(90deg, #10b981, #84cc16) 1;
}
.m8-social-notifications .m8-ef-push-col--invite_accepted .m8-ef-push-col__title:after{
  background: linear-gradient(90deg, #10b981, #84cc16);
}

/* bestehende Typen: Header-Gradients angleichen */
.m8-social-notifications .m8-ef-push-col--like .m8-ef-push-col__title:after{
  background: linear-gradient(90deg, #ff4d4d, #ffb84d);
}
.m8-social-notifications .m8-ef-push-col--comment .m8-ef-push-col__title:after{
  background: linear-gradient(90deg, #00c6ff, #0072ff);
}
.m8-social-notifications .m8-ef-push-col--invite .m8-ef-push-col__title:after{
  background: linear-gradient(90deg, #8b5cf6, #22c55e);
}
.m8-social-notifications .m8-ef-push-col--post .m8-ef-push-col__title:after{
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}
.m8-social-notifications .m8-ef-push-col--system .m8-ef-push-col__title:after{
  background: linear-gradient(90deg, #6b7280, #9ca3af);
}
