/* FEAT-024 — scoped styles for the documentation portal.
   Markdig produces plain HTML; we give it a typographic scale that reads as
   reference docs (h1 28px, h2 22px, h3 18px, body 15px) rather than the
   slide-deck sizes a default user-agent stylesheet would apply. Scoped under
   .bn-docs-content so rules cannot bleed into Radzen UI elsewhere in the app. */

.bn-docs-content {
    max-width: 64rem;
    margin: 0 auto;
    padding: 1.5rem 2rem 4rem 2rem;
    line-height: 1.6;
    color: var(--rz-text-color, #1f2933);
}

.bn-docs-content .bn-docs-markdown {
    font-size: 0.9375rem; /* 15px base */
    line-height: 1.6;
}

/* Headings: typographic scale that reads as reference docs, not a billboard. */
.bn-docs-content .bn-docs-markdown h1 {
    font-size: 1.75rem;          /* 28px */
    line-height: 1.25;
    font-weight: 600;
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--rz-border-color, #e0e3e7);
}

.bn-docs-content .bn-docs-markdown h2 {
    font-size: 1.375rem;         /* 22px */
    line-height: 1.3;
    font-weight: 600;
    margin: 2rem 0 0.75rem 0;
}

.bn-docs-content .bn-docs-markdown h3 {
    font-size: 1.125rem;         /* 18px */
    line-height: 1.35;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem 0;
}

.bn-docs-content .bn-docs-markdown h4 {
    font-size: 1rem;             /* 16px */
    line-height: 1.4;
    font-weight: 600;
    margin: 1.25rem 0 0.4rem 0;
}

/* Body copy + lists. */
.bn-docs-content .bn-docs-markdown p,
.bn-docs-content .bn-docs-markdown li {
    font-size: 0.9375rem;
    line-height: 1.6;
}

.bn-docs-content .bn-docs-markdown p {
    margin: 0 0 0.75rem 0;
}

.bn-docs-content .bn-docs-markdown ul,
.bn-docs-content .bn-docs-markdown ol {
    margin: 0 0 0.75rem 0;
    padding-left: 1.5rem;
}

.bn-docs-content .bn-docs-markdown li {
    margin: 0 0 0.3rem 0;
}

/* Blockquote — used by intro callouts ("Pro koho / Co se dozvíte"). */
.bn-docs-content .bn-docs-markdown blockquote {
    margin: 0.75rem 0 1rem 0;
    padding: 0.6rem 1rem;
    border-left: 3px solid var(--rz-primary, #2095ed);
    background: var(--rz-base-50, #f5f7fa);
    color: var(--rz-text-color, #1f2933);
    font-size: 0.9375rem;
    line-height: 1.55;
}

.bn-docs-content .bn-docs-markdown blockquote > :first-child { margin-top: 0; }
.bn-docs-content .bn-docs-markdown blockquote > :last-child  { margin-bottom: 0; }

/* Code: inline + fenced blocks (mermaid blocks fall here until JS renders them). */
.bn-docs-content .bn-docs-markdown code {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.85em;
    background: var(--rz-base-100, #eef1f6);
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

.bn-docs-content .bn-docs-markdown pre {
    margin: 0.75rem 0 1rem 0;
    padding: 0.75rem 1rem;
    background: var(--rz-base-50, #f5f7fa);
    border: 1px solid var(--rz-border-color, #e0e3e7);
    border-radius: 4px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.5;
}

.bn-docs-content .bn-docs-markdown pre code {
    background: transparent;
    padding: 0;
    font-size: inherit;
}

/* Mermaid diagrams. Markdig UseDiagrams emits <pre class="mermaid">; once
   mermaid.js runs, the <pre> gets `data-processed="true"` and contains an
   <svg>. Strip the code-block chrome so the diagram floats in flow. */
.bn-docs-content .bn-docs-markdown pre.mermaid,
.bn-docs-content .bn-docs-markdown div.mermaid {
    margin: 1rem 0 1.25rem 0;
    padding: 0.5rem 0;
    background: transparent;
    border: none;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.4;
    overflow-x: auto;
}

.bn-docs-content .bn-docs-markdown pre.mermaid svg,
.bn-docs-content .bn-docs-markdown div.mermaid svg {
    max-width: 100%;
    height: auto;
}

/* Tables — reference docs often have comparison matrices. */
.bn-docs-content .bn-docs-markdown table {
    border-collapse: collapse;
    margin: 0.75rem 0 1rem 0;
    font-size: 0.9375rem;
}

.bn-docs-content .bn-docs-markdown th,
.bn-docs-content .bn-docs-markdown td {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--rz-border-color, #e0e3e7);
    text-align: left;
    vertical-align: top;
}

.bn-docs-content .bn-docs-markdown th {
    background: var(--rz-base-50, #f5f7fa);
    font-weight: 600;
}

.bn-docs-content .bn-docs-markdown strong {
    font-weight: 600;
}

/* Sidebar tree styling — small visual tightening to keep the doc tree compact. */
.bn-docs-nav {
    padding: 0.5rem 0;
}

.bn-docs-nav .bn-docs-nav__root {
    display: block;
    padding: 0.4rem 1rem;
    font-weight: 600;
    color: var(--rz-text-color, #1f2933);
    text-decoration: none;
    border-bottom: 1px solid var(--rz-border-color, #e0e3e7);
}

.bn-docs-nav .bn-docs-nav__root:hover {
    background: var(--rz-base-50, #f5f7fa);
}

.bn-docs-nav .bn-docs-nav__active {
    background: var(--rz-base-50, #f5f7fa);
}

/* "Not found" and "Loading" state alignment. */
.bn-docs-state {
    padding: 1rem 1.5rem;
}
