/* =================================================================================
   docs.css — Стили документации FistashkinBot
   ================================================================================= */

/* ─── ПЕРЕМЕННЫЕ ТЕМ (документация) ─── */
:root {
  /* Светлая тема */
  --bg-card: rgba(0, 0, 0, 0.03);

  --docs-bg: #f8f9fa;
  --docs-text-muted: #6b6b76;
  --docs-text-strong: #18181b;
  --docs-body-text: #3f3f46;

  --docs-nav-bg: rgba(255, 255, 255, 0.75);
  --docs-nav-text: #18181b;
  --docs-nav-glow: rgba(0, 0, 0, 0.2);
  --docs-mobile-menu-bg: #ffffff;

  --docs-panel-bg: rgba(255, 255, 255, 0.7);
  --docs-hover-bg: rgba(0, 0, 0, 0.04);
  --docs-hover-bg-strong: rgba(0, 0, 0, 0.06);

  --docs-border-faint: rgba(0, 0, 0, 0.05);
  --docs-border-subtle: rgba(0, 0, 0, 0.07);
  --docs-border-medium: rgba(0, 0, 0, 0.1);
  --docs-border-strong: rgba(0, 0, 0, 0.18);

  --docs-scrollbar-thumb: rgba(0, 0, 0, 0.15);
  --docs-kbd-bg: rgba(0, 0, 0, 0.05);

  --docs-overlay-bg: rgba(0, 0, 0, 0.35);
  --docs-modal-shadow: rgba(0, 0, 0, 0.25);
  --docs-shadow-strong: rgba(0, 0, 0, 0.2);
  --docs-search-row-border: rgba(0, 0, 0, 0.08);
  --docs-search-item-hover: rgba(0, 0, 0, 0.05);

  --docs-code-bg: rgba(0, 0, 0, 0.06);
  --docs-code-copy-bg: rgba(0, 0, 0, 0.05);
  --docs-inline-code-text: #a15c2e;
  --docs-pre-bg: #f6f8fa;

  --docs-table-header-bg: rgba(0, 0, 0, 0.04);
  --docs-table-stripe-bg: rgba(0, 0, 0, 0.02);

  --hint-info-bg: #eff6ff;
  --hint-info-text: #1e3a8a;
  --hint-info-icon: #2563eb;
  --hint-info-heading: #1e40af;

  --hint-tip-bg: #ecfdf5;
  --hint-tip-text: #065f46;
  --hint-tip-icon: #059669;
  --hint-tip-heading: #064e3b;

  --hint-danger-bg: #fef2f2;
  --hint-danger-text: #991b1b;
  --hint-danger-icon: #dc2626;
  --hint-danger-heading: #7f1d1d;

  --hint-working-bg: #f5f3ff;
  --hint-working-text: #4c1d95;
  --hint-working-icon: #7c3aed;
  --hint-working-heading: #3730a3;

  --hint-success-bg: #ecfdf5;
  --hint-success-text: #065f46;
  --hint-success-icon: #059669;
  --hint-success-heading: #064e3b;

  --hint-warning-bg: #fefce8;
  --hint-warning-text: #854d0e;
  --hint-warning-icon: #ca8a04;
  --hint-warning-heading: #713f12;
}

