/* ───────────────────────────────────────────────────────────────────────────
   routeur.ai docs — shared styles
   Tokens and Tailwind setup live in /js/docs.js (loaded before the CDN).
   This file is just the component classes consumed by sidebar + content.
   ─────────────────────────────────────────────────────────────────────────── */

html, body { background: #0a0a0f; color: #e7e9ee; }
[x-cloak] { display: none !important; }

/* Monospaced keycap (used in the ⌘K search affordance) */
.kbd {
  font-family: 'Reddit Mono', ui-monospace, monospace;
  font-size: 11px;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom-width: 2px;
  border-radius: 6px;
  color: #cbd0db;
  background: rgba(255, 255, 255, 0.04);
}

/* Sidebar disclosure styling — works for both top-level sections
   and the nested resource groups (Routes, Models, Traces…). */
.disc summary { list-style: none; cursor: pointer; }
.disc summary::-webkit-details-marker { display: none; }
.disc > summary .chev { transition: transform 150ms ease; }
.disc[open] > summary .chev { transform: rotate(90deg); }

.nav-link[data-active="true"] {
  color: #fff;
  background: rgba(167, 139, 250, 0.10);
  border-left-color: #a78bfa;
}

.toc a[data-active="true"] { color: #fff; border-color: #a78bfa; }

/* Article prose defaults (guide pages). Selectors scoped to direct children
   so they don't override the inline Tailwind utilities used inside cards,
   callouts, params, code panels, and prev/next nav blocks. */
.prose-block > p { color: #9aa0ad; line-height: 1.75; font-size: 15px; margin-top: 16px; }
.prose-block > h2 { color: #fff; font-size: 20px; font-weight: 600; margin-top: 48px; letter-spacing: -0.01em; }
.prose-block > h3 { color: #fff; font-size: 16px; font-weight: 600; margin-top: 32px; }
.prose-block > ul, .prose-block > ol { color: #9aa0ad; line-height: 1.75; font-size: 15px; padding-left: 1.5em; margin-top: 12px; }
.prose-block > ul { list-style: disc; }
.prose-block > ol { list-style: decimal; }
.prose-block > ul > li, .prose-block > ol > li { margin-top: 6px; }
.prose-block > ul > li::marker, .prose-block > ol > li::marker { color: #6b7180; }
.prose-block > p a, .prose-block > ul a, .prose-block > ol a { color: #a78bfa; }
.prose-block > p a:hover, .prose-block > ul a:hover, .prose-block > ol a:hover { text-decoration: underline; }
.prose-block > p strong, .prose-block > ul strong, .prose-block > ol strong { color: #e7e9ee; font-weight: 600; }
.prose-block > p :not(pre) > code,
.prose-block > ul :not(pre) > code,
.prose-block > ol :not(pre) > code {
  font-family: 'Reddit Mono', ui-monospace, monospace;
  font-size: 13px;
  background: rgba(167, 139, 250, 0.10);
  color: #a78bfa;
  padding: 2px 6px;
  border-radius: 4px;
}
/* Bare fenced code blocks rendered from markdown (outside the codetabs /
   response directives, which provide their own chrome). */
.prose-block > pre {
  margin-top: 16px;
  background: #0b0c12;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 16px;
  font-family: 'Reddit Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(231, 233, 238, 0.9);
  overflow-x: auto;
}
.prose-block > pre code { background: transparent; padding: 0; color: inherit; font-size: inherit; }

/* Inline code pills inside API reference prose blocks (lede, parameter
   descriptions, Returns body). Mirrors the violet pill used inline on the
   original hand-built pages. */
.prose-lede :not(pre) > code,
.prose-returns :not(pre) > code,
.prose-inline :not(pre) > code {
  font-family: 'Reddit Mono', ui-monospace, monospace;
  font-size: 12px;
  background: rgba(167, 139, 250, 0.10);
  color: #a78bfa;
  padding: 2px 6px;
  border-radius: 4px;
}
.prose-lede a,
.prose-returns a,
.prose-inline a { color: #a78bfa; }
.prose-lede a:hover,
.prose-returns a:hover,
.prose-inline a:hover { text-decoration: underline; }
/* Callout body content rendered from markdown — undo the default top-margin
   so the first paragraph hugs the badge. */
.prose-callout > :first-child { margin-top: 0; }

/* Anchored headings — hovering reveals a '#' that copies a link to the
   section. Applied automatically by docs.js to every h2/h3/h4 in <main>. */
main :is(h1, h2, h3, h4) { scroll-margin-top: 80px; }
.heading-anchor {
  position: relative;
  display: inline-block;
  margin-left: 0.4em;
  color: #6b7180;
  font-weight: 400;
  text-decoration: none;
  opacity: 0;
  transition: opacity 120ms ease, color 120ms ease;
}
:is(h1, h2, h3, h4):hover > .heading-anchor,
.heading-anchor:focus-visible,
.heading-anchor.copied { opacity: 1; }
.heading-anchor:hover { color: #a78bfa; }

/* 'Copied ✓' toast that appears next to the '#' after a click. */
.heading-toast {
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Reddit Sans', ui-sans-serif, system-ui;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #e7e9ee;
  background: #13141c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease, transform 140ms ease;
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.6);
}
.heading-toast svg { color: #34d399; flex: none; }
.heading-anchor.copied .heading-toast {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* 'Copied ✓' toast on clipboard buttons (code panels, API reference). Same
   visual treatment as .heading-toast, but anchored to the left of the
   button since copy buttons sit on the right edge of panel headers. */
.copy-btn { position: relative; }
.copy-toast {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%) translateX(4px);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Reddit Sans', ui-sans-serif, system-ui;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #e7e9ee;
  background: #13141c;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease, transform 140ms ease;
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.6);
}
.copy-toast svg { color: #34d399; flex: none; }
.copy-btn.copied .copy-toast {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Subtle scrollbar styling for the side rails */
.scroll-area::-webkit-scrollbar { width: 10px; height: 10px; }
.scroll-area::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
}

/* HTTP method badges. .sm for sidebar use, .lg for the endpoint header. */
.method {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Reddit Mono', ui-monospace, monospace;
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 6px;
  border: 1px solid transparent; line-height: 1;
}
.method.sm { font-size: 9px;    padding: 2px 5px;  border-radius: 5px; }
.method.lg { font-size: 11.5px; padding: 5px 10px; border-radius: 7px; }

.method-get    { color: #7dd3fc; background: rgba(125, 211, 252, 0.08); border-color: rgba(125, 211, 252, 0.22); }
.method-post   { color: #c4b5fd; background: rgba(167, 139, 250, 0.12); border-color: rgba(167, 139, 250, 0.28); }
.method-put    { color: #fcd34d; background: rgba(251, 191, 36,  0.09); border-color: rgba(251, 191, 36,  0.22); }
.method-patch  { color: #6ee7b7; background: rgba(52,  211, 153, 0.08); border-color: rgba(52,  211, 153, 0.22); }
.method-delete { color: #fda4af; background: rgba(251, 113, 133, 0.09); border-color: rgba(251, 113, 133, 0.22); }
.method-head   { color: #b4bac6; background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.13); }

/* Parameter rows in reference panels */
.param-row + .param-row { border-top: 1px solid rgba(255, 255, 255, 0.06); }

/* highlight.js token colours — mirror our JSON colouring (cyan keys,
   amber strings) so SDK code samples match the API reference panels. */
.hljs { background: transparent; color: rgba(231,233,238,0.9); }
.hljs-comment, .hljs-quote { color: #6b7180; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-meta-keyword { color: #a78bfa; }
.hljs-built_in, .hljs-type, .hljs-class .hljs-title, .hljs-title.class_ { color: #c4b5fd; }
.hljs-string, .hljs-template-string, .hljs-regexp, .hljs-link { color: #fbbf24; }
.hljs-number { color: #f0a868; }
.hljs-attr, .hljs-attribute, .hljs-property { color: #67e8f9; }
.hljs-title, .hljs-name, .hljs-function .hljs-title, .hljs-title.function_ { color: #67e8f9; }
.hljs-tag, .hljs-meta { color: #94a3b8; }
.hljs-params { color: rgba(231,233,238,0.9); }
.hljs-variable, .hljs-symbol, .hljs-bullet { color: #c4b5fd; }
.hljs-deletion { color: #fb7185; }
.hljs-addition { color: #4ade80; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 600; }

/* Code panel auto-wrapped by docs.js around bare <pre><code> blocks in
   prose. Tail this rule to undo the .prose-block > pre default so the
   panel's own border/background takes over. */
.code-panel > pre { margin: 0 !important; border: 0 !important; background: transparent !important; padding: 16px !important; border-radius: 0 !important; }
