/* ═══════════════════════════════════════════════
   QuickStart Page — Document Reader
   Sol-hero Breadcrumb + Sticky Sidebar TOC + Paginated MD Content
   ═══════════════════════════════════════════════ */

.doc-page {
  padding-top: 72px;
  background: #F9FAFB;
  min-height: 100vh;
}

/* ═══ Header / Breadcrumbs (using sol-hero) ═══ */
/* Note: .sol-hero styles are in solution.css */

/* ═══ Layout: Sidebar + Content ═══ */
.doc-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px 80px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}

/* ═══ Sidebar / TOC (Light Theme - Fixed Visibility) ═══ */
.doc-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  padding-top: 24px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Collapsible TOC Toggle (mobile only) */
.doc-sidebar__toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  transition: all 0.2s ease;
}
.doc-sidebar__toggle:hover { background: #F9FAFB; border-color: #D1D5DB; }
.doc-sidebar__toggle-text { flex: 1; }
.doc-sidebar__toggle-icon { width: 20px; height: 20px; flex-shrink: 0; transition: transform 0.25s ease; color: #6B7280; }
.doc-sidebar__toggle--open .doc-sidebar__toggle-icon { transform: rotate(180deg); }

/* TOC collapsed state - ONLY active inside @media (max-width: 768px) */
/* Global default: always show TOC on PC */

.doc-sidebar::-webkit-scrollbar { width: 4px; }
.doc-sidebar::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 4px; }
.doc-sidebar::-webkit-scrollbar-track { background: transparent; }

.doc-toc {
  padding: 16px 0;
}

.doc-toc__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6B7280;
  margin-bottom: 12px;
  padding: 0 16px;
  border-bottom: 1px solid #E5E7EB;
  padding-bottom: 10px;
}

.doc-toc__item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-size: 13px;
  line-height: 1.5;
  color: #374151;
  padding: 8px 16px;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
  font-family: var(--font-body);
  margin-bottom: 1px;
  border-radius: 0 6px 6px 0;
  text-decoration: none;
}

.doc-toc__item:hover {
  color: #0284C7;
  background: #F0F9FF;
  border-left-color: #0284C7;
}

.doc-toc__item--active {
  color: #0284C7;
  border-left-color: #0284C7;
  background: #E0F2FE;
  font-weight: 600;
}

.doc-toc__item--h3 {
  padding-left: 28px;
  font-size: 12.5px;
  color: #6B7280;
}

.doc-toc__item--h3:hover {
  color: #0369A1;
  background: #F8FAFC;
}

/* ═══ Content Area ═══ */
.doc-content {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #E5E7EB;
  padding: 40px 48px;
  min-width: 0;
}

/* ═══ Page Navigation (Prev/Next) ═══ */
.doc-page-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  margin-bottom: 24px;
  background: #F8FAFC;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
}

.doc-page-nav--bottom {
  margin-bottom: 0;
  margin-top: 32px;
}

.doc-page-nav__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #0284C7;
  background: #fff;
  border: 1px solid #BAE6FD;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-body);
}

.doc-page-nav__btn:hover:not(:disabled) {
  background: #E0F2FE;
  border-color: #7DD3FC;
}

.doc-page-nav__btn:disabled {
  color: #9CA3AF;
  background: #F3F4F6;
  border-color: #E5E7EB;
  cursor: not-allowed;
}

.doc-page-nav__counter {
  font-size: 13px;
  font-weight: 600;
  color: #6B7280;
}

/* ═══ Section Pagination (hidden by default, shown one at a time) ═══ */
.doc-section {
  display: none;
  animation: fadeInSection 0.3s ease;
}

.doc-section--active {
  display: block;
}

@keyframes fadeInSection {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══ Markdown Body Styles (Light Theme) ═══ */
.markdown-body {
  color: #374151;
  font-size: 15px;
  line-height: 1.75;
}

.markdown-body h1 {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: #111827;
  margin-top: 32px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #E5E7EB;
  scroll-margin-top: 88px;
}

.markdown-body h2 {
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 700;
  color: #111827;
  margin-top: 36px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #E5E7EB;
  scroll-margin-top: 88px;
}

.markdown-body h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  margin-top: 28px;
  margin-bottom: 8px;
  scroll-margin-top: 88px;
}

.markdown-body h4, .markdown-body h5, .markdown-body h6 {
  font-weight: 700;
  color: #111827;
  margin-top: 24px;
  margin-bottom: 8px;
  scroll-margin-top: 88px;
}

.markdown-body p { margin-bottom: 16px; }

.markdown-body a {
  color: #0284C7;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.markdown-body a:hover { color: #0369A1; }

.markdown-body strong { color: #111827; font-weight: 700; }

.markdown-body ul, .markdown-body ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.markdown-body li { margin-bottom: 6px; }

/* Code Blocks */
.markdown-body pre {
  background: #1A1D24;
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 20px;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.markdown-body pre code {
  background: none;
  color: #E5E7EB;
  font-size: 13.5px;
  line-height: 1.6;
  padding: 0;
  border-radius: 0;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* Inline Code */
.markdown-body code {
  background: #F3F4F6;
  color: #B91C1C;
  font-size: 0.875em;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* Blockquotes */
.markdown-body blockquote {
  margin-bottom: 20px;
  padding: 16px 20px;
  border-left: 4px solid #0284C7;
  background: #EFF6FF;
  border-radius: 0 8px 8px 0;
  color: #374151;
}

.markdown-body blockquote p:last-child { margin-bottom: 0; }

/* Tables */
.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 14px;
}

.markdown-body th {
  background: #F3F4F6;
  font-weight: 600;
  color: #111827;
  text-align: left;
  padding: 10px 14px;
  border: 1px solid #E5E7EB;
  border-bottom: 2px solid #D1D5DB;
}

.markdown-body td {
  padding: 10px 14px;
  border: 1px solid #E5E7EB;
  color: #374151;
}

.markdown-body tr:hover td { background: #F9FAFB; }

/* Images */
.markdown-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  margin: 14px 0;
}

/* Horizontal Rule */
.markdown-body hr {
  border: none;
  border-top: 1px solid #E5E7EB;
  margin: 28px 0;
}

/* ═══ Responsive ═══ */
@media (max-width: 1024px) {
  .doc-layout {
    grid-template-columns: 220px 1fr;
    gap: 32px;
    padding: 0 24px 60px;
  }

  .doc-content {
    padding: 32px 28px;
  }
}

@media (max-width: 768px) {
  .doc-layout {
    grid-template-columns: 1fr;
    padding: 0 16px 40px;
  }

  .doc-sidebar {
    position: static;
    max-height: none;
    padding-top: 0;
    margin-bottom: 20px;
    border-radius: 8px;
  }

  /* Show toggle button on mobile */
  .doc-sidebar__toggle {
    display: flex;
  }

  /* TOC collapsed by default on mobile */
  .doc-toc--collapsed { display: none; }
  .doc-toc--collapsed.doc-toc--expanded { display: block; }

  .doc-content {
    padding: 24px 20px;
    border-radius: 8px;
  }

  .markdown-body h1 { font-size: 22px; }
  .markdown-body h2 { font-size: 18px; }
  .markdown-body h3 { font-size: 16px; }

  .doc-page-nav {
    flex-wrap: wrap;
    gap: 8px;
  }
}