.dark {
  /* Тёмная тема — оригинальные значения документации, без изменений */
  --bg-card: rgba(26, 26, 26, 0.2);

  --docs-bg: #0e0e0e;
  --docs-text-muted: #aaa;
  --docs-text-strong: #fff;
  --docs-body-text: #c9cdd4;

  --docs-nav-bg: rgb(18, 18, 18, 0.3);
  --docs-nav-text: #fff;
  --docs-nav-glow: rgba(255, 255, 255, 0.7);
  --docs-mobile-menu-bg: #121212;

  --docs-panel-bg: rgba(18, 18, 18, 0.3);
  --docs-hover-bg: rgba(255, 255, 255, 0.04);
  --docs-hover-bg-strong: rgba(255, 255, 255, 0.07);

  --docs-border-faint: rgba(255, 255, 255, 0.05);
  --docs-border-subtle: rgba(255, 255, 255, 0.07);
  --docs-border-medium: rgba(255, 255, 255, 0.1);
  --docs-border-strong: rgba(255, 255, 255, 0.2);

  --docs-scrollbar-thumb: rgba(255, 255, 255, 0.08);
  --docs-kbd-bg: rgba(18, 18, 18, 0.08);

  --docs-overlay-bg: rgba(0, 0, 0, 0.5);
  --docs-modal-shadow: rgba(0, 0, 0, 0.7);
  --docs-shadow-strong: rgba(0, 0, 0, 0.5);
  --docs-search-row-border: rgba(18, 18, 18, 0.3);
  --docs-search-item-hover: rgba(18, 18, 18, 0.3);

  --docs-code-bg: rgba(255, 255, 255, 0.07);
  --docs-code-copy-bg: rgba(255, 255, 255, 0.06);
  --docs-inline-code-text: #e0a070;
  --docs-pre-bg: #0d1117;

  --docs-table-header-bg: rgba(255, 255, 255, 0.05);
  --docs-table-stripe-bg: rgba(255, 255, 255, 0.02);

  --hint-info-bg: #0f1825;
  --hint-info-text: #b8cce0;
  --hint-info-icon: #60a5fa;
  --hint-info-heading: #dbeafe;

  --hint-tip-bg: #071a13;
  --hint-tip-text: #a7f3d0;
  --hint-tip-icon: #34d399;
  --hint-tip-heading: #d1fae5;

  --hint-danger-bg: #1f1315;
  --hint-danger-text: #fecaca;
  --hint-danger-icon: #f87171;
  --hint-danger-heading: #fee2e2;

  --hint-working-bg: #18163a;
  --hint-working-text: #16153a;
  --hint-working-icon: #a78bfa;
  --hint-working-heading: #e0e7ff;

  --hint-success-bg: #0f1f14;
  --hint-success-text: #a7f3d0;
  --hint-success-icon: #34d399;
  --hint-success-heading: #d1fae5;

  --hint-warning-bg: #1d1508;
  --hint-warning-text: #fde047;
  --hint-warning-icon: #facc15;
  --hint-warning-heading: #fef08c;
}

/* ─── НАВБАР ─── */
.docs-navbar {
  position: fixed;
  width: 100%;
  padding: 5px 0 !important;
  font-family: "Ubuntu", sans-serif;
  background: var(--docs-nav-bg) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 9999;
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--docs-border-faint);
}
.docs-navbar .max-width {
  max-width: 1300px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.docs-navbar .logo a {
  color: var(--docs-nav-text);
  font-size: 35px;
  font-weight: 600;
  text-decoration: none;
}
.docs-navbar .logo a span {
  color: #c0694e;
}

/* Обёртка для кнопок справа (настройки + переключатель сайдбара на мобильном):
   держит между ними фиксированный небольшой зазор и прижимает обе к правому краю,
   вместо того чтобы каждая кнопка сама искала себе место в гриде. */
.docs-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.docs-navbar .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 20px;
}
.docs-navbar .menu li {
  display: inline-block;
}
.docs-navbar .menu li a {
  display: block;
  color: var(--docs-nav-text);
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}
.docs-navbar .menu li a i {
  margin-right: 6px;
}
.docs-navbar .menu li a:hover {
  color: var(--docs-nav-text);
  filter: drop-shadow(0 0 5px var(--docs-nav-glow));
}
.docs-navbar .menu li a.active {
  color: #c0694e;
  filter: drop-shadow(0 0 5px rgba(192, 105, 78, 0.5));
}
.docs-navbar .menu-btn {
  color: var(--docs-nav-text);
  font-size: 23px;
  cursor: pointer;
  display: none;
}
.docs-navbar .docs-mob-toggle {
  display: none;
  align-items: center;
  gap: 8px;
}
.docs-navbar .docs-mob-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 9px 16px;
  border: 1px solid var(--docs-border-medium);
  background: var(--docs-panel-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%); /* FIX: iOS */
  color: var(--docs-nav-text);
  transition: all 0.2s ease;
  cursor: pointer;
}
.docs-navbar .docs-mob-toggle button:hover {
  background-color: var(--docs-hover-bg);
}

/* ─── СТРАНИЦА ─── */
.docs-page {
  font-family:
    "Poppins",
    "Ubuntu",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--docs-bg);
  color: var(--docs-text-muted);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ─── ЛЕЙАУТ ─── */
.docs-layout {
  display: flex;
  min-height: calc(100vh - 70px);
  margin-top: 70px;
}

