/* mdbook-pagetoc styles */
/* Adjusted to display on the right side */

@media only screen and (max-width: 1439px) {
    .sidetoc {
        display: none;
    }
}

@media only screen and (min-width: 1440px) {
    main {
        position: relative;
    }
    .sidetoc {
        position: fixed;
        top: var(--menu-bar-height, 50px);
        right: 30px; /* Fixed to right side with 30px margin */
        width: 200px;
        margin: 0;
    }
    .pagetoc {
        position: fixed;
        width: 200px;
        height: calc(100vh - var(--menu-bar-height, 50px) - 30px);
        overflow: auto;
        padding: 10px 0;
        background: var(--bg);
        border-left: 1px solid var(--border);
        border-radius: 4px;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    }
    .pagetoc a {
        border-left: 2px solid transparent;
        color: var(--fg) !important;
        display: block;
        padding: 5px 0 5px 12px;
        text-align: left;
        text-decoration: none;
        transition: all 0.2s;
    }
    .pagetoc a:hover,
    .pagetoc a.active {
        background: var(--sidebar-bg);
        color: #008cff !important;
        border-left-color: #008cff;
        font-weight: 600;
    }
    .pagetoc .active {
        background: var(--sidebar-bg);
        color: #008cff !important;
    }
    /* H2: Section - clear indent */
    .pagetoc .pagetoc-H1 {
        padding-left: 0px !important;
        font-weight: 600;
        font-size: 13.5px;
    }
    /* H2: Section - clear indent */
    .pagetoc .pagetoc-H2 {
        padding-left: 20px !important;
        font-weight: 600;
        font-size: 13.5px;
    }
    /* H3: Subsection - deeper indent */
    .pagetoc .pagetoc-H3 {
        padding-left: 40px !important;
        font-weight: 500;
        font-size: 13px;
    }
    /* H4: Detail - deepest indent */
    .pagetoc .pagetoc-H4 {
        padding-left: 60px !important;
        font-weight: 400;
        font-size: 12.5px;
        opacity: 0.85;
    }
    .pagetoc .pagetoc-H5 {
        display: none;
    }
    .pagetoc .pagetoc-H6 {
        display: none;
    }
}
