/*
 * Stylesheet for the rendered partner guides (see Documentation/DocumentationPageRenderer.cs).
 * Kept as a separate file rather than inlined so the pages satisfy a `style-src 'self'` policy on their
 * own — the `'unsafe-inline'` allowance in DocumentationSecurityHeadersMiddleware exists for Scalar.
 */

:root {
    color-scheme: light dark;
    --doc-bg: #ffffff;
    --doc-fg: #1c1f24;
    --doc-muted: #5b636e;
    --doc-border: #e2e6ea;
    --doc-accent: #1a5fb4;
    --doc-code-bg: #f5f7f9;
}

@media (prefers-color-scheme: dark) {
    :root {
        --doc-bg: #16181c;
        --doc-fg: #e6e8ea;
        --doc-muted: #a0a7b0;
        --doc-border: #2c3038;
        --doc-accent: #78aeff;
        --doc-code-bg: #1e2127;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--doc-bg);
    color: var(--doc-fg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
}

.doc-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1.5rem;
    border-bottom: 1px solid var(--doc-border);
}

.doc-nav > a {
    font-weight: 600;
    text-decoration: none;
    color: var(--doc-fg);
}

.doc-nav__links {
    display: flex;
    gap: 1.25rem;
}

.doc-nav__links a {
    color: var(--doc-accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.doc-nav__links a:hover,
.doc-content a:hover {
    text-decoration: underline;
}

.doc-content {
    max-width: 46rem;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.doc-content h1 {
    font-size: 1.9rem;
    line-height: 1.25;
    margin: 0 0 1.5rem;
}

.doc-content h2 {
    font-size: 1.3rem;
    margin: 2.25rem 0 0.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--doc-border);
}

.doc-content h3 {
    font-size: 1.05rem;
    margin: 1.75rem 0 0.5rem;
}

.doc-content a {
    color: var(--doc-accent);
}

.doc-content code {
    background: var(--doc-code-bg);
    border-radius: 4px;
    padding: 0.15em 0.4em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875em;
}

.doc-content pre {
    background: var(--doc-code-bg);
    border: 1px solid var(--doc-border);
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
}

.doc-content pre code {
    background: none;
    padding: 0;
}

.doc-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    display: block;
    overflow-x: auto;
}

.doc-content th,
.doc-content td {
    border: 1px solid var(--doc-border);
    padding: 0.5rem 0.7rem;
    text-align: left;
    vertical-align: top;
}

.doc-content th {
    background: var(--doc-code-bg);
    font-weight: 600;
}

.doc-content blockquote {
    margin: 1.25rem 0;
    padding: 0.25rem 1rem;
    border-left: 3px solid var(--doc-accent);
    color: var(--doc-muted);
}

.doc-content img {
    max-width: 100%;
}

/* Guide menu and previous/next footer (DOK-17960 feedback).
   No script anywhere: the documentation CSP keeps script-src on 'self' and these pages ship none, so the
   menu is a plain list that works with styling alone. */
.doc-menu {
  max-width: 60rem;
  margin: 1.5rem auto 0;
  padding: 0 1.5rem;
}

.doc-menu ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
}

.doc-menu a {
  text-decoration: none;
}

.doc-menu a:hover,
.doc-menu a:focus {
  text-decoration: underline;
}

/* The page being read: weight rather than colour alone, so it reads without relying on hue. */
.doc-menu__current a {
  font-weight: 600;
  text-decoration: underline;
}

.doc-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid currentColor;
  font-size: 0.95rem;
}

/* Keeps "next" on the right when there is no "previous" — the first guide has none. */
.doc-footer__next:only-child {
  margin-left: auto;
}

/* The mark sits beside the product name rather than replacing it: the wordmark is small at this height and
   a reader arriving from a search result needs the name in text. */
.doc-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.doc-nav__brand img {
  display: block;
  height: 24px;
  width: auto;
}
