/* Fuss der Seitenleiste: eine ruhige Zeile (Nachrichten, Zahnrad) ueber den
   Rechtstexten. Sound, Musik, Katze, Feedback, Unterstuetzen, Spiel beenden
   (Steam) und Abmelden liegen im Zahnrad-Menue (app/side-menu.js), das am
   body haengt und neben dem Zahnrad aufgeht. Codex & Regeln steht als
   normaler Eintrag unter "Lernen" in der Liste. */

.sideFootRow {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(216, 177, 90, .10);
}
.sideFootBtn {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--mp-ink-dim);
  font: inherit;
  font-size: 12px;
  letter-spacing: .3px;
  text-align: left;
  cursor: var(--mp-cur-pointer);
  transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}
#navMessages {
  flex: 1 1 auto;
  min-width: 0;
}
.sideFootGear {
  width: 36px;
  grid-template-columns: 18px;
  justify-items: center;
  padding: 0;
}
.sideFootBtn .navIcon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: var(--mp-gold-2);
  transition: color .16s ease;
}
.sideFootBtn .navIcon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sideFootText {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
header.sideNav .sideFootBtn:hover,
header.sideNav .sideFootBtn:focus-visible {
  color: var(--mp-gold-1, #d8b15a);
  border-color: transparent;
  background: transparent;
  outline: none;
}
header.sideNav .sideFootBtn:focus-visible {
  outline: 1px solid rgba(216, 177, 90, .5);
  outline-offset: -1px;
}
/* Nachrichten-Seite offen: derselbe Teal-Ton wie der aktive Listeneintrag. */
header.sideNav .sideFootBtn.is-current,
header.sideNav .sideFootBtn.is-current:hover {
  color: var(--mp-bone, #e8dec5);
  border-color: rgba(77, 208, 196, .28);
  background: rgba(77, 208, 196, .06);
}
.sideFootBtn.is-current .navIcon { color: var(--mp-teal-2, #4dd0c4); }

/* Das Zahnrad dreht sich auf, solange das Menue offen ist. */
.sideFootGear .navIcon svg {
  transition: rotate .36s cubic-bezier(.22, .8, .24, 1);
}
.sideFootGear[aria-expanded="true"] { color: var(--mp-gold-1, #d8b15a); }
.sideFootGear[aria-expanded="true"] .navIcon svg { rotate: 90deg; }

/* Ungelesen-Zaehler: offen am Zeilenende, in der Icon-Leiste an der Ecke. */
.sideFootBadge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: #e0584f;
  color: #fff;
  font-family: var(--mp-mono, monospace);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}
.sideFootBadge[hidden] { display: none; }

/* Icon-Leiste: zwei Kacheln untereinander, Linie wie die Trennlinie der Liste. */
body.side-nav-collapsed .sideFootRow {
  flex-direction: column;
  gap: 2px;
  width: 38px;
  margin: 2px auto 0;
  padding-top: 8px;
  border-top: 0;
}
body.side-nav-collapsed .sideFootRow::before {
  content: "";
  width: 26px;
  height: 1px;
  margin-bottom: 6px;
  background: linear-gradient(90deg, transparent, rgba(216, 177, 90, .24), transparent);
}
body.side-nav-collapsed .sideFootBtn {
  width: 38px;
  min-height: 38px;
  grid-template-columns: 18px;
  justify-content: center;
  justify-items: center;
  padding: 0;
}
body.side-nav-collapsed .sideFootText { display: none; }
body.side-nav-collapsed .sideFootBadge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 7px;
  font-size: 8.5px;
  box-shadow: 0 0 0 2px var(--bg, #0b0e14);
}

/* ---- Zahnrad-Menue ---- */
.sideMenu {
  position: fixed;
  z-index: 1200;
  width: 232px;
  padding: 6px;
  display: grid;
  gap: 2px;
  border: 1px solid rgba(216, 177, 90, .28);
  background: rgba(11, 13, 18, .97);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 0, 0, .4);
  opacity: 0;
  scale: .96;
  translate: 0 4px;
  transition: opacity .14s ease-out, scale .2s cubic-bezier(.22, .8, .24, 1), translate .2s cubic-bezier(.22, .8, .24, 1);
}
.sideMenu[hidden] { display: none; }
.sideMenu.is-open {
  opacity: 1;
  scale: 1;
  translate: 0 0;
}
.sideMenuRow {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--mp-ink, #aea58c);
  font: inherit;
  font-size: 12.5px;
  letter-spacing: .3px;
  text-align: left;
  cursor: var(--mp-cur-pointer);
  transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}
.sideMenuRow[hidden] { display: none; }
.sideMenuRow .navIcon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: var(--mp-gold-2);
  transition: color .16s ease;
}
.sideMenuRow .navIcon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sideMenuText {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sideMenu .sideMenuRow:hover,
.sideMenu .sideMenuRow:focus-visible {
  color: var(--mp-bone, #e8dec5);
  border-color: rgba(216, 177, 90, .2);
  background: rgba(216, 177, 90, .06);
  outline: none;
}
.sideMenuSep {
  height: 1px;
  margin: 4px 8px;
  background: linear-gradient(90deg, transparent, rgba(216, 177, 90, .24), transparent);
}
.sideMenu .sideMenuDanger:hover,
.sideMenu .sideMenuDanger:focus-visible {
  color: #e0786f;
  border-color: rgba(200, 70, 70, .45);
  background: rgba(40, 14, 14, .4);
}
.sideMenuDanger:hover .navIcon,
.sideMenuDanger:focus-visible .navIcon { color: #e0786f; }

/* Schalter: an = Teal mit Knopf rechts, aus = dunkel mit Knopf links. */
.sideSwitch {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(77, 208, 196, .5);
  background: rgba(77, 208, 196, .16);
  transition: background-color .18s ease, border-color .18s ease;
}
.sideSwitch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 13px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mp-teal-2, #4dd0c4);
  box-shadow: 0 0 8px rgba(77, 208, 196, .5);
  transition: left .2s cubic-bezier(.22, .8, .24, 1), background-color .18s ease, box-shadow .18s ease;
}
.sideMenuRow.is-muted .sideSwitch {
  border-color: rgba(216, 177, 90, .18);
  background: rgba(255, 255, 255, .04);
}
.sideMenuRow.is-muted .sideSwitch::after {
  left: 2px;
  background: var(--mp-ink-faint, #4a4537);
  box-shadow: none;
}
.sideMenuRow.is-muted .navIcon { color: var(--mp-ink-faint, #4a4537); }
.sideMenuRow.is-muted:hover .navIcon,
.sideMenuRow.is-muted:focus-visible .navIcon { color: var(--mp-ink-dim); }

/* Symbol je Zustand: Glocke/Note/Katze bzw. die durchgestrichene oder
   schlafende Variante (Klassen setzt controls.js). */
.sideMuteBtn .ic-bell-off,
.sideMusicBtn .ic-music-off,
.sideCatMuteBtn .ic-cat-sleep { display: none; }
.sideMuteBtn.is-muted .ic-bell,
.sideMusicBtn.is-muted .ic-music,
.sideCatMuteBtn.is-muted .ic-cat { display: none; }
.sideMuteBtn.is-muted .ic-bell-off,
.sideMusicBtn.is-muted .ic-music-off,
.sideCatMuteBtn.is-muted .ic-cat-sleep { display: block; }

@media (prefers-reduced-motion: reduce) {
  .sideMenu,
  .sideSwitch,
  .sideSwitch::after,
  .sideFootGear .navIcon svg {
    transition: none;
  }
}
