/*
  File: www/developers/mcp/assets/mcp.css
  Purpose: "Connect Catavera to your AI assistant" (file 08 sec. 3b.5). The hero, quickstart strip, pills
           and theme switch come from the developer portal's ../../assets/portal.css (same look, dark by
           default, body.light for light); this file adds the scrolling document under them.
  Author: Brandon / AAU Solutions
  Created: 2026-10-10
*/

.doc-scroll { flex: 1; min-height: 0; overflow: auto; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { .doc-scroll { scroll-behavior: auto; } }

.doc {
  max-width: 1180px; margin: 0 auto; padding: 32px 48px 80px;
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px;
}

/* Table of contents */
.toc { position: sticky; top: 24px; align-self: start; font-size: 13px; }
.toc p { text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; font-weight: 700; color: var(--dp-text-muted); margin-bottom: 10px; }
.toc ol { list-style: none; border-left: 1px solid var(--dp-border); }
.toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--dp-text-muted); text-decoration: none; }
.toc li a:hover, .toc li a:focus-visible { color: var(--dp-text); border-left-color: var(--dp-accent); outline: none; }
.toc li.sub a { padding-left: 26px; font-size: 12px; }

/* Article */
.article { min-width: 0; line-height: 1.65; font-size: 15px; }
.article section { padding-top: 8px; margin-bottom: 44px; scroll-margin-top: 16px; }
.article h1 { font-size: 30px; line-height: 1.2; margin-bottom: 12px; letter-spacing: -0.01em; }
.article h2 { font-size: 22px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--dp-border); }
.article h3 { font-size: 17px; margin: 24px 0 8px; }
.article h4 { font-size: 13px; margin: 16px 0 6px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dp-text-muted); }
.article p, .article ul, .article ol { margin-bottom: 12px; color: var(--dp-text); }
.article ul, .article ol { padding-left: 22px; }
.article li { margin-bottom: 4px; }
.article a { color: var(--dp-accent); text-underline-offset: 2px; }
.article .lede { font-size: 17px; color: var(--dp-text-muted); }
.article code { font-family: ui-monospace, 'Cascadia Mono', Consolas, Menlo, monospace; font-size: 0.88em; background: var(--dp-surface-2); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--dp-text-muted); }

/* Code blocks with a copy button */
.code { position: relative; margin: 10px 0 16px; }
.code pre {
  background: var(--dp-surface); border: 1px solid var(--dp-border); border-radius: 8px;
  padding: 14px 16px; overflow-x: auto; font: 13px/1.55 ui-monospace, 'Cascadia Mono', Consolas, Menlo, monospace;
  color: var(--dp-text); white-space: pre;
}
.code .label { position: absolute; top: -9px; left: 12px; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; background: var(--dp-bg); color: var(--dp-text-muted); padding: 0 6px; }
.copy {
  position: absolute; top: 8px; right: 8px; font: 600 11px/1 var(--dp-font-sans);
  padding: 6px 9px; border-radius: 6px; cursor: pointer;
  background: var(--dp-surface-2); color: var(--dp-text-muted); border: 1px solid var(--dp-border);
}
.copy:hover, .copy:focus-visible { color: var(--dp-text); border-color: var(--dp-border-strong); outline: none; }

/* Server URL card */
.url-card {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--dp-surface); border: 1px solid var(--dp-border); border-radius: 10px; padding: 14px 16px; margin: 12px 0 16px;
}
.url-card code { font-size: 16px; background: none; padding: 0; color: var(--dp-text); word-break: break-all; }
.url-card .copy { position: static; }

/* Notes */
.note { border: 1px solid var(--dp-border); border-left: 3px solid var(--dp-accent); background: var(--dp-surface); border-radius: 8px; padding: 12px 14px; margin: 12px 0 16px; font-size: 14px; }
.note.warn { border-left-color: var(--dp-brand-2); }
.note strong { color: var(--dp-text); }

