/* ─────────────────────────────────────────────────────────────
   docs.css — estilos específicos da página /docs.html
   Layout 3 colunas (sidebar nav + conteúdo + TOC). Reaproveita
   variáveis e tokens de styles.css.
   ────────────────────────────────────────────────────────────── */

.docs-body { background: var(--bg); }

/* ─── Layout ─────────────────────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 220px;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 24px 80px;
  align-items: start;
}

@media (max-width: 1100px) {
  .docs-layout { grid-template-columns: 220px minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 760px) {
  .docs-layout { grid-template-columns: 1fr; padding: 16px 16px 60px; }
  .docs-sidebar { position: static; max-height: none; }
}

/* ─── Sidebar esquerda ───────────────────────────────────────── */
.docs-sidebar {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  font-size: 0.92rem;
  padding-right: 8px;
}
.docs-sidebar::-webkit-scrollbar { width: 6px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.docs-search {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9rem;
  background: var(--surface);
  margin-bottom: 18px;
  font-family: inherit;
}
.docs-search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(212,175,55,0.18); }

.docs-nav-group { margin-bottom: 22px; }
.docs-nav-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 8px;
  padding-left: 4px;
}
.docs-sidebar nav a {
  display: block;
  padding: 5px 10px;
  margin: 1px 0;
  border-radius: 6px;
  color: var(--text-dim);
  transition: background 0.12s, color 0.12s;
  line-height: 1.4;
}
.docs-sidebar nav a:hover { background: var(--surface-2); color: var(--text); }
.docs-sidebar nav a.active {
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 600;
}

/* ─── Conteúdo principal ─────────────────────────────────────── */
.docs-content {
  min-width: 0; /* permite flex wrap em pre/table */
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--text);
}
.docs-content section { scroll-margin-top: 92px; padding: 24px 0 32px; }
.docs-content section + section { border-top: 1px solid var(--border); }

.docs-eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--brand-600);
  background: var(--brand-50);
  border-radius: 4px;
  padding: 3px 9px;
  margin-bottom: 14px;
}

.docs-content h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 8px 0 12px;
}
.docs-content h2 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 28px 0 12px;
}
.docs-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 22px 0 10px;
  color: var(--text);
}
.docs-content p { margin: 0 0 12px; }
.docs-content p.docs-lead { font-size: 1.05rem; color: var(--text-dim); max-width: 70ch; }

.docs-content code {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.875em;
  background: var(--surface-2);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--brand-700);
}
.docs-content a { color: var(--brand-600); text-decoration: underline; text-underline-offset: 2px; }
.docs-content a:hover { color: var(--brand-700); }

.docs-content ul, .docs-content ol {
  margin: 0 0 16px 20px;
  padding: 0;
}
.docs-content ul li, .docs-content ol li { margin: 4px 0; }
.docs-num li { list-style: decimal; }

/* ─── Cards de "Começar" ─────────────────────────────────────── */
.docs-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 18px 0 28px;
}
.docs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.docs-card-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.docs-card code { display: block; word-break: break-all; }
.docs-card-desc { font-size: 0.85rem; color: var(--text-dim); margin: 8px 0 0; }

/* ─── Tabelas ────────────────────────────────────────────────── */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 20px;
  font-size: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.docs-table th, .docs-table td {
  text-align: left;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.docs-table thead th {
  background: var(--surface-2);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}
.docs-table tbody tr:last-child td { border-bottom: 0; }
.docs-table code { background: transparent; padding: 0; border: 0; color: var(--brand-700); }

/* ─── Endpoint header ────────────────────────────────────────── */
.docs-endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.docs-endpoint .docs-path {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 0.92rem;
  color: var(--text);
  background: transparent;
  border: 0;
  padding: 0;
  flex: 1;
  word-break: break-all;
}
.docs-tag {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* ─── Pílulas HTTP method ────────────────────────────────────── */
.docs-method {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 5px;
  color: #fff;
  min-width: 56px;
  text-align: center;
}
.docs-method.get   { background: #047857; }      /* emerald-700 */
.docs-method.post  { background: #1d4ed8; }      /* blue-700 */
.docs-method.patch { background: #b45309; }      /* amber-700 */
.docs-method.put   { background: #7c3aed; }      /* violet-600 */
.docs-method.del   { background: #b91c1c; }      /* red-700 */

.docs-list { list-style: none !important; margin-left: 0 !important; padding: 0 !important; }
.docs-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.docs-list li:last-child { border-bottom: 0; }

/* ─── Code blocks ────────────────────────────────────────────── */
.docs-content pre {
  position: relative;
  background: #1e1e2e !important;
  color: #f8f8f2;
  border: 1px solid #313244;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 12px 0 18px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.55;
}
.docs-content pre code {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
  font-family: 'JetBrains Mono', monospace !important;
}
.docs-content pre::-webkit-scrollbar { height: 6px; }
.docs-content pre::-webkit-scrollbar-thumb { background: #45475a; border-radius: 3px; }

.docs-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #313244;
  color: #cdd6f4;
  border: 1px solid #45475a;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  font-family: inherit;
}
.docs-content pre:hover .docs-copy { opacity: 1; }
.docs-copy:hover { background: #45475a; }

/* ─── Callouts ───────────────────────────────────────────────── */
.docs-callout {
  border-left: 3px solid var(--brand);
  background: var(--brand-50);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 14px 0 18px;
  font-size: 0.92rem;
  color: var(--text);
}
.docs-callout-info {
  border-left-color: #2563eb;
  background: #eff6ff;
}
.docs-callout ul { margin: 6px 0 0 20px; }

/* ─── TOC direita ────────────────────────────────────────────── */
.docs-toc {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  font-size: 0.85rem;
  padding-left: 12px;
  border-left: 1px solid var(--border);
}
.docs-toc-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.docs-toc ol { list-style: none; padding: 0; margin: 0; }
.docs-toc li { margin: 4px 0; }
.docs-toc a {
  color: var(--text-dim);
  display: block;
  padding: 2px 0;
  line-height: 1.4;
}
.docs-toc a:hover { color: var(--text); }

/* ─── Footer da página ───────────────────────────────────────── */
.docs-footer {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-dim);
}
