/* ═══════════════════ DOCS LAYOUT ═══════════════════ */

.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  padding-top: 60px;
}

/* ═══════════════════ SIDEBAR ═══════════════════ */

.docs-sidebar {
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 32px 24px;
  background: var(--bg);
}

.docs-sidebar-home {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
  transition: color 0.15s;
}
.docs-sidebar-home:hover { color: var(--text); }

.docs-sidebar-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-mid);
  margin-bottom: 12px;
  margin-top: 24px;
}

.docs-sidebar-title:first-of-type {
  margin-top: 0;
}

.docs-sidebar nav a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  margin-bottom: 2px;
}

.docs-sidebar nav a:hover {
  color: var(--text);
  background: var(--accent-glow);
}

.docs-sidebar nav a.active {
  color: var(--accent);
  background: var(--accent-glow);
  font-weight: 600;
}

/* ═══════════════════ MOBILE SIDEBAR TOGGLE ═══════════════════ */

.docs-menu-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  line-height: 1;
}

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

/* ═══════════════════ CONTENT AREA ═══════════════════ */

.docs-content {
  max-width: 800px;
  padding: 48px 48px 96px;
}

.docs-content h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.025em;
}

.docs-content h2 {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 56px;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.docs-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.docs-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 40px;
  margin-bottom: 12px;
}

.docs-content h4 {
  font-size: 17px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 10px;
}

.docs-content p {
  color: var(--text-mid);
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 20px;
}

.docs-content > p:first-of-type {
  font-size: 19px;
  color: var(--text);
}

.docs-content strong {
  color: var(--text);
  font-weight: 600;
}

.docs-content a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}
.docs-content a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ═══════════════════ LISTS ═══════════════════ */

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

.docs-content li {
  color: var(--text-mid);
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 8px;
}

.docs-content li strong {
  color: var(--text);
}

/* ═══════════════════ CODE BLOCKS ═══════════════════ */

.docs-content code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
  font-size: 0.88em;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--text);
}

.docs-content pre {
  background: #0d0d0d;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  overflow-x: auto;
  margin-bottom: 24px;
  line-height: 1.6;
}

[data-theme="light"] .docs-content pre {
  background: #1e1e2e;
}

.docs-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 14px;
  color: #e5e5e5;
}

/* ═══════════════════ TABLES ═══════════════════ */

.docs-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 15px;
}

.docs-content thead th {
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-mid);
  padding: 12px 16px;
  border-bottom: 2px solid var(--border);
}

.docs-content tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-mid);
  vertical-align: top;
}

.docs-content tbody tr:last-child td {
  border-bottom: none;
}

.docs-content tbody td:first-child {
  color: var(--text);
  font-weight: 500;
}

/* ═══════════════════ CALLOUT BOXES ═══════════════════ */

.docs-callout {
  padding: 20px 24px;
  border-radius: 8px;
  margin-bottom: 24px;
  border-left: 3px solid var(--accent);
  background: var(--accent-glow);
}

.docs-callout p {
  color: var(--text);
  margin-bottom: 0;
  font-size: 15px;
}

.docs-callout-warn {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

/* ═══════════════════ CARDS GRID ═══════════════════ */

.docs-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.docs-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}

.docs-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.docs-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--text);
}

.docs-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ═══════════════════ PROFILE CARDS ═══════════════════ */

.docs-profile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 24px;
}

.docs-profile h3 {
  margin-top: 0;
}

.docs-profile-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.docs-profile-meta span {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-inset);
  padding: 4px 12px;
  border-radius: 4px;
}

/* ═══════════════════ ENDPOINT BLOCKS ═══════════════════ */

.docs-endpoint {
  margin-bottom: 48px;
}

.docs-method {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 4px;
  margin-right: 10px;
}

.docs-method-post {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.docs-method-get {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.docs-path {
  font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

/* ═══════════════════ CHANGELOG ═══════════════════ */

.docs-changelog-entry {
  margin-bottom: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.docs-changelog-entry:last-child {
  border-bottom: none;
}

.docs-changelog-date {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.docs-changelog-version {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}

/* ═══════════════════ RESPONSIVE ═══════════════════ */

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

  .docs-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    z-index: 150;
    padding-top: 80px;
    transition: left 0.25s ease;
    box-shadow: none;
  }

  .docs-sidebar.open {
    left: 0;
    box-shadow: 8px 0 32px rgba(0,0,0,0.3);
  }

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

  .docs-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .docs-content {
    padding: 32px 20px 96px;
  }
}

@media (max-width: 480px) {
  .docs-content h1 {
    font-size: 26px;
  }

  .docs-content pre {
    padding: 14px 16px;
    font-size: 13px;
  }

  .docs-content table {
    font-size: 13px;
  }

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

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

  .docs-profile-meta {
    flex-direction: column;
    gap: 8px;
  }
}
