/* API sub-site skin: the api.apollon.de prototype look, translated to the KB theme's
 * tokens and markup (the prototype's standalone CSS targets different HTML and must
 * not be copied 1:1). Loaded on top of site.css by the supplemental head-styles. */

:root {
  /* Self-contained values: the theme's gulp/postcss build inlines and strips its
   * custom properties, so the theme tokens (--color-apollon etc.) do NOT exist in
   * the built site.css at runtime — they must be repeated here by value
   * (source of truth: theme/src/css/vars.css). */
  --api-apollon: #41aae6;   /* --color-apollon */
  --api-bg: #fff;           /* --body-background */
  --api-panel: #fafafa;     /* --panel-background */
  --api-border: #e1e1e1;
  --api-muted: #5d5d5d;
}

/* apollon accent line under the top bar and above the footer */
.navbar {
  border-bottom: 3px solid var(--api-apollon);
}

/* Landing page hero: text next to the OMN 7 logo */
.doc .openblock.hero > .content {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-direction: row-reverse;
}
.doc .openblock.hero .imageblock.omn7 {
  flex: none;
  margin: 0;
}
.doc .openblock.hero .imageblock.omn7 img {
  height: 130px;
  width: auto;
}
@media (max-width: 640px) {
  .doc .openblock.hero > .content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .doc .openblock.hero .imageblock.omn7 img {
    height: 90px;
  }
}

/* Card grid (landing page) */
.doc .openblock.cards > .content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.doc .openblock.cards .paragraph.card {
  border: 1px solid var(--api-border);
  border-top: 3px solid var(--api-apollon);
  border-radius: 8px;
  padding: 1.25rem;
  background: var(--api-bg);
  margin: 0;
}
.doc .openblock.cards .paragraph.card > .title {
  font-size: 1.2rem;
  font-style: normal;
  font-weight: 500;
  color: #191919;
  margin-bottom: 0.5rem;
}

/* Prototype footer (grid + legal row) */
footer.footer.api-footer {
  border-top: 3px solid var(--api-apollon);
  background: var(--api-panel);
  color: var(--api-muted);
  padding: 1.5rem;
  font-size: 0.875rem;
  text-align: left;
}
.api-footer .footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  gap: 1.5rem;
  max-width: 60rem;
  margin: 0 auto;
}
.api-footer .footer-grid h3 {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.api-footer .footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.api-footer .footer-grid li {
  margin: 0.25rem 0;
}
.api-footer a {
  color: var(--api-muted);
  font-weight: 500;
}
.api-footer a:hover {
  color: var(--api-apollon);
}
.api-footer .footer-legal {
  max-width: 60rem;
  margin: 1.25rem auto 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--api-border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

/* Swagger-UI page: widen the content column, but keep the whole embedded UI on ONE
 * rail. Swagger's own section wrappers cap at 1460px and center themselves, while
 * bar backgrounds (.topbar, .scheme-container) paint edge-to-edge — on viewports
 * wider than the cap the bands grow past the centered content. Capping the root at
 * the same 1460px keeps bars and content aligned at every viewport width. */
body.api-swagger .doc {
  max-width: none;
}
body.api-swagger #swagger-ui {
  max-width: 1460px;
  margin: 1rem auto 0;
}

/* Swagger-UI top bar: the stock bar is a full-bleed near-black band while the
 * operation list below sits inside the wrapper's 20px padding — mismatched widths
 * and a foreign look. Align it with the operation blocks and restyle it to the
 * site's light panel look; the Swagger wordmark (white SVG) is unreadable on a
 * light background and carries no function here, so it goes. */
body.api-swagger .swagger-ui .topbar {
  background: var(--api-panel);
  border: 1px solid var(--api-border);
  border-top: 3px solid var(--api-apollon);
  border-radius: 8px;
  margin: 0 20px 10px;
  padding: 8px 0;
}
body.api-swagger .swagger-ui .topbar .link {
  display: none;
}
body.api-swagger .swagger-ui .topbar .download-url-wrapper .select-label span {
  color: #3b4151;
}
/* The standalone preset ships a dark-mode toggle and auto-enables html.dark-mode from
 * the OS preference — the rest of the site has no dark styling, so the swagger area
 * would flip dark inside a light page. The initializer removes the class at init;
 * hiding the toggle keeps it from coming back. */
body.api-swagger .swagger-ui .dark-mode-toggle {
  display: none;
}
/* Servers/authorize box: same alignment and panel treatment as the top bar */
body.api-swagger .swagger-ui .scheme-container {
  margin: 0 20px;
  background: var(--api-panel);
  border: 1px solid var(--api-border);
  border-radius: 8px;
  box-shadow: none;
}

/* Generated endpoint reference pages (role set by generate-api-reference.sh).
 * Every operation is a `.sect3 > h4` titled "VERB /path" — with 30–230 of them per
 * page they carry the scanning structure, so they render as bordered code-style
 * blocks instead of near-body h4 text. */
body.api-reference .doc .sect3 > h4 {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 600;
  background: var(--api-panel);
  border: 1px solid var(--api-border);
  border-left: 4px solid var(--api-apollon);
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  margin-top: 2.5rem;
  word-break: break-word;
}
/* The per-operation boilerplate sub-headings (Description, Parameters, Responses,
 * Return Type, …) repeat on every operation — step them back so the operation
 * blocks above stay the dominant landmarks. */
body.api-reference .doc .sect4 > h5 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--api-muted);
}
/* The spec's one-line summary directly follows the operation block — set it as a
 * lede so it reads as the operation's title line, not stray body text. */
body.api-reference .doc .sect3 > h4 + .paragraph p {
  font-size: 1.05rem;
  font-weight: 500;
}
/* Narrow generated columns (Required, Nullable) wrap their header mid-word. */
body.api-reference .doc table th {
  white-space: nowrap;
}