/* ─── САЙДБАР ─── */
.docs-sidebar {
  position: fixed;
  top: 70px;
  left: 0;
  bottom: 0;
  width: 268px;
  background: var(--docs-panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--docs-border-subtle);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--docs-scrollbar-thumb) transparent;
}
.docs-sidebar::-webkit-scrollbar {
  width: 3px;
}
.docs-sidebar::-webkit-scrollbar-thumb {
  background: var(--docs-scrollbar-thumb);
  border-radius: 2px;
}

.sb-nav-body {
  flex: 1;
  padding: 0 0 20px;
}

.sb-section-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--docs-text-muted);
  padding: 18px 16px 6px;
  font-family: "Ubuntu", sans-serif;
}

.sb-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  font-size: 13.5px;
  color: var(--docs-text-muted);
  cursor: pointer;
  border-left: 2px solid transparent;
  transition:
    color 0.12s,
    background 0.12s,
    border-color 0.12s;
  user-select: none;
  line-height: 1.4;
  font-family: "Poppins", sans-serif;
}
.sb-item:hover {
  color: var(--docs-text-strong);
  background: var(--docs-hover-bg);
}
.sb-item.active {
  color: var(--docs-text-strong);
  border-left-color: var(--accent);
  background: var(--docs-hover-bg);
}

.sb-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  font-size: 13.5px;
  color: var(--docs-text-muted);
  cursor: pointer;
  border-left: 2px solid transparent;
  transition:
    color 0.12s,
    background 0.12s;
  user-select: none;
  font-family: "Poppins", sans-serif;
}
.sb-group-toggle:hover {
  color: var(--docs-text-strong);
  background: var(--docs-hover-bg);
}
.sb-group-toggle .sb-arrow {
  font-size: 11px;
  transition: transform 0.2s;
  opacity: 0.5;
}
.sb-group-toggle.open .sb-arrow {
  transform: rotate(90deg);
  opacity: 0.8;
}

.sb-group-children {
  display: none;
}
.sb-group-children.open {
  display: block;
}

.sb-child {
  display: flex;
  align-items: center;
  padding: 5px 16px 5px 28px;
  font-size: 13px;
  color: var(--docs-text-muted);
  cursor: pointer;
  border-left: 2px solid transparent;
  transition:
    color 0.12s,
    background 0.12s,
    border-color 0.12s;
  font-family: "Poppins", sans-serif;
}
.sb-child:hover {
  color: var(--docs-text-strong);
  background: var(--docs-hover-bg);
}
.sb-child.active {
  color: var(--docs-text-strong);
  border-left-color: var(--accent);
  background: var(--docs-hover-bg);
}

.sb-footer {
  padding: 10px;
  border-top: 1px solid var(--docs-border-subtle);
  flex-shrink: 0;
}
.sb-powered {
  display: flex;
  align-items: center;
  gap: 90px;
  font-size: 12px;
  color: var(--docs-text-muted);
  text-decoration: none;
  font-family: "Poppins", sans-serif;
}
.sb-powered:hover {
  color: var(--docs-body-text);
}
.sb-powered svg {
  opacity: 0.5;
}

/* ─── ПОИСК В САЙДБАРЕ ─── */
.sb-search-wrap {
  padding: 16px 12px 6px;
}
.sb-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--docs-panel-bg);
  border: 1px solid var(--docs-border-medium);
  border-radius: 6px;
  padding: 7px 12px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
  font-family: "Poppins", sans-serif;
}
.sb-search-box:hover {
  border-color: var(--docs-border-strong);
  background: var(--docs-hover-bg-strong);
}
.sb-search-box svg {
  opacity: 0.45;
  flex-shrink: 0;
}
.sb-search-box span {
  font-size: 13.5px;
  color: var(--docs-text-muted);
  flex: 1;
}
.sb-search-box kbd {
  font-size: 11px;
  color: var(--docs-text-muted);
  background: var(--docs-kbd-bg);
  border: 1px solid var(--docs-border-medium);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: inherit;
}

/* ─── ОСНОВНОЙ КОНТЕНТ ─── */
.docs-main {
  flex: 1;
  margin-left: 268px;
  margin-right: 220px;
  min-width: 0;
  padding: 18px 18px 60px;
  background: var(--docs-bg);
  color: var(--docs-text-muted);
  font-family: "Poppins", sans-serif;
}

