/* AeroFTP Documentation — Custom Theme
   Branding + Enhanced Sidebar UX */

:root {
  --aero-blue: #3b82f6;
  --aero-blue-light: #60a5fa;
  --aero-blue-glow: rgba(59, 130, 246, 0.15);
  --sidebar-bg: #0f1629;
  --sidebar-section-bg: rgba(255, 255, 255, 0.03);
  --sidebar-hover: rgba(59, 130, 246, 0.12);
  --sidebar-active: rgba(59, 130, 246, 0.2);
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-text: #94a3b8;
  --sidebar-text-hover: #e2e8f0;
  --sidebar-text-active: #ffffff;
  --sidebar-section-text: #64748b;
}

/* ── Logo in sidebar header (injected via JS) ── */
.sidebar-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 12px;
  margin-bottom: 4px;
}

.sidebar-logo img {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
}

.sidebar-logo span {
  font-size: 18px;
  font-weight: 700;
  color: #e2e8f0;
  letter-spacing: 0.5px;
}

/* ── Sidebar base ── */
.sidebar,
.sidebar .sidebar-scrollbox {
  background-color: var(--sidebar-bg);
}

.sidebar {
  border-right: none;
}

/* ── Section titles (# headers in SUMMARY.md) ── */
.sidebar ol.chapter li.part-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--sidebar-section-text);
  padding: 16px 16px 6px;
  margin-top: 4px;
  border-top: 1px solid var(--sidebar-border);
  pointer-events: none;
}

.sidebar ol.chapter li.part-title:first-child {
  border-top: none;
}

/* ── Spacer (--- in SUMMARY.md) ── */
.sidebar ol.chapter li.spacer {
  height: 1px;
  background-color: var(--sidebar-border);
  margin: 8px 16px;
}

/* ── Chapter links ── */
.sidebar ol.chapter li a,
.sidebar ol.chapter li > a {
  display: block;
  color: var(--sidebar-text);
  padding: 8px 16px;
  margin: 1px 8px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}

.sidebar ol.chapter li a:hover {
  color: var(--sidebar-text-hover);
  background-color: var(--sidebar-hover);
  border-left-color: var(--aero-blue);
}

.sidebar ol.chapter li a.active,
.sidebar ol.chapter li.active > a {
  color: var(--sidebar-text-active);
  background-color: var(--sidebar-active);
  border-left-color: var(--aero-blue);
  font-weight: 600;
}

/* ── Nested items (sub-chapters) ── */
.sidebar ol.chapter li ol {
  padding-left: 0;
}

.sidebar ol.chapter li ol li a {
  padding-left: 32px;
  font-size: 13px;
}

.sidebar ol.chapter li ol li ol li a {
  padding-left: 48px;
  font-size: 12.5px;
}

/* ── Chapter numbers — hide default, show custom ── */
.sidebar ol.chapter li a .chapter-number {
  display: none;
}

/* ── Top menu bar ── */
.menu-bar,
.menu-bar.sticky {
  background-color: #0d1117;
  border-bottom: 1px solid var(--sidebar-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.menu-bar .icon-button {
  color: var(--sidebar-text);
  transition: color 0.15s ease;
}

.menu-bar .icon-button:hover {
  color: var(--aero-blue-light);
}

.menu-bar h1,
.menu-bar .menu-title {
  color: #e2e8f0;
  font-weight: 600;
}

/* ── Content area ── */
.content {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 48px;
}

.content main {
  color: #c9d1d9;
}

.content main h1 {
  font-size: 2em;
  font-weight: 700;
  color: #f0f6fc;
  border-bottom: 2px solid var(--aero-blue);
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.content main h2 {
  font-size: 1.5em;
  font-weight: 600;
  color: #e2e8f0;
  margin-top: 36px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--sidebar-border);
}

.content main h3 {
  font-size: 1.2em;
  font-weight: 600;
  color: #d1d9e0;
  margin-top: 24px;
}

/* ── Links ── */
.content a {
  color: var(--aero-blue);
  text-decoration: none;
  transition: color 0.15s ease;
}

.content a:hover {
  color: var(--aero-blue-light);
  text-decoration: underline;
}

/* ── Code blocks ── */
.content pre {
  background-color: #161b22 !important;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 16px;
}

.content code {
  font-size: 0.9em;
}

.content p > code,
.content li > code,
.content td > code {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--aero-blue-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}

/* ── Tables ── */
.content table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
}

.content table th {
  background-color: rgba(59, 130, 246, 0.1);
  color: #e2e8f0;
  font-weight: 600;
  padding: 10px 16px;
  text-align: left;
  border-bottom: 2px solid var(--aero-blue);
}

.content table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--sidebar-border);
  color: #c9d1d9;
}

.content table tr:hover td {
  background-color: rgba(59, 130, 246, 0.05);
}

/* ── Blockquotes (tip/warning boxes) ── */
.content blockquote {
  border-left: 4px solid var(--aero-blue);
  background-color: var(--aero-blue-glow);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
  color: #c9d1d9;
}

/* ── Navigation arrows ── */
.nav-chapters {
  color: var(--sidebar-text);
  transition: color 0.15s ease;
}

.nav-chapters:hover {
  color: var(--aero-blue-light);
}

/* ── Page background ── */
.page-wrapper {
  background-color: #0d1117;
}

/* ── Scrollbar styling ── */
.sidebar .sidebar-scrollbox::-webkit-scrollbar {
  width: 6px;
}

.sidebar .sidebar-scrollbox::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar .sidebar-scrollbox::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.sidebar .sidebar-scrollbox::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .content {
    padding: 16px 20px;
  }
}
