/* ═══════════════════════════════════════════
   Flowing Website — Documentation Styles
   ═══════════════════════════════════════════ */

/* ── Sidebar ── */

/* ── Docs Top Navbar ── */

.docs-navbar {
  background-color: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.docs-sidebar {
  position: fixed;
  top: 64px;
  left: 0;
  bottom: 0;
  width: 280px;
  overflow-y: auto;
  background: #0a0a0a;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 24px 0;
  z-index: 40;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}

.sidebar-section {
  margin-bottom: 8px;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  user-select: none;
}

.sidebar-section-title:hover {
  color: rgba(255, 255, 255, 0.6);
}

.sidebar-section-title .chevron {
  transition: transform 0.2s;
  font-size: 10px;
}

.sidebar-section-title .chevron.open {
  transform: rotate(90deg);
}

.sidebar-links {
  overflow: hidden;
}

.sidebar-link {
  display: block;
  padding: 6px 20px 6px 28px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.50);
  transition: all 0.15s;
  border-left: 2px solid transparent;
}

.sidebar-link:hover {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-link.active {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.08);
  border-left-color: #3b82f6;
}

/* ── Main Content ── */

.docs-content {
  margin-left: 280px;
  max-width: 960px;
  padding: 104px 60px 80px;
}

/* ── Headings ── */

.docs-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: white;
}

.docs-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 56px;
  margin-bottom: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: white;
}

.docs-content h2:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}

.docs-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.9);
}

/* ── Paragraphs ── */

.docs-content p {
  color: rgba(255, 255, 255, 0.60);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 16px;
}

/* ── Code Blocks ── */

.docs-content pre {
  position: relative;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 20px 24px;
  overflow-x: auto;
  margin: 16px 0 24px;
  font-family: var(--font-code);
  font-size: 13px;
  line-height: 1.7;
}

.docs-content pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  color: #e6edf3;
}

/* ── Inline Code ── */

.docs-content code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.875em;
  color: #e2e8f0;
  font-family: var(--font-code);
}

/* ── Tables ── */

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}

.docs-content thead th {
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.docs-content tbody td {
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: top;
}

.docs-content tbody td code {
  font-size: 12px;
}

.docs-content tbody tr:hover {
  background: rgba(255, 255, 255, 0.015);
}

/* ── Lists ── */

.docs-content ul, .docs-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.docs-content li {
  color: rgba(255, 255, 255, 0.60);
  font-size: 15px;
  line-height: 1.75;
  margin-bottom: 6px;
}

/* ── Diagram Results ── */

.docs-diagram {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  margin: 16px 0 24px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.docs-diagram img {
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* ── Callout/Tip Box ── */

.docs-tip {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 16px 0 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.docs-tip strong {
  color: #60a5fa;
}

/* ── Copy Button ── */

.docs-content .copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 6px;
  padding: 3px 10px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-body);
}

.docs-content .copy-btn:hover {
  background: rgba(255, 255, 255, 0.10);
  color: white;
}

/* ── Mobile Sidebar Toggle ── */

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 76px;
  left: 12px;
  z-index: 45;
  width: 40px;
  height: 40px;
  background: rgba(10, 10, 10, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  color: white;
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 35;
}

/* ── Export Showcase Tabs ── */

.export-tab {
  padding: 6px 18px;
  border-radius: 9999px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  background: none;
  font-family: var(--font-code);
}

.export-tab:hover {
  color: rgba(255, 255, 255, 0.8);
}

.export-tab.active {
  color: white;
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
}

.export-panel {
  display: none;
}

.export-panel.active {
  display: block;
}

.docs-export-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 20px;
  align-items: start;
}

.docs-export-img {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.docs-export-img img {
  max-width: 100%;
  height: auto;
}

.docs-export-img-light {
  background: #f0f0f0;
  background-image: repeating-conic-gradient(#e0e0e0 0% 25%, #f0f0f0 0% 50%);
  background-size: 16px 16px;
}

.docs-export-info {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 20px;
}

.docs-export-info pre {
  margin: 8px 0 12px !important;
  padding: 12px 16px !important;
  font-size: 12px !important;
}

.docs-export-info ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.docs-export-info li {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 4px;
}

/* ── Responsive ── */

@media (max-width: 767px) {
  .sidebar-toggle {
    display: flex;
  }

  .docs-sidebar {
    transform: translateX(-100%);
  }

  .docs-sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.open {
    display: block;
  }

  .docs-sidebar {
    top: 64px;
  }

  .docs-content {
    margin-left: 0;
    padding: 100px 16px 60px;
  }

  .docs-content h1 {
    font-size: 1.5rem;
  }

  .docs-content h2 {
    font-size: 1.15rem;
    margin-top: 40px;
  }

  .docs-content h3 {
    font-size: 1rem;
  }

  .docs-content pre {
    padding: 12px 14px;
    font-size: 11px;
    border-radius: 8px;
    line-height: 1.6;
  }

  .docs-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 12px;
  }

  .docs-content thead th,
  .docs-content tbody td {
    padding: 8px 10px;
  }

  .docs-diagram {
    padding: 12px;
    margin: 12px 0 20px;
  }

  .docs-tip {
    padding: 12px 14px;
    font-size: 13px;
  }

  .docs-export-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-toggle {
    top: 72px;
    left: 8px;
  }
}