/* ─── ТУЛБАР ─── */
.doc-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 4px;
}
.doc-toolbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--docs-text-muted);
  background: none;
  border: 1px solid var(--docs-border-medium);
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s,
    background 0.15s;
  font-family: "Poppins", sans-serif;
}
.doc-toolbar-btn:hover {
  color: var(--docs-text-strong);
  border-color: var(--docs-border-strong);
  background: var(--docs-hover-bg);
}

.doc-last-updated {
  margin-top: 48px;
  font-size: 12.5px;
  color: var(--docs-text-muted);
  border-top: 1px solid var(--docs-border-subtle);
  padding-top: 16px;
  font-family: "Poppins", sans-serif;
}

/* ─── TOC ─── */
.docs-toc {
  position: fixed;
  top: 70px;
  right: 0;
  bottom: 0;
  width: 220px;
  border-left: 1px solid var(--docs-border-subtle);
  background: var(--docs-panel-bg);
  padding: 18px 18px 40px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--docs-scrollbar-thumb) transparent;
}
.docs-toc::-webkit-scrollbar {
  width: 3px;
}
.docs-toc::-webkit-scrollbar-thumb {
  background: var(--docs-scrollbar-thumb);
  border-radius: 2px;
}

.toc-head {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--docs-text-muted);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: "Ubuntu", sans-serif;
}
.toc-head svg {
  opacity: 0.5;
}
.toc-list {
  list-style: none;
}
.toc-link {
  display: block;
  font-size: 13px;
  color: var(--docs-text-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition:
    color 0.12s,
    border-color 0.12s;
  line-height: 1.4;
  font-family: "Poppins", sans-serif;
}
.toc-link:hover {
  color: var(--docs-text-strong);
}
.toc-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
}
.toc-link.h3 {
  padding-left: 18px;
  font-size: 12px;
}

