/* ===== DOCUMENTATION PAGE =====
   Rendered from the Markdown files in docs/prirucka/ by js/docs.js.
   Uses the site's tokens from css/styles.css :root — do not hardcode colours. */

:root {
    --docs-sidebar: 264px;
    --docs-toc: 220px;
    --docs-nav-height: 64px;
    --docs-border: #e2e8f0;
    --docs-ink: #1a1a2e;
    --docs-ink-soft: #475569;
    --docs-ink-muted: #64748b;
    --docs-surface: #ffffff;
    --docs-surface-alt: #f6f7fb;
}

/* ===== HERO ===== */
.docs-hero {
    background: var(--gradient-2);
    padding: 140px 0 56px;
    position: relative;
    overflow: hidden;
}
.docs-hero::before {
    content: '';
    position: absolute;
    top: -160px;
    right: -120px;
    width: 460px;
    height: 460px;
    background: var(--gradient-1);
    filter: blur(120px);
    opacity: 0.35;
    border-radius: 50%;
}
.docs-hero .container { position: relative; z-index: 1; }
.docs-hero .section-label { color: var(--primary-light); }
.docs-hero .section-label::before { background: var(--primary-light); }
.docs-hero h1 {
    color: white;
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.15;
    margin-bottom: 14px;
}
.docs-hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    max-width: 620px;
}

/* ===== SEARCH ===== */
.docs-search {
    position: relative;
    margin-top: 28px;
    max-width: 520px;
}
.docs-search input {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    color: white;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 100px;
    padding: 14px 20px 14px 48px;
    outline: none;
    transition: all 0.3s;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.docs-search input::placeholder { color: rgba(255, 255, 255, 0.5); }
.docs-search input:focus {
    border-color: var(--primary-light);
    background: rgba(255, 255, 255, 0.14);
}
.docs-search svg {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.55);
    pointer-events: none;
}
.docs-search-results {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 20;
    background: var(--docs-surface);
    border: 1px solid var(--docs-border);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    max-height: 60vh;
    overflow-y: auto;
    padding: 8px;
}
.docs-search-results a {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--docs-ink);
}
.docs-search-results a:hover { background: var(--docs-surface-alt); }
.docs-search-results a strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 2px;
}
.docs-search-results a span {
    display: block;
    font-size: 0.85rem;
    color: var(--docs-ink-muted);
    line-height: 1.5;
}
.docs-search-empty {
    padding: 14px;
    font-size: 0.9rem;
    color: var(--docs-ink-muted);
}

/* ===== LAYOUT ===== */
.docs-main { background: var(--docs-surface-alt); padding: 40px 0 96px; }
.docs-layout {
    display: grid;
    grid-template-columns: var(--docs-sidebar) minmax(0, 1fr) var(--docs-toc);
    gap: 40px;
    align-items: start;
}

/* ===== SIDEBAR ===== */
.docs-sidebar {
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 8px;
}
.docs-nav-group { margin-bottom: 26px; }
.docs-nav-group h4 {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--docs-ink-muted);
    margin-bottom: 10px;
}
.docs-nav-group ul { list-style: none; }
.docs-nav-group li { margin-bottom: 2px; }
.docs-nav-group a {
    display: block;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 0.92rem;
    line-height: 1.4;
    color: var(--docs-ink-soft);
    text-decoration: none;
    transition: all 0.2s;
}
.docs-nav-group a:hover {
    background: var(--docs-surface);
    color: var(--primary);
}
.docs-nav-group a.active {
    background: var(--docs-surface);
    color: var(--primary);
    font-weight: 600;
    box-shadow: inset 2px 0 0 var(--primary);
}

.docs-nav-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 20px;
    padding: 12px 18px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--docs-ink);
    background: var(--docs-surface);
    border: 1px solid var(--docs-border);
    border-radius: 12px;
    cursor: pointer;
}

/* ===== ARTICLE ===== */
.docs-article {
    background: var(--docs-surface);
    border: 1px solid var(--docs-border);
    border-radius: 20px;
    padding: 44px 48px 48px;
    box-shadow: 0 1px 2px rgba(15, 13, 26, 0.04);
    min-width: 0;
}
.docs-crumb {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 14px;
}

.docs-content { color: var(--docs-ink-soft); font-size: 1rem; line-height: 1.75; }
.docs-content .docs-title {
    font-size: clamp(1.7rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.2;
    color: var(--docs-ink);
    margin-bottom: 22px;
}
.docs-content h2 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--docs-ink);
    margin: 44px 0 14px;
    padding-top: 8px;
    scroll-margin-top: 96px;
}
.docs-content h3 {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--docs-ink);
    margin: 32px 0 10px;
    scroll-margin-top: 96px;
}
.docs-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--docs-ink);
    margin: 24px 0 8px;
}
.docs-content p { margin-bottom: 16px; }
.docs-content a { color: var(--primary); text-decoration: none; font-weight: 500; }
.docs-content a:hover { text-decoration: underline; }
.docs-content strong { color: var(--docs-ink); font-weight: 600; }

