﻿/* Base layout */
.dsip-user-manual {
    font-family: var(--font-sans, system-ui, -apple-system, "Segoe UI", sans-serif);
    background-color: var(--bg, #ffffff);
    color: var(--fg, #000000);
    padding: 0;
    margin: 0;
}

.manual-shell {
    max-width: clamp(0dvw, 98dvw, 1980px);
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
    padding-top: 0.75rem;  /* reduced to half because bread crum has margin bottom 0.75rem. This will look breadcrum stand in the middle*/
}

/* Optional top breadcrumb for crawlers and UX */
.manual-breadcrumb {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

    .manual-breadcrumb a {
        color: var(--theme-teal, #12b88b);
        text-decoration: none;
    }

        .manual-breadcrumb a:hover {
            text-decoration: underline;
        }

    .manual-breadcrumb span {
        color: rgba(0, 0, 0, 0.6);
    }

/* Main header */
.manual-header {
    margin-bottom: 2rem;
    color: #666666;    
}

.manual-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.manual-meta {
    font-size: 0.9rem;
    color: rgba(0, 0, 0, 0.6);
}

/* Two-column layout */
.manual-layout {
    display: grid;
    grid-template-columns: minmax(230px, 360px) minmax(0, 1fr);
    gap: 2rem;
    align-items: flex-start;
}

/* Left navigation */
.manual-sidebar {
    position: sticky;
    /* --navHeight is declared by js in _OpLayout */
    top: calc(var(--navHeight) + 10px);
    max-height: calc(100vh - var(--navHeight) - 20px);
    overflow-y: auto;
    border-radius: 12px;
    background: white;
    padding: 1rem 1rem 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    white-space: nowrap;
}

    .manual-sidebar h2 {
        font-size: 0.95rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        margin: 0 0 0.75rem;
        color: rgb(0 39 39);
    }

.manual-toc {
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}
    .manual-toc > li {
        margin-bottom: 0.35rem;
        display:block;
    }


/* bullet styles to make them nested */
.nested-bullets {
    list-style: none;
    font-size: 0.9rem;
    /* start top-level counter */
    counter-reset: item;
}

    /* all nested ol inside the TOC */
    .nested-bullets ol {
        list-style: none; /* remove browser numbers */
        margin: 0;
        padding-left: 0.75rem; /* or whatever indent you want */
        /* start a new counter level for children */
        counter-reset: item;
    }

    .nested-bullets li {
        display: block;
        margin-bottom: 0.35rem;
    }

        /* generate hierarchical numbers: 1, 1.1, 1.2, 1.2.1 ... */
        .nested-bullets li::before {
            content: counters(item, ".") ". ";
            counter-increment: item;
        }

   


    .manual-toc a {
        display: inline-block;
        padding: 0.25rem 0.35rem;
        border-radius: 6px;
        color: rgba(0, 0, 0, 0.8);
        text-decoration: none;
        line-height: 1.3;
    }

        .manual-toc a:hover {
            background: var(--shade-o1, #ffefda);
            color: var(--theme-orange, #ff6000);
        }

        .manual-toc a.manual-toc-active {
            background: var(--shade-t1, #d7ffec);
            color: var(--theme-teal, #12b88b);
            font-weight: 600;
        }

    /* Nested TOC levels */
    .manual-toc .toc-level-2 {
        padding-left: 0.75rem;
        margin-top: 0.2rem;
        margin-bottom: 0.2rem;
    }

    .manual-toc .toc-level-3 {
        padding-left: 1.5rem;
    }

/* Main content area */
.manual-main {
    background: var(--card, #ffffff);
    border-radius: 14px;
    padding: 1.5rem 1.5rem 2rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.02);
}

    .manual-main h2 {
        font-size: 1.25rem;
        margin-top: 2rem;
        margin-bottom: 0.75rem;
        color: rgb(0 39 39);
    }

    .manual-main h3 {
        font-size: 1.05rem;
        margin-top: 1.4rem;
        margin-bottom: 0.4rem;
        color: var(--theme-teal, #12b88b);
    }

    .manual-main h4 {
        font-size: 0.98rem;
        margin-top: 1.2rem;
        margin-bottom: 0.3rem;
        font-weight: 600;
    }

    .manual-main p {
        margin-bottom: 0.65rem;
        line-height: 1.5;
        color: rgba(0, 0, 0, 0.86);
    }

    .manual-main ul,
    .manual-main ol {
        padding-left: 1.3rem;
        margin-bottom: 0.8rem;
    }

    .manual-main li {
        margin-bottom: 0.3rem;
    }

.manual-callout {
    border-radius: 10px;
    padding: 0.85rem 1rem;
    background: var(--shade-t2, #b6ffeb);
    border-left: 3px solid var(--theme-teal, #12b88b);
    font-size: 0.9rem;
    margin: 1rem 0;
}

.manual-warning {
    background: var(--shade-o1, #ffefda);
    border-left-color: var(--theme-orange, #ff6000);
}

.manual-subtle {
    font-size: 0.88rem;
    color: rgba(0, 0, 0, 0.65);
}

.manual-kbd {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: rgba(0, 0, 0, 0.02);
    font-size: 0.8rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.manual-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

    .manual-table th,
    .manual-table td {
        border: 1px solid rgba(0, 0, 0, 0.08);
        padding: 0.4rem 0.55rem;
        text-align: left;
    }

    .manual-table th {
        background: var(--shade-o2, #fff7f3);
        font-weight: 600;
    }

    .manual-table caption {
        text-align: left;
        font-weight: 600;
        margin-bottom: 0.35rem;
    }

/* Mobile nav toggle */
.manual-nav-toggle {
    display: none;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
    padding: 0.4rem 0.85rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.manual-nav-toggle-icon {
    width: 18px;
    height: 12px;
    position: relative;
}

    .manual-nav-toggle-icon span {
        position: absolute;
        left: 0;
        right: 0;
        height: 2px;
        border-radius: 999px;
        background: var(--theme-teal, #12b88b);
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

        .manual-nav-toggle-icon span:nth-child(1) {
            top: 0;
        }

        .manual-nav-toggle-icon span:nth-child(2) {
            top: 50%;
            transform: translateY(-50%);
        }

        .manual-nav-toggle-icon span:nth-child(3) {
            bottom: 0;
        }

.manual-nav-toggle[aria-expanded="true"] .manual-nav-toggle-icon span:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.manual-nav-toggle[aria-expanded="true"] .manual-nav-toggle-icon span:nth-child(2) {
    opacity: 0;
}

.manual-nav-toggle[aria-expanded="true"] .manual-nav-toggle-icon span:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

/* Responsive behavior */
@media (max-width: 991px) {
    .manual-layout {
        display: block;
    }

    .manual-nav-toggle {
        display: inline-flex;
    }

    .manual-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 260px;
        max-width: 80%;
        max-height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.2s ease-out;
        z-index: 998;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
        border-radius: 0 12px 12px 0;
    }

        .manual-sidebar.is-open {
            transform: translateX(0);
        }

    .manual-sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 997;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease-out;
    }

        .manual-sidebar-backdrop.is-visible {
            opacity: 1;
            pointer-events: auto;
        }
}

@media (max-width: 575px) {
    .manual-shell {
        padding-inline: 0.75rem;
    }

    .manual-main {
        padding: 1.1rem 1rem 1.5rem;
    }
}