/* Documentation Specific Layout */

.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr 220px;
  gap: 2.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 6.5rem 1.5rem 4rem 1.5rem;
}

@media (max-width: 1024px) {
  .docs-layout {
    grid-template-columns: 240px 1fr;
  }
  .docs-toc {
    display: none;
  }
}

@media (max-width: 768px) {
  .docs-layout {
    grid-template-columns: 1fr;
    padding-top: 5.5rem;
  }
  .docs-sidebar {
    position: relative !important;
    top: 0 !important;
    height: auto !important;
    border-right: none !important;
    padding-right: 0 !important;
    margin-bottom: 2rem;
  }
}

/* Sidebar navigation */
.docs-sidebar {
  position: sticky;
  top: 6.5rem;
  height: calc(100vh - 8rem);
  overflow-y: auto;
  padding-right: 1.5rem;
  border-right: 1px solid var(--border-color);
}

.sidebar-section {
  margin-bottom: 1.75rem;
}

.sidebar-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-link {
  display: block;
  font-size: 0.92rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}

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

.sidebar-link.active {
  color: var(--accent-color);
  background: rgba(249, 115, 22, 0.05);
  border-left-color: var(--accent-color);
  font-weight: 500;
}

/* Main Content Area */
.docs-content {
  min-width: 0; /* Prevents code blocks from expanding grid */
}

.docs-content h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.docs-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

.docs-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

.docs-content p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 1.02rem;
}

.docs-content code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.88rem;
  color: #fb7185; /* soft rose */
}

/* Code Blocks */
.docs-content pre {
  background: #0d0d10;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.25rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  position: relative;
}

.docs-content pre code {
  background: none !important;
  border: none !important;
  padding: 0 !important;
  font-size: 0.88rem;
  color: var(--text-primary) !important;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 0.75rem;
}

.docs-copy-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: var(--font-sans);
  cursor: pointer;
}

.docs-copy-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* Alert blocks (like GitHub style) */
.alert {
  padding: 1rem 1.25rem;
  border-left: 4px solid transparent;
  border-radius: 0 8px 8px 0;
  margin-bottom: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
}

.alert-title {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.alert-note {
  border-left-color: #3b82f6; /* blue */
  background: rgba(59, 130, 246, 0.03);
}
.alert-note .alert-title { color: #3b82f6; }

.alert-warning {
  border-left-color: #eab308; /* yellow */
  background: rgba(234, 179, 8, 0.03);
}
.alert-warning .alert-title { color: #eab308; }

.alert-important {
  border-left-color: #ec4899; /* pink/accent */
  background: rgba(236, 72, 153, 0.03);
}
.alert-important .alert-title { color: #ec4899; }

/* Table of Contents (Right Sidebar) */
.docs-toc {
  position: sticky;
  top: 6.5rem;
  height: calc(100vh - 8rem);
  overflow-y: auto;
}

.toc-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.toc-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toc-link {
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
}

.toc-link:hover {
  color: var(--text-primary);
}
