/* =========================================================================
   Powłoka przeglądarki dokumentacji (docs/index.php).

   Nagłówek, marka i stopka korzystają z klas już zdefiniowanych w głównym
   ../style.css (to ten sam .site-top / .site-header / .site-nav / .site-cta,
   co na każdej innej podstronie serwisu) — tu dopisane jest wyłącznie to,
   czego nigdzie indziej nie ma: układ aplikacji (sidebar + treść na pełną
   wysokość), wyszukiwarka w pasku bocznym, ramka podglądu dokumentu
   i lista wyników wyszukiwania.
   ========================================================================= */

.docs-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  background: var(--paper-2);
}

.docs-shell .site-top { flex-shrink: 0; }

.docs-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* ---------- sidebar (granatowa, jak reszta ciemnych elementów serwisu) ---------- */
.docs-sidebar {
  width: 264px;
  flex-shrink: 0;
  background: var(--ink);
  border-right: 1px solid var(--ink-line);
  padding: 18px 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.docs-sidebar-label {
  padding: 4px 20px 10px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-muted);
}

.docs-search { padding: 0 20px 16px; }
.docs-search-input {
  width: 100%;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--ink-line-2);
  border-radius: 8px;
  color: var(--ink-text);
  font-family: var(--sans);
  font-size: 13px;
  padding: 9px 12px;
  transition: border-color .15s, background-color .15s;
}
.docs-search-input::placeholder { color: var(--ink-muted); }
.docs-search-input:focus {
  outline: none;
  border-color: var(--brand-2);
  background: rgba(255, 255, 255, .10);
}
.docs-search-clear {
  display: block;
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--ink-muted);
  text-decoration: none;
}
.docs-search-clear:hover { color: var(--ink-text); text-decoration: underline; }

.docs-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-left: 3px solid transparent;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.docs-nav-item:hover  { background: var(--ink-2); color: var(--ink-text); text-decoration: none; }
.docs-nav-item.active { background: var(--ink-2); color: #fff; border-left-color: var(--brand-2); }
.docs-nav-icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }

/* ---------- treść ---------- */
.docs-content {
  flex: 1;
  min-width: 0;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.doc-viewer { flex: 1; min-height: 0; display: flex; }
.doc-frame {
  flex: 1;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 30px rgba(10, 22, 40, .12);
}

.docs-empty {
  margin: auto;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- wyniki wyszukiwania ---------- */
.docs-search-results {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 24px;
  max-width: 780px;
}
.docs-search-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.docs-search-results-title { font-size: 15px; font-weight: 700; color: var(--text); }
.docs-search-results-chip {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--paper-3);
  border: 1px solid var(--line);
  color: var(--muted);
}
.docs-search-empty { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

.docs-search-result {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.docs-search-result:last-child { border-bottom: none; }
.docs-search-result-title {
  display: inline-block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--brand-deep);
  text-decoration: none;
  margin-bottom: 6px;
}
.docs-search-result-title:hover { color: var(--brand); text-decoration: underline; }
.docs-search-result-snippet { font-size: 13px; color: var(--text-2); line-height: 1.6; margin: 4px 0 0; }
.docs-search-result-snippet mark {
  background: var(--gold-tint);
  color: var(--text);
  border-radius: 3px;
  padding: 0 2px;
}

@media (max-width: 768px) {
  .docs-sidebar { display: none; }
  .docs-content { padding: 14px; }
}
