/* ============================================================
   xbrain Marketing Site — Documentation-specific Styles
   Loaded by: docs/*.html only (not index.html)
   Depends on: style.css (CSS variables must be loaded first)
   ============================================================ */

/* ----------------------------------------------------------
   1. Docs Layout — .docs-layout (sidebar + content grid)
   ---------------------------------------------------------- */
.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  min-height: calc(100vh - 64px); /* 64px = .xb-nav height */
  max-width: 1200px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }
}

/* ----------------------------------------------------------
   2. Sidebar — .sidebar
   ---------------------------------------------------------- */
.sidebar {
  background: #F9FAFB;
  border-right: 1px solid #E5E7EB;
  padding: 32px 20px;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.sidebar__section {
  margin-bottom: 28px;
}

.sidebar__section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6B7280;
  padding: 0 12px;
  margin: 0 0 8px;
}

.sidebar__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar__link {
  display: block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 14px;
  color: #374151;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
  border-left: 3px solid transparent;
}

.sidebar__link:hover {
  background: #F3F4F6;
  color: #111827;
}

.sidebar__link.active {
  background: #EDE9FE;
  color: #7C3AED;
  font-weight: 600;
  border-left-color: #7C3AED;
}

/* ----------------------------------------------------------
   3. Docs Content — .docs-content
   ---------------------------------------------------------- */
.docs-content {
  padding: 48px;
  max-width: 800px;
  width: 100%;
}

@media (max-width: 768px) {
  .docs-content {
    padding: 24px 20px;
    max-width: 100%;
  }
}

.docs-content h1 {
  font-size: 2.25rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
  margin: 0 0 16px;
  letter-spacing: -0.025em;
}

.docs-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  padding-top: 40px;
  padding-bottom: 12px;
  border-bottom: 1px solid #E5E7EB;
  margin-bottom: 20px;
}

.docs-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin: 28px 0 12px;
}

.docs-content h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #374151;
  margin: 20px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.docs-content p {
  color: #374151;
  line-height: 1.7;
  margin: 0 0 16px;
}

.docs-content a {
  color: #7C3AED;
  text-decoration: none;
}

.docs-content a:hover {
  text-decoration: underline;
}

.docs-content ul,
.docs-content ol {
  color: #374151;
  line-height: 1.7;
  margin: 0 0 16px;
  padding-left: 24px;
}

.docs-content li {
  margin-bottom: 6px;
}

/* ----------------------------------------------------------
   4. Code Blocks — .code-block + inline code
   ---------------------------------------------------------- */
.code-block {
  background: #1F2937;
  color: #F9FAFB;
  border-radius: 8px;
  padding: 20px 24px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 20px 0;
  position: relative;
}

.code-block__label {
  display: block;
  font-size: 11px;
  color: #9CA3AF;
  margin-bottom: 12px;
  font-family: system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

pre.code-block {
  margin: 20px 0;
  white-space: pre;
}

code {
  background: #F3F4F6;
  color: #7C3AED;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: 'Courier New', Courier, monospace;
}

.code-block code {
  background: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
}

/* ----------------------------------------------------------
   5. Breadcrumbs — .breadcrumb
   ---------------------------------------------------------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #6B7280;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumb__link {
  color: #6B7280;
  text-decoration: none;
  transition: color 120ms ease;
}

.breadcrumb__link:hover {
  color: #7C3AED;
}

.breadcrumb__separator {
  color: #D1D5DB;
  font-size: 12px;
  user-select: none;
}

.breadcrumb__current {
  color: #111827;
  font-weight: 500;
}

/* ----------------------------------------------------------
   6. Callout Boxes — .callout, .callout--info, .callout--warning
   ---------------------------------------------------------- */
.callout {
  border-left: 4px solid #D1D5DB;
  background: #F9FAFB;
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  font-size: 0.9375rem;
}

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

.callout__title {
  font-weight: 700;
  font-size: 0.875rem;
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.callout--info {
  border-left-color: #7C3AED;
  background: #EDE9FE;
}

.callout--info .callout__title {
  color: #5B21B6;
}

.callout--warning {
  border-left-color: #F59E0B;
  background: #FFFBEB;
}

.callout--warning .callout__title {
  color: #B45309;
}

.callout--tip {
  border-left-color: #10B981;
  background: #ECFDF5;
}

.callout--tip .callout__title {
  color: #065F46;
}

/* ----------------------------------------------------------
   7. Tables — .docs-table
   ---------------------------------------------------------- */
.docs-table {
  border-collapse: collapse;
  width: 100%;
  margin: 20px 0;
  font-size: 14px;
}

.docs-table th {
  background: #F9FAFB;
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6B7280;
  border-bottom: 2px solid #E5E7EB;
}

.docs-table td {
  padding: 12px 16px;
  border-top: 1px solid #E5E7EB;
  color: #374151;
  vertical-align: top;
}

.docs-table tr:hover td {
  background: #F9FAFB;
}

/* ----------------------------------------------------------
   8. Page Meta — .docs-meta (last updated, reading time)
   ---------------------------------------------------------- */
.docs-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #6B7280;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #E5E7EB;
  flex-wrap: wrap;
}

.docs-meta__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #EDE9FE;
  color: #5B21B6;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
