﻿

/* Server Docs */
/* =============== docs.css =============== */

/* --- Core Layout --- */
.docs-container {
    display: flex;
    max-width: 1400px; /* Limit overall width */
    margin: 2rem auto; /* Center container with top/bottom margin */
    gap: 2rem; /* Space between sidebar and content */
    padding: 0 1.5rem; /* Padding on smaller screens */
}

/* --- Sidebar --- */
.docs-sidebar {
    width: 260px; /* Fixed width */
    flex-shrink: 0; /* Prevent shrinking */
    position: sticky;
    top: 80px; /* Adjust based on your header height + desired gap */
    height: calc(100vh - 100px); /* Limit height to viewport minus header/footer/gap */
    overflow-y: auto; /* Allow sidebar scrolling if content overflows */
    padding-right: 1rem; /* Space before content */
    border-right: 1px solid var(--border-color);
}

    .docs-sidebar h3 {
        font-size: 0.9rem;
        font-weight: 600;
        margin-bottom: 1rem;
        text-transform: uppercase;
        color: var(--text-secondary);
        padding-left: 0.5rem;
    }

.docs-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-nav li a {
    display: block;
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border-left: 3px solid transparent; /* Indicator for active link */
}

    .docs-nav li a:hover {
        background-color: var(--bg-secondary);
        color: var(--text-primary);
    }

    .docs-nav li a.active {
        color: var(--accent-color);
        font-weight: 600;
        background-color: var(--accent-bg, #ddf4ff); /* Optional accent background */
        border-left-color: var(--accent-color);
    }
/* Add dark theme accent background */
[data-theme="dark"] .docs-nav li a.active {
    background-color: var(--accent-dark-bg, #1f6feb26);
}


/* Sub-navigation (optional, for deeper levels) */
.docs-nav ul ul {
    padding-left: 1rem; /* Indent sub-items */
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

    .docs-nav ul ul li a {
        font-size: 0.825rem;
        padding-left: 1.2rem; /* Further indent text */
    }


/* --- Main Content --- */
.docs-content {
    flex-grow: 1; /* Take remaining space */
    min-width: 0; /* Prevent overflow issues */
}

    .docs-content section {
        margin-bottom: 3rem;
        padding-top: 80px; /* Offset for sticky header AND sidebar top value */
        margin-top: -80px; /* Pull section up to counteract padding */
    }

    .docs-content h1 { /* Page Title (handled outside sections usually) */
        font-size: 2.2rem;
        margin-bottom: 1rem;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 0.75rem;
    }

    .docs-content h2 { /* Section Title */
        font-size: 1.8rem;
        margin-top: 2.5rem; /* Space above H2 */
        margin-bottom: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 0.5rem;
    }

    .docs-content h3 { /* Sub-Section Title */
        font-size: 1.4rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }

    .docs-content h4 {
        font-size: 1.1rem;
        font-weight: 600;
        margin-top: 1.5rem;
        margin-bottom: 0.8rem;
    }

    .docs-content p,
    .docs-content ul,
    .docs-content ol {
        margin-bottom: 1rem;
        line-height: 1.7;
        color: var(--text-primary);
    }

    .docs-content ul,
    .docs-content ol {
        padding-left: 1.5rem;
    }

    .docs-content ul {
        list-style: disc;
    }

    .docs-content ol {
        list-style: decimal;
    }

    .docs-content li {
        margin-bottom: 0.5rem;
    }

    .docs-content code { /* Inline code */
        background-color: var(--code-bg);
        padding: 0.2em 0.4em;
        margin: 0 0.1em;
        font-size: 85%;
        border-radius: var(--border-radius);
        font-family: monospace;
        color: var(--text-secondary);
    }

    .docs-content pre code { /* Code within pre blocks */
        padding: 0;
        margin: 0;
        font-size: inherit;
        color: inherit;
        background: none;
    }

    .docs-content strong {
        font-weight: 600;
    }

    /* Use existing .code-block styles from listserv.css */
    .docs-content .code-block {
        margin-top: 1rem;
        margin-bottom: 1.5rem;
        /* Ensure language class is added to <code> tag for highlighting if used */
    }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .docs-sidebar {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .docs-container {
        flex-direction: column;
        padding: 0 1rem; /* Adjust padding */
        margin: 1rem auto;
    }

    .docs-sidebar {
        position: static; /* Remove sticky */
        height: auto;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0;
        padding-bottom: 1rem;
        margin-bottom: 1.5rem;
        overflow-y: visible;
    }

    .docs-content section {
        padding-top: 10px; /* Minimal offset needed now */
        margin-top: 0;
    }

    .docs-content h2 {
        font-size: 1.6rem;
    }

    .docs-content h3 {
        font-size: 1.3rem;
    }
}