/* Client tabs */
.tabs { margin: 14px 0 18px; }
.tablist { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--dp-border); }
.tablist button {
  background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
  color: var(--dp-text-muted); font: 600 13px/1 var(--dp-font-sans); padding: 10px 12px; cursor: pointer;
}
.tablist button[aria-selected="true"] { color: var(--dp-text); border-bottom-color: var(--dp-accent); }
.tablist button:focus-visible { outline: 2px solid var(--dp-accent); outline-offset: -2px; }
.tabpanel { padding-top: 14px; }
.tabpanel[hidden] { display: none; }
.no-js .tabpanel[hidden] { display: block; }

/* Tool cards */
.tool { border: 1px solid var(--dp-border); border-radius: 12px; background: var(--dp-surface); padding: 18px 20px; margin: 16px 0 22px; }
.tool-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.tool-head h3 { margin: 0; font-family: ui-monospace, 'Cascadia Mono', Consolas, Menlo, monospace; font-size: 16px; }
.tool-head .title { color: var(--dp-text-muted); font-size: 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.tool details { margin-top: 8px; }
.tool summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--dp-accent); padding: 4px 0; }
.tool summary:focus-visible { outline: 2px solid var(--dp-accent); outline-offset: 2px; border-radius: 4px; }
.example-prompt { font-style: italic; color: var(--dp-text); border-left: 3px solid var(--dp-brand-2); padding: 4px 0 4px 12px; margin: 6px 0 10px; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 10px 0 16px; }
table.grid { border-collapse: collapse; width: 100%; font-size: 14px; }
table.grid th, table.grid td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--dp-border); vertical-align: top; }
table.grid th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dp-text-muted); font-weight: 700; }

.toc-details summary { list-style: none; cursor: default; text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; font-weight: 700; color: var(--dp-text-muted); margin-bottom: 10px; }
.toc-details summary::-webkit-details-marker { display: none; }
@media (max-width: 900px) {
  .doc { grid-template-columns: 1fr; padding: 20px 16px 60px; gap: 16px; }
  .toc { position: static; border: 1px solid var(--dp-border); border-radius: 10px; padding: 10px 14px; }
  .toc-details summary { cursor: pointer; margin-bottom: 0; }
  .toc-details summary::after { content: ' \25BE'; }
  .toc-details[open] summary { margin-bottom: 10px; }
}

/* Error reference (developers/errors/index.cfm) */
.err-focus { border: 1px solid var(--dp-accent); border-radius: 12px; padding: 16px 20px; margin: 18px 0 28px; background: color-mix(in srgb, var(--dp-accent) 6%, transparent); }
.err-kicker { text-transform: uppercase; letter-spacing: 0.08em; font-size: 11px; font-weight: 700; color: var(--dp-text-muted); margin: 0 0 4px; }
.err-focus h2 { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.err-http { font-size: 13px; font-weight: 600; color: var(--dp-text-muted); }
.err-title { font-weight: 600; margin: 6px 0 10px; }
.err-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.err-dl dt { font-weight: 700; color: var(--dp-text-muted); }
.err-dl dd { margin: 0; }
.err-row-focus td { background: color-mix(in srgb, var(--dp-accent) 8%, transparent); }
.err-unknown { padding: 10px 14px; border: 1px dashed var(--dp-border); border-radius: 10px; }
@media (max-width: 600px) { .err-dl { grid-template-columns: 1fr; } }
.doc.doc-single { grid-template-columns: minmax(0, 1fr); max-width: 72rem; }

/* Breadcrumbs and the "Related" block (developer pages are linked to each other, not only from the sitemap) */
.crumbs { font-size: 12px; color: var(--dp-text-muted); margin: 0 0 10px; }
.crumbs a { color: var(--dp-accent); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.related { margin: 40px 0 0; padding: 18px 20px; border: 1px solid var(--dp-border); border-radius: 12px; }
.related h2 { margin: 0 0 10px; font-size: 16px; }
.related ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.related a { color: var(--dp-accent); font-weight: 600; }
