/* Public API reference enhancements.
   Token spans are rendered by the template, so the examples keep their
   hierarchy and colour even when JavaScript is blocked or still loading. */

.public-code-head .code-language {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #b3becb;
  font-size: 10px;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.public-code-head .code-language::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7d7bff;
  box-shadow: 0 0 0 3px rgb(125 123 255 / .13);
}

.public-code-card pre {
  tab-size: 2;
  -moz-tab-size: 2;
}

.public-code-card pre:focus-visible {
  outline: 2px solid #7d7bff;
  outline-offset: -3px;
}

.public-code-card code {
  color: #cbd3df;
  text-shadow: 0 1px rgb(0 0 0 / .2);
}

.tok-comment { color: #738094; font-style: italic; }
.tok-command,
.tok-keyword { color: #c5a3ff; }
.tok-option,
.tok-parameter { color: #8dbdff; }
.tok-url,
.tok-string { color: #91d7ae; }
.tok-property { color: #88c9ff; }
.tok-module,
.tok-class,
.tok-call { color: #e9c77b; }
.tok-number,
.tok-constant { color: #f2a7c4; }
.tok-name { color: #d7deea; }
.tok-operator,
.tok-punctuation { color: #8995a6; }

/* Copy is progressive enhancement. With no JavaScript the examples remain
   fully selectable and the inert controls stay out of the interface. */
.public-doc-copy { display: none; align-items: center; justify-content: center; }
.api-docs-js .public-doc-copy { display: inline-flex; }
.api-docs-js .public-doc-copy.copied {
  border-color: rgb(53 226 127 / .36);
  background: rgb(53 226 127 / .09);
  color: #73e8a4;
}
.api-docs-js .public-doc-copy:disabled { cursor: default; opacity: .82; }

.public-response-card { margin-top: 10px; }
.public-response-card .response-status {
  color: #73e8a4;
  font: 700 10px/1 var(--mono);
  letter-spacing: .035em;
}
.public-response-card .response-tools { display: inline-flex; align-items: center; gap: 9px; }

.public-api-sidebar a.active,
.public-api-sidebar a[aria-current="location"] {
  border-inline-start: 2px solid var(--accent);
  background: var(--accent-tint);
  color: var(--text);
}

.public-api-mobile-nav a.active,
.public-api-mobile-nav a[aria-current="location"] {
  border-color: var(--accent-line);
  background: var(--accent-tint);
  color: var(--text);
}

@media (max-width: 520px) {
  .public-code-head .code-language { font-size: 9.5px; }
  .api-docs-js .public-doc-copy { min-height: 32px; }
}

@media (prefers-contrast: more) {
  .tok-command,
  .tok-keyword { color: #d7bcff; }
  .tok-url,
  .tok-string { color: #a8ebc1; }
  .tok-property,
  .tok-option,
  .tok-parameter { color: #add5ff; }
  .tok-module,
  .tok-class,
  .tok-call { color: #ffe09b; }
}
