/* ---------- Gemeinsame Kopfzeile (alle Seiten) ----------
   Eigenständig, damit sie auf Seiten mit style.css und mit home.css gleich aussieht.
   Wird als letztes Stylesheet geladen. Verhalten: account-menu.js (Menü, aktive Seite),
   effects.js (Suche), i18n.js (DE/EN), account-menu.js (Konto). */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top);
  background: #1C1C1C !important;
  border-bottom: 1px solid #333333 !important;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.nav .wrap {
  display: flex; align-items: center; gap: 4px; height: 64px; position: relative;
  width: min(1240px, 100% - 32px); max-width: none; margin-inline: auto; padding: 0;
}
.nav .logo {
  display: inline-flex; align-items: center; gap: 10px; flex: none; margin-right: 14px;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-weight: 600 !important; font-size: 20px; letter-spacing: -0.02em !important;
  color: #ECEAE4; text-decoration: none;
}
.nav .logo-mark { width: 22px; height: 22px; fill: none; stroke-width: 2.6; stroke-linecap: round; }

/* Links */
.nav .nav-links { display: flex; gap: 2px; align-items: center; flex: 1 1 auto; min-width: 0; }
.nav .nav-links a {
  text-decoration: none; color: #A09E98; white-space: nowrap;
  font-family: inherit; font-size: 14.5px; font-weight: 500;
  padding: 8px 11px; border-radius: 2px; transition: color .15s;
  box-shadow: inset 0 -1px 0 transparent;
}
.nav .nav-links a:hover { color: #ECEAE4; }
.nav .nav-links a[aria-current="page"] { color: #ECEAE4; box-shadow: inset 0 -1px 0 #ECEAE4; }
.nav .nav-links .nav-cta {
  line-height: 1.2; white-space: nowrap;
  margin-left: auto; padding: 9px 16px; border-radius: 2px; font-weight: 600; font-size: 14px;
  font-family: "Space Grotesk", inherit;
  color: #1C1C1C !important; background: #ECEAE4 !important; border: 1px solid #ECEAE4;
  box-shadow: none;
}
.nav .nav-links .nav-cta:hover { background: transparent !important; color: #ECEAE4 !important; }
.nav .nav-links [hidden] { display: none !important; }
.nav .nav-links .hide-sm { display: none; }
.nav .nav-links .nav-main { display: none; }
@media (min-width: 1180px) { .nav .nav-links .nav-main { display: inline-block; } }
/* Login steckt im Konto-Symbol; als Text nur im ausgeklappten Menü */
.nav .nav-links:not(.open) [data-account] { display: none; }

/* Menü-Knopf (unter 1180 px) */
.nav .nav-toggle {
  display: none; flex: none; order: 9;
  font: 500 13px/1 inherit; color: #ECEAE4; cursor: pointer;
  background: transparent; border: 1px solid #4A4A4A;
  border-radius: 2px; padding: 9px 14px; margin: 0 0 0 8px;
}
@media (max-width: 1179px) {
  .nav .nav-toggle { display: inline-block; }
  .nav .nav-links:not(.open) .nav-cta { display: inline-block; }
  .nav .nav-links.open {
    position: absolute; top: 64px; left: -16px; right: -16px;
    flex-direction: column; align-items: stretch; gap: 2px;
    max-height: calc(100dvh - 80px); overflow-y: auto;
    padding: 10px 16px 18px;
    background: #1C1C1C; border-bottom: 1px solid #333333;
  }
  .nav .nav-links.open a { padding: 12px 14px; border-radius: 2px; }
  .nav .nav-links.open .nav-main, .nav .nav-links.open .hide-sm { display: block; }
  .nav .nav-links.open .nav-cta { margin: 10px 0 0; text-align: center; }
}
@media (max-width: 640px) { .nav .nav-links:not(.open) .nav-cta { display: none; } }

/* Suche (effects.js), Sprache (i18n.js), Konto (account-menu.js) */
.nav .cmdk-trigger {
  display: none; align-items: center; gap: 8px; flex: none; order: 6;
  font: inherit; font-size: 13px; color: #73716B; cursor: pointer;
  background: transparent; border: 1px solid #333333;
  border-radius: 2px; padding: 6px 8px 6px 12px; margin: 0 4px 0 8px !important;
}
.nav .cmdk-trigger:hover { color: #A1A1AA; border-color: rgba(0, 0, 0, 0.14); }
.nav .cmdk-trigger kbd { font: 500 11px/1 "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace; padding: 3px 5px; border-radius: 2px; background: #333333; color: #A09E98; }
@media (min-width: 1400px) { .nav .cmdk-trigger { display: inline-flex; } }
.nav .lang-switch {
  display: inline-flex; align-items: center; flex: none; order: 7; height: 32px; padding: 2px;
  border-radius: 2px; background: transparent; border: 1px solid #4A4A4A; margin: 0 0 0 6px;
}
.nav .lang-switch button { height: 26px; min-width: 34px; padding: 0 9px; border: 0; border-radius: 1px; background: transparent; color: #A09E98; font: 500 12px/1 "JetBrains Mono", ui-monospace, monospace; cursor: pointer; }
.nav .lang-switch button[aria-pressed="true"] { background: #ECEAE4; color: #1C1C1C; }
.nav .wrap > .acct { order: 8; margin-left: 8px; }
.nav .badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 2px; background: #ECEAE4; color: #1C1C1C; font-size: 11px; font-weight: 700; }

/* Befehlspalette (effects.js) – auch auf Seiten ohne style.css */
.cmdk { position: fixed; inset: 0; z-index: 100; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; background: rgba(255, 255, 255, 0.5);  }
.cmdk-box { width: min(620px, 100%); background: #242424; border: 1px solid #4A4A4A; border-radius: 2px; overflow: hidden; color: #ECEAE4; }
.cmdk-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid rgba(0, 0, 0, 0.09); }
.cmdk-input svg { width: 16px; height: 16px; color: #6E6E78; flex: none; }
.cmdk-input input { flex: 1; border: 0; background: transparent; color: #F5F5F7; padding: 16px 0; font: inherit; font-size: 15px; outline: none; box-shadow: none !important; }
.cmdk-list { max-height: min(56vh, 420px); overflow-y: auto; padding: 6px; }
.cmdk-group { font: 11px ui-monospace, "SF Mono", Consolas, monospace; color: #6E6E78; padding: 10px 10px 4px; }
.cmdk-item { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; width: 100%; text-align: left; font: inherit; font-size: 14px; color: #A1A1AA; background: transparent; border: 0; border-radius: 12px; padding: 9px 10px; cursor: pointer; }
.cmdk-item .k, .cmdk-item .g { font-family: ui-monospace, "SF Mono", Consolas, monospace; font-size: 11px; color: #6E6E78; }
.cmdk-item .g { text-align: center; }
.cmdk-item[aria-selected="true"] { background: #2A2A2A; color: #ECEAE4; }
.cmdk-item[aria-selected="true"] .g, .cmdk-item mark { background: none; color: #ECEAE4; }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid rgba(0, 0, 0, 0.09); font-size: 12px; color: #6E6E78; }
.cmdk-empty { padding: 28px; text-align: center; color: #6E6E78; font-size: 14px; }

@media (prefers-reduced-motion: reduce) { .nav .nav-links a { transition: none; } }

/* Profilbilder bleiben immer exakt in ihrer Form (Kreis), egal wie groß das Bild ist */
.avatar, .acct-face { overflow: hidden; }
.avatar > img, .acct-face > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.avatar:has(> img) { position: relative; }

/* Profil: Bereichs-Navigation links untereinander */
.ptabs.ptabs-side { display: grid; gap: 6px; padding: 6px; margin: 0 0 20px; overflow: visible; border-radius: 2px; }
.ptabs.ptabs-side button { justify-content: flex-start; width: 100%; padding: 12px 14px; border-radius: 2px; }
@media (max-width: 959px) { .ptabs.ptabs-side { display: flex; overflow-x: auto; } .ptabs.ptabs-side button { width: auto; } }

/* Benachrichtigungen (notifications.js) sitzen in .nav-links: deren Link-Regeln (nowrap, Pillen-Padding,
   Unterstrich) dürfen nicht auf die Einträge im Panel durchschlagen, sonst wird der Text abgeschnitten. */
.nav .nav-links .notification-panel { white-space: normal; }
.nav .nav-links .notification-panel a.notification-item {
  display: grid; gap: 4px; padding: 12px; margin-top: 4px; white-space: normal; overflow-wrap: anywhere;
  font-size: 14px; line-height: 1.45; color: #ECEAE4; box-shadow: none; border-radius: 2px;
}
.nav .nav-links .notification-panel a.notification-item:hover { color: #ECEAE4; background: #2A2A2A; }
.nav .nav-links .notification-panel a.notification-item.unread { background: rgba(236, 234, 228, .10); }
.nav .nav-links .notification-panel a.notification-item small { color: #A09E98; font-size: 12px; }
