/* =============================================================================
   ESDOCS — стили раздела документации (docs.html и docs/*.html)
   Подключается ПОСЛЕ assets/css/style.css и переопределяет часть переменных,
   делая раздел заметно более сдержанным/серым, в духе Apple/Stripe Docs —
   без ярких градиентов и акцентного рубинового цвета.
   ============================================================================= */

:root {
  --bg-base: #f5f5f7;
  --text-main: #1d1d1f;
  --text-muted: #6e6e73;
  --accent-ruby: #6e6e73;

  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-bg-hover: rgba(255, 255, 255, 1);
  --glass-border: rgba(0, 0, 0, 0.06);
  --glass-border-subtle: rgba(0, 0, 0, 0.08);
  --glass-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 10px 24px rgba(0, 0, 0, 0.04);
}

body.docs-page {
  background-color: var(--bg-base);
}

/* Приглушаем акцентную кнопку "+" в шапке — на страницах Docs она серая, а не рубиновая */
body.docs-page .morphing-glass-pill.submenu-open .plus-btn {
  color: #6e6e73;
  background: rgba(110, 110, 115, 0.1);
}

/* ===== БЕЙДЖ "esDocs" РЯДОМ С ЛОГОТИПОМ ===== */
.docs-logo {
  display: flex; align-items: center;
}
.docs-badge-divider {
  width: 1px; height: 18px;
  background: rgba(0, 0, 0, 0.14);
  margin: 0 10px;
}
.docs-badge {
  font-size: 15px; font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-muted);
}

/* ===== ДВУХКОЛОНОЧНЫЙ МАКЕТ (САЙДБАР + КОНТЕНТ) ===== */
.docs-layout {
  max-width: 1280px; margin: 0 auto;
  padding: 40px 24px 100px 24px;
  display: flex; align-items: flex-start; gap: 48px;
}

.docs-sidebar {
  width: 250px; flex-shrink: 0;
  position: sticky; top: 110px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  padding-bottom: 24px;
}

.docs-toc-label {
  font-size: 11.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 16px 10px 6px 10px;
}
.docs-toc-label:first-child { padding-top: 4px; }

.docs-sidebar a {
  display: block;
  padding: 6.5px 10px;
  border-radius: 8px;
  font-size: 13.5px; font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  line-height: 1.4;
  transition: background 0.15s ease, color 0.15s ease;
}
.docs-sidebar a:hover { background: rgba(0, 0, 0, 0.045); }
.docs-sidebar a.active {
  background: rgba(0, 0, 0, 0.07);
  font-weight: 700;
  color: #000;
}

/* ===== ОСНОВНОЙ КОНТЕНТ ДОКУМЕНТА ===== */
.docs-content {
  flex: 1; min-width: 0;
  max-width: 740px;
}

.docs-breadcrumb {
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.docs-breadcrumb a { color: var(--text-muted); text-decoration: none; }
.docs-breadcrumb a:hover { color: var(--text-main); text-decoration: underline; }

.docs-content h1 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800; letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 14px;
}

.docs-lead {
  font-size: 16.5px; font-weight: 500;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 30px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--glass-border-subtle);
}

.docs-content h2 {
  font-size: 21px; font-weight: 700; letter-spacing: -0.01em;
  color: var(--text-main);
  margin: 34px 0 12px 0;
}
.docs-content h3 {
  font-size: 16.5px; font-weight: 700;
  color: var(--text-main);
  margin: 22px 0 8px 0;
}

.docs-content p {
  font-size: 15px; line-height: 1.75;
  color: #333336;
  margin-bottom: 14px;
}

.docs-content ul, .docs-content ol {
  padding-left: 22px; margin-bottom: 16px;
}
.docs-content li {
  font-size: 14.5px; line-height: 1.7;
  color: #333336;
  margin-bottom: 6px;
}
.docs-content strong { color: var(--text-main); }

.docs-content code {
  font-family: var(--font-mono);
  background: #ececed;
  color: #3a3a3c;
  padding: 2px 7px; border-radius: 6px;
  font-size: 0.88em;
}

.doc-card {
  background: #ffffff;
  border: 1px solid var(--glass-border-subtle);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 18px 0;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.doc-note {
  border-left: 3px solid #a1a1a6;
  background: #f0f0f2;
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  font-size: 13.5px; line-height: 1.6;
  color: #3a3a3c;
  margin: 18px 0;
}

.doc-table-wrap { overflow-x: auto; margin: 18px 0; }
.doc-table {
  width: 100%; border-collapse: collapse;
  font-size: 13.5px;
}
.doc-table th, .doc-table td {
  text-align: left; padding: 10px 14px;
  border-bottom: 1px solid var(--glass-border-subtle);
  white-space: nowrap;
}
.doc-table th {
  color: var(--text-muted); font-weight: 700; font-size: 11.5px;
  text-transform: uppercase; letter-spacing: 0.04em;
}

.doc-cmd-list { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.doc-cmd-list .cmd-block { cursor: default; }

.docs-back-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 48px; padding-top: 20px;
  border-top: 1px solid var(--glass-border-subtle);
  font-size: 13.5px; font-weight: 700;
  color: var(--text-muted); text-decoration: none;
}
.docs-back-link:hover { color: var(--text-main); }

@media (max-width: 900px) {
  .docs-layout { flex-direction: column; padding: 24px 16px 60px 16px; gap: 8px; }
  .docs-sidebar {
    position: static; width: 100%; max-height: none;
    overflow: visible;
    border-bottom: 1px solid var(--glass-border-subtle);
    margin-bottom: 20px; padding-bottom: 12px;
  }
  .docs-content { max-width: 100%; }
}

/* ===== Поиск по документации ===== */
.docs-search {
  position: relative;
  margin-bottom: 18px;
}

.docs-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.docs-search-input {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.12));
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  padding: 11px 16px 11px 40px;
  border-radius: 100px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.docs-search-input::placeholder {
  color: var(--text-muted);
}

.docs-search-input:focus {
  border-color: var(--accent, #6366f1);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
}

.docs-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1100;
  background: #ffffff;
  border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.12));
  border-radius: 16px;
  box-shadow: 0 18px 45px -12px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.docs-search-item {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  transition: background 0.15s;
}

.docs-search-item:last-child {
  border-bottom: none;
}

.docs-search-item:hover {
  background: #f1f5f9;
}

.docs-search-item-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 3px;
  line-height: 1.35;
}

.docs-search-item-title mark {
  background: rgba(99, 102, 241, 0.18);
  color: var(--text-main);
  border-radius: 4px;
  padding: 0 2px;
}

.docs-search-item-desc {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.docs-search-empty,
.docs-search-more {
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.docs-search-more {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 12px;
}