/* ─── ПАГИНАЦИЯ ─── */
.page-nav {
  display: flex;
  gap: 12px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--docs-border-subtle);
  font-family: "Poppins", sans-serif;
}
.page-nav-btn {
  flex: 1;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--docs-border-medium);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition:
    border-color 0.15s,
    background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.page-nav-btn:hover {
  border-color: var(--docs-border-strong);
  background: var(--docs-hover-bg);
}
.page-nav-btn.right {
  text-align: right;
}
.pnav-label {
  font-size: 11.5px;
  color: var(--docs-text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.page-nav-btn.right .pnav-label {
  justify-content: flex-end;
}
.pnav-title {
  font-size: 14px;
  color: var(--docs-text-strong);
  font-weight: 500;
}

/* ─── ПОИСКОВЫЙ МОДАЛ ─── */
.doc-search-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--docs-overlay-bg);
  z-index: 500;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.doc-search-overlay.open {
  display: flex;
}
.doc-search-modal {
  width: 600px;
  max-width: 90vw;
  background: var(--docs-panel-bg);
  border: 1px solid var(--docs-border-medium);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 80px var(--docs-modal-shadow);
}
.doc-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--docs-search-row-border);
}
#doc-s-inp {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--docs-text-strong);
  font-family: "Poppins", sans-serif;
}
#doc-s-inp::placeholder {
  color: var(--docs-text-muted);
}
.doc-search-res {
  max-height: 380px;
  overflow-y: auto;
}
.doc-s-item {
  padding: 11px 18px;
  cursor: pointer;
  border-bottom: 1px solid var(--docs-search-row-border);
  transition: background 0.12s;
}
.doc-s-item:hover {
  background: var(--docs-search-item-hover);
}
.doc-s-item-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--docs-text-strong);
  font-family: "Poppins", sans-serif;
}
.doc-s-item-sec {
  font-size: 12px;
  color: var(--docs-text-muted);
  margin-top: 2px;
  font-family: "Poppins", sans-serif;
}
.doc-s-empty {
  padding: 28px 18px;
  text-align: center;
  color: var(--docs-text-muted);
  font-size: 13.5px;
  font-family: "Poppins", sans-serif;
  background: var(--docs-panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ─── MARKDOWN КОНТЕНТ ─── */
#doc-content {
  font-family: "Poppins", sans-serif;
}
#doc-content h1,
#doc-content h2,
#doc-content h3,
#doc-content h4 {
  font-family: "Ubuntu", sans-serif;
  font-weight: 600;
  color: var(--docs-text-strong);
}
#doc-content h1 {
  font-size: 1.95rem;
  margin-bottom: 14px;
  line-height: 1.25;
  letter-spacing: -0.3px;
}
#doc-content h2 {
  font-size: 1.3rem;
  margin-top: 48px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--docs-border-subtle);
}
#doc-content h3 {
  font-size: 1.07rem;
  margin-top: 30px;
  margin-bottom: 8px;
}
#doc-content p {
  margin-bottom: 4px;
  color: var(--docs-body-text);
}
#doc-content a {
  color: var(--accent);
  text-decoration: none;
}
#doc-content a:hover {
  text-decoration: underline;
}
#doc-content ul,
#doc-content ol {
  padding-left: 22px;
  margin-bottom: 14px;
}
#doc-content li {
  margin-bottom: 5px;
  color: var(--docs-body-text);
}
#doc-content strong {
  color: var(--docs-text-strong);
  font-weight: 600;
}
#doc-content em {
  color: var(--docs-text-muted);
}
#doc-content hr {
  border: none;
  border-top: 1px solid var(--docs-border-subtle);
  margin: 32px 0;
}
#doc-content code {
  font-family: "JetBrains Mono", "Fira Code", monospace;
  font-size: 0.84em;
  background: var(--docs-code-bg);
  border: 1px solid var(--docs-border-medium);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--docs-inline-code-text);
}
#doc-content pre {
  position: relative;
  background: var(--docs-pre-bg) !important;
  border: 1px solid var(--docs-border-subtle);
  border-radius: 8px;
  padding: 18px 20px;
  overflow-x: auto;
  margin-bottom: 18px;
}
#doc-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: 0.875rem;
}
#doc-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 10px 18px;
  background: var(--accent-dim);
  border-radius: 0 6px 6px 0;
  margin-bottom: 14px;
}
#doc-content blockquote p {
  margin: 0;
  color: var(--docs-text-muted);
}
#doc-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-bottom: 18px;
  font-size: 13.5px;
  border: 1px solid var(--docs-border-medium);
  border-radius: 8px;
  overflow: hidden;
}
#doc-content th {
  background: var(--docs-table-header-bg);
  padding: 9px 14px;
  border-bottom: 1px solid var(--docs-border-medium);
  border-right: 1px solid var(--docs-border-medium);
  font-weight: 600;
  color: var(--docs-text-strong);
  text-align: left;
  font-family: "Ubuntu", sans-serif;
}
#doc-content th:last-child {
  border-right: none;
}
#doc-content td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--docs-border-medium);
  border-right: 1px solid var(--docs-border-medium);
  color: var(--docs-body-text);
}
#doc-content td:last-child {
  border-right: none;
}
#doc-content tr:last-child td {
  border-bottom: none;
}
#doc-content tr:nth-child(even) td {
  background: var(--docs-table-stripe-bg);
}
#doc-content img {
  max-width: 100%;
  border-radius: 8px;
}

/* ─── КНОПКА КОПИРОВАНИЯ КОДА ─── */
.code-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--docs-code-copy-bg);
  border: 1px solid var(--docs-border-medium);
  color: var(--docs-text-muted);
  border-radius: 5px;
  padding: 3px 9px;
  font-size: 11.5px;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.15s,
    color 0.15s;
  font-family: "Poppins", sans-serif;
}
pre:hover .code-copy {
  opacity: 1;
}
.code-copy:hover {
  color: var(--docs-text-strong);
}

/* ============================================
   GitBook-style Hints (обновлённые, modern dark)
   Замена старых .hint на .gitbook-hint + поддержка tip/working
   ============================================ */

/* ─── ХИНТЫ (новый GitBook стиль) ─── */
.gitbook-hint {
  display: flex;
  gap: 16px;
  padding: 16px 24px;
  border-radius: 12px;
  margin: 16px 0;
  border-left: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: "Poppins", "Inter", system_ui, sans-serif;
}

.gitbook-hint:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.hint-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-top: 2px;
}

.hint-content {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  margin-top: 2px;
}

.hint-content p {
  margin-bottom: 12px;
}

.hint-content p:last-child {
  margin-bottom: 0;
}

.hint-content ul,
.hint-content ol {
  margin: 12px 0;
  padding-left: 20px;
}

.hint-content li {
  margin-bottom: 4px;
}

.hint-content strong {
  font-weight: 600;
}

