/**
 * ELabELN API developer docs — standalone Swagger UI page.
 *
 * Modelled on https://doc.elabftw.net/api/v2/: stock Swagger UI, standalone, no
 * site chrome. Every theme stylesheet is dequeued for this page (see
 * APIDOCS/inc/api-docs.php), so this file only has to do three things: set the
 * page background, restrain two non-functional controls, and guard against
 * global element styles if any plugin ever injects them.
 *
 * Deliberately minimal. The operation blocks keep the standard Swagger UI
 * appearance on purpose — developers recognise it, and restyling 2,700 rules is a
 * maintenance liability for no gain.
 */

html,
body.eln-apidocs {
	margin: 0;
	padding: 0;
	background: #fafafa;
}

/* The Authorize button opens a key dialog that only feeds "Try it out", which is
   disabled (see APIDOCS/inc/api-docs.php — the API sends no CORS header, so a
   browser request from this origin can never succeed). The Servers box beside it
   is kept: it documents the base URL template, which is genuinely useful. */
.eln-apidocs .swagger-ui .auth-wrapper {
	display: none;
}

/* Guards -----------------------------------------------------------------
   Not needed while the theme stylesheets are dequeued, but cheap insurance: a
   plugin that enqueues global element styles would otherwise break Swagger in
   two specific ways we have already hit once on this site.

   1. `pre { background: … }` covers the white text inside Swagger's version
      badges, which wrap a <pre> in a dark <small>. Both badges render blank.
   2. `code, pre { color: … }` wins on every code block Swagger does not
      explicitly recolour, e.g. model and response examples. */

.eln-apidocs .swagger-ui .info .title small pre.version {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: #fff;
	font-size: inherit;
	line-height: inherit;
	white-space: nowrap;
}

.eln-apidocs .swagger-ui pre,
.eln-apidocs .swagger-ui code {
	color: inherit;
}

.eln-apidocs .swagger-ui pre.microlight,
.eln-apidocs .swagger-ui pre.microlight code {
	color: #fff;
}

/* Failure / no-JS notice -------------------------------------------------- */

.eln-apidocs .eln-apidocs__err {
	display: none;
	max-width: 760px;
	margin: 0 auto;
	padding: 38px 26px;
	line-height: 1.65;
	color: #1b2740;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.eln-apidocs .eln-apidocs__err h2 {
	margin: 0 0 10px;
	font-size: 20px;
	color: #061634;
}

.eln-apidocs .eln-apidocs__err p {
	margin: 10px 0;
	color: #425169;
}

.eln-apidocs .eln-apidocs__err a {
	color: #b95f12;
}
