/* ===== docs.css — Documentation layout and content styles ===== */

/* ===== Page Layout ===== */
.docs-page {
    min-height: calc(100vh - var(--nav-height));
}

.docs-breadcrumb {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    padding: 0.6rem 0;
    font-size: 0.825rem;
    color: var(--text-muted);
}

.docs-breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.docs-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.docs-breadcrumb a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.docs-breadcrumb .separator {
    color: var(--border);
}

.docs-breadcrumb .current {
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== Two-Column Layout ===== */
.docs-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 0;
    min-height: calc(100vh - var(--nav-height) - 40px);
    align-items: start;
}

/* ===== Sidebar ===== */
.docs-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 1px);
    max-height: calc(100vh - var(--nav-height) - 1px);
    overflow-y: auto;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    padding: 1.5rem 0;
}

.docs-sidebar-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0 1.25rem 0.75rem;
}

.docs-nav {
    list-style: none;
}

.docs-nav a {
    display: block;
    padding: 0.45rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    line-height: 1.4;
}

.docs-nav a:hover {
    color: var(--primary);
    background: var(--primary-light);
    border-left-color: var(--primary-light);
    text-decoration: none;
}

.docs-nav a.active {
    color: var(--primary);
    background: var(--primary-light);
    border-left-color: var(--primary);
    font-weight: 600;
}

.docs-nav-section {
    list-style: none;
}

.docs-nav-top {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.docs-nav-top.parent-active {
    color: var(--primary);
}

.docs-nav-sub {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-nav-sub a {
    padding-left: 2rem;
    font-size: 0.825rem;
}

/* ===== Content Area ===== */
.docs-content {
    padding: 2.5rem 3rem;
    max-width: 860px;
    background: var(--bg-surface);
    min-height: calc(100vh - var(--nav-height));
}

/* ===== Content Typography (carried from styles.css) ===== */
.docs-content h1 {
    font-size: 2rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.3em;
    margin-top: 0;
    margin-bottom: 0.75em;
}

.docs-content h2 {
    font-size: 1.5rem;
    border-left: 4px solid var(--primary);
    padding-left: 0.5em;
    margin-top: 2em;
    margin-bottom: 0.6em;
}

.docs-content h3 {
    font-size: 1.15rem;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #1f2937;
}

.docs-content p {
    color: var(--text-secondary);
    margin-bottom: 1em;
    line-height: 1.75;
}

.docs-content a {
    color: var(--primary);
}

.docs-content a:hover {
    color: var(--primary-dark);
}

.docs-content ul,
.docs-content ol {
    padding-left: 1.5em;
    margin-bottom: 1em;
}

.docs-content li {
    margin-bottom: 0.3em;
    color: var(--text-secondary);
}

/* ===== Images ===== */
.docs-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-bottom: 1em;
    border-radius: var(--radius-sm);
}

.docs-content img.inline {
    display: inline-block;
    margin-bottom: 0;
}

.docs-content img.icon {
    display: inline-block !important;
    height: 1em;
    width: auto;
    margin: 0 5px 0 0 !important;
    vertical-align: middle;
    border-radius: 0;
}

/* ===== Figures ===== */
.docs-content figure {
    margin: 1.5em 0;
    padding: 0;
}

.docs-content figure figcaption {
    display: none;
}

/* ===== Code ===== */
.docs-content code {
    font-family: 'Consolas', 'Courier New', monospace;
    background-color: #f3f4f6;
    padding: 0.2em 0.4em;
    border-radius: var(--radius-sm);
    font-size: 0.9em;
    color: #be185d;
}

.docs-content pre code {
    display: block;
    padding: 1em;
    overflow-x: auto;
    color: var(--text-primary);
}

/* ===== Tables ===== */
.docs-content table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1.5em;
    font-size: 0.9em;
}

.docs-content th,
.docs-content td {
    border: 1px solid var(--border);
    padding: 0.6em 0.8em;
    text-align: left;
}

.docs-content th {
    background-color: var(--bg-app);
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== HR ===== */
.docs-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2em 0;
}

/* ===== Responsive: sidebar collapses ===== */
@media (max-width: 900px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: static;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1rem 0;
    }

    .docs-content {
        padding: 1.75rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .docs-content {
        padding: 1.25rem 1rem;
    }
}
