/* Neurovexa — Wissensdatenbank (/wiki, /wiki/{slug})
   Baut auf nvx-privacy.css auf (Lese-Layout, Code-Blöcke, Tabellen); hier nur Übersicht, Inhaltsverzeichnis und Hinweisboxen.
*/

/* ---- Suche im Hero ---- */
.nvx-wiki .nvx-wk-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  max-width: 36rem;
  margin: 1.4rem 0 0;
  padding: 0 1.1rem;
  border: 1px solid rgba(238, 240, 245, 0.14);
  border-radius: 14px;
  background: rgba(8, 15, 30, 0.75);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.nvx-wiki .nvx-wk-search:focus-within {
  border-color: var(--nvx-cyan);
}

.nvx-wk-search i {
  color: var(--nvx-cyan);
}

.nvx-wk-search input {
  flex: 1;
  min-width: 0;
  height: 3.2rem;
  border: 0;
  outline: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 1rem;
}

.nvx-wk-search input::placeholder {
  color: rgba(231, 235, 244, 0.5);
}

/* ---- Kategorien ---- */
.nvx-wk-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}

.nvx-wiki .nvx-wk-cat {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.1rem 0.8rem 0.8rem;
  border: 1px solid var(--nvx-border-soft);
  border-radius: var(--nvx-radius-sm);
  background: rgba(8, 15, 30, 0.55);
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nvx-wiki .nvx-wk-cat:hover,
.nvx-wiki .nvx-wk-cat.is-active {
  border-color: rgba(61, 147, 245, 0.6);
  background: rgba(238, 240, 245, 0.048);
}

.nvx-wk-cat strong,
.nvx-wk-cat small {
  display: block;
}

.nvx-wiki .nvx-wk-cat strong {
  font-size: 0.95rem;
}

.nvx-wiki .nvx-wk-cat small {
  color: var(--nvx-muted);
  font-size: 0.78rem;
}

/* ---- Artikelliste ---- */
.nvx-wk-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--nvx-gap);
}

.nvx-domain .nvx-wk-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.3rem 1.3rem;
  color: inherit;
  text-decoration: none;
}

.nvx-domain .nvx-wk-item[hidden] {
  display: none;
}

.nvx-wk-item-body {
  flex: 1;
  min-width: 0;
}

.nvx-wk-item-body small,
.nvx-wk-item-body strong,
.nvx-wk-item-body span {
  display: block;
}

.nvx-wiki .nvx-wk-item-body small {
  margin-bottom: 0.25rem;
  color: var(--nvx-cyan);
  font-size: 0.75rem;
  font-weight: 500;
}

.nvx-wiki .nvx-wk-item-body strong {
  margin-bottom: 0.35rem;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 500;
}

.nvx-wiki .nvx-wk-item-body span {
  color: var(--nvx-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.nvx-wk-item-arrow {
  margin-top: 0.3rem;
  color: var(--nvx-muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nvx-wk-item:hover .nvx-wk-item-arrow {
  color: var(--nvx-cyan);
  transform: translateX(3px);
}

.nvx-wiki .nvx-wk-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 2rem;
  color: var(--nvx-muted);
  text-align: center;
}

/* ---- Artikel: Inhaltsverzeichnis + Text ---- */
.nvx-wk-layout {
  display: grid;
  grid-template-columns: 17rem minmax(0, 1fr);
  gap: var(--nvx-gap);
  align-items: start;
  margin-top: 0;
}

.nvx-wk-toc {
  position: sticky;
  top: 1.5rem;
}

.nvx-domain .nvx-wk-toc-card {
  padding: 1.3rem 1.2rem;
}

.nvx-domain .nvx-wk-toc-card:hover {
  transform: none;
}

.nvx-wiki .nvx-wk-toc-title {
  margin: 0 0 0.8rem;
  color: rgba(231, 235, 244, 0.55);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: normal;
  text-transform: none;
}

.nvx-wk-toc ol {
  display: grid;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nvx-wiki .nvx-wk-toc a {
  display: flex;
  gap: 0.55rem;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  color: rgba(231, 235, 244, 0.78);
  font-size: 0.86rem;
  line-height: 1.4;
  text-decoration: none;
}

.nvx-wiki .nvx-wk-toc a:hover {
  background: rgba(238, 240, 245, 0.06);
  color: #fff;
}

.nvx-wiki .nvx-wk-toc a span {
  color: var(--nvx-cyan);
  font-weight: 500;
}

.nvx-wiki .nvx-wk-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0 0.5rem;
  color: var(--nvx-cyan);
  font-size: 0.86rem;
  text-decoration: none;
}

/* Kopieren-Button an Codeblöcken */
.nvx-wk-article pre.nvx-pv-code {
  position: relative;
  padding-right: 5.5rem;
}

.nvx-wiki .nvx-wk-copy {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid rgba(238, 240, 245, 0.14);
  border-radius: 7px;
  background: rgba(238, 240, 245, 0.072);
  color: #d4dbea;
  font: inherit;
  font-size: 0.74rem;
  cursor: pointer;
}

.nvx-wiki .nvx-wk-copy:hover {
  border-color: var(--nvx-cyan);
  color: #fff;
}

/* Hinweisboxen im Artikel */
.nvx-wk-note,
.nvx-wk-warn {
  margin: 0.6rem 0 1.2rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--nvx-radius-sm);
}

.nvx-wk-note {
  border: 1px solid rgba(238, 240, 245, 0.12);
  border-left: 3px solid var(--nvx-sky);
  background: rgba(238, 240, 245, 0.048);
}

.nvx-wk-warn {
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-left: 3px solid #fbbf24;
  background: rgba(251, 191, 36, 0.07);
}

.nvx-pv-section .nvx-wk-note p,
.nvx-pv-section .nvx-wk-warn p {
  margin: 0;
  font-size: 0.93rem;
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  /* minmax(0, …): breite Codeblöcke scrollen in sich, statt die Seite zu verbreitern */
  .nvx-wk-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .nvx-wk-toc {
    position: static;
  }

  .nvx-wk-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .nvx-wk-cats {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nvx-wk-article pre.nvx-pv-code {
    padding-right: 1.2rem;
    padding-top: 2.6rem;
  }
}