.hint-content code {
  background-color: var(--docs-code-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.hint-content h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 10px;
  line-height: 1.5;
  font-family: "Ubuntu", "Poppins", sans-serif;
}

/* Hint Type Styles - Dark theme adapted from modern GitBook */
.gitbook-hint.hint-info {
  background-color: var(--hint-info-bg);
  border-color: #3b82f6;
  color: var(--hint-info-text);
}
.gitbook-hint.hint-info .hint-icon {
  color: var(--hint-info-icon);
}
.gitbook-hint.hint-info .hint-content h4,
.gitbook-hint.hint-info strong {
  color: var(--hint-info-heading);
}

.gitbook-hint.hint-tip {
  background-color: var(--hint-tip-bg);
  border-color: #10b981;
  color: var(--hint-tip-text);
}
.gitbook-hint.hint-tip .hint-icon {
  color: var(--hint-tip-icon);
}
.gitbook-hint.hint-tip .hint-content h4,
.gitbook-hint.hint-tip strong {
  color: var(--hint-tip-heading);
}

.gitbook-hint.hint-danger {
  background-color: var(--hint-danger-bg);
  border-color: #ef4444;
  color: var(--hint-danger-text);
}
.gitbook-hint.hint-danger .hint-icon {
  color: var(--hint-danger-icon);
}
.gitbook-hint.hint-danger .hint-content h4,
.gitbook-hint.hint-danger strong {
  color: var(--hint-danger-heading);
}

.gitbook-hint.hint-working {
  background-color: var(--hint-working-bg);
  border-color: #8b5cf6;
  color: var(--hint-working-text);
}
.gitbook-hint.hint-working .hint-icon {
  color: var(--hint-working-icon);
}
.gitbook-hint.hint-working .hint-content h4,
.gitbook-hint.hint-working strong {
  color: var(--hint-working-heading);
}

.gitbook-hint.hint-success {
  background-color: var(--hint-success-bg);
  border-color: #10b981;
  color: var(--hint-success-text);
}
.gitbook-hint.hint-success .hint-icon {
  color: var(--hint-success-icon);
}
.gitbook-hint.hint-success .hint-content h4,
.gitbook-hint.hint-success strong {
  color: var(--hint-success-heading);
}

.gitbook-hint.hint-warning {
  background-color: var(--hint-warning-bg);
  border-color: #eab308;
  color: var(--hint-warning-text);
}
.gitbook-hint.hint-warning .hint-icon {
  color: var(--hint-warning-icon);
}
.gitbook-hint.hint-warning .hint-content h4,
.gitbook-hint.hint-warning strong {
  color: var(--hint-warning-heading);
}

/* ─── СПИННЕР ─── */
.doc-spinner {
  width: 26px;
  height: 26px;
  border: 2.5px solid var(--docs-border-medium);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: doc-spin 0.6s linear infinite;
  margin: 80px auto;
}
@keyframes doc-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── ОВЕРЛЕЙ САЙДБАРА (мобайл) ─── */
.doc-sb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--docs-overlay-bg);
  z-index: 99;
}

/* ─── АДАПТИВ ─── */
@media (max-width: 1120px) {
  .docs-toc {
    display: none;
  }
  .docs-main {
    margin-right: 0;
  }
}

@media (max-width: 768px) {
  .docs-sidebar {
    transform: translateX(-100%);
  }
  .docs-sidebar.open {
    transform: none;
    box-shadow: 4px 0 32px var(--docs-shadow-strong);
  }
  .doc-sb-overlay.open {
    display: block;
  }
  .docs-main {
    margin-left: 0;
    padding: 28px 20px 60px;
  }
  .page-nav {
    flex-direction: column;
  }
  .sb-search-box span {
    font-size: 12px;
  }
  .sb-search-box kbd {
    display: none;
  }
  .docs-navbar .menu {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    background: var(--docs-mobile-menu-bg);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--docs-border-medium);
  }
  .docs-navbar .menu.open {
    display: flex;
  }
  .docs-navbar .menu li {
    display: block;
    text-align: center;
  }
  .docs-navbar .menu li a {
    margin: 10px 0;
    font-size: 20px;
  }
  .docs-navbar .docs-mob-toggle {
    display: flex;
  }
  .docs-navbar .menu-btn {
    display: block;
  }
}

@media (max-width: 500px) {
  .docs-main {
    padding: 16px 12px 40px;
  }
  .doc-toolbar {
    flex-wrap: wrap;
  }
}