.docs-content ul,
.docs-content ol { margin: 0 0 18px 22px; }
.docs-content li { margin-bottom: 7px; }
.docs-content li > ul,
.docs-content li > ol { margin: 8px 0 4px 18px; }
.docs-content ul ul { list-style: circle; }

.docs-content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.86em;
    background: var(--docs-surface-alt);
    border: 1px solid var(--docs-border);
    border-radius: 5px;
    padding: 1px 6px;
    color: var(--primary-dark);
    word-break: break-word;
}
.docs-content pre {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 20px;
    overflow-x: auto;
}
.docs-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: #e2e8f0;
    font-size: 0.86rem;
    line-height: 1.65;
}
.docs-content hr {
    border: none;
    border-top: 1px solid var(--docs-border);
    margin: 36px 0;
}
.docs-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--docs-border);
    margin-bottom: 20px;
}

/* ===== TABLES ===== */
.docs-table-wrap {
    overflow-x: auto;
    margin-bottom: 24px;
    border: 1px solid var(--docs-border);
    border-radius: 12px;
}
.docs-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.93rem;
}
.docs-content th {
    text-align: left;
    font-weight: 600;
    color: var(--docs-ink);
    background: var(--docs-surface-alt);
    padding: 12px 16px;
    border-bottom: 1px solid var(--docs-border);
    white-space: nowrap;
}
.docs-content td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--docs-border);
    vertical-align: top;
}
.docs-content tbody tr:last-child td { border-bottom: none; }
.docs-content tbody tr:hover { background: rgba(79, 70, 229, 0.03); }

/* ===== CALLOUTS ===== */
.docs-callout {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 24px 0;
    padding: 16px 20px;
    border-radius: 12px;
    border-left: 3px solid var(--primary);
    background: rgba(79, 70, 229, 0.05);
}
.docs-callout p { margin: 0; }
.docs-callout-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--primary);
}
.docs-callout-warn {
    border-left-color: var(--accent);
    background: rgba(225, 29, 72, 0.05);
}
.docs-callout-warn .docs-callout-label { color: var(--accent); }
.docs-callout-tip {
    border-left-color: #059669;
    background: rgba(5, 150, 105, 0.06);
}
.docs-callout-tip .docs-callout-label { color: #047857; }

/* ===== ON THIS PAGE ===== */
.docs-toc {
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
.docs-toc h4 {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    color: var(--docs-ink-muted);
    margin-bottom: 12px;
}
.docs-toc ul { list-style: none; }
.docs-toc li { margin-bottom: 8px; }
.docs-toc a {
    display: block;
    font-size: 0.86rem;
    line-height: 1.45;
    color: var(--docs-ink-muted);
    text-decoration: none;
    border-left: 2px solid var(--docs-border);
    padding-left: 12px;
    transition: all 0.2s;
}
.docs-toc a:hover { color: var(--primary); border-left-color: var(--primary); }

/* ===== PAGER ===== */
.docs-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}
.docs-pager-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 20px;
    background: var(--docs-surface);
    border: 1px solid var(--docs-border);
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.25s;
}
.docs-pager-link:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.1);
}
.docs-pager-link.next { text-align: right; }
.docs-pager-link span {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--docs-ink-muted);
}
.docs-pager-link strong {
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--docs-ink);
}

/* ===== HELP BOX ===== */
.docs-help {
    margin-top: 32px;
    padding: 28px 32px;
    border-radius: 18px;
    background: var(--gradient-2);
    color: var(--text-light);
}
.docs-help h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.docs-help p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 18px;
}
.docs-help-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1180px) {
    .docs-layout { grid-template-columns: var(--docs-sidebar) minmax(0, 1fr); }
    .docs-toc-wrap { display: none; }
}
@media (max-width: 900px) {
    .docs-hero { padding: 120px 0 40px; }
    .docs-layout { grid-template-columns: 1fr; gap: 0; }
    .docs-nav-toggle { display: flex; }
    .docs-sidebar {
        display: none;
        position: static;
        max-height: none;
        margin-bottom: 24px;
        padding: 20px 16px 8px;
        background: var(--docs-surface);
        border: 1px solid var(--docs-border);
        border-radius: 16px;
    }
    body.docs-nav-open .docs-sidebar { display: block; }
    .docs-article { padding: 28px 22px 32px; border-radius: 16px; }
    .docs-content .docs-title { font-size: 1.6rem; }
    .docs-content h2 { font-size: 1.25rem; margin-top: 34px; }
    .docs-pager { grid-template-columns: 1fr; }
    .docs-pager-link.next { text-align: left; }
    .docs-help { padding: 24px 22px; }
}
