/* Custom CSS for metalog-jax documentation */
/* Fix right sidebar (Contents) width to prevent text truncation */

/* Widen the right sidebar */
.md-sidebar--secondary {
    width: 22rem !important;
    max-width: 22rem !important;
    flex-shrink: 0 !important;
}

.md-sidebar--secondary .md-sidebar__scrollwrap {
    width: 22rem !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;  /* Firefox */
    -ms-overflow-style: none !important;  /* IE/Edge */
}

.md-sidebar--secondary .md-sidebar__scrollwrap::-webkit-scrollbar {
    display: none !important;  /* Chrome/Safari */
}

.md-sidebar--secondary .md-sidebar__inner {
    width: 24rem !important;
}

/* Make TOC nav items wrap instead of truncate */
.md-nav--secondary .md-nav__link {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    text-overflow: clip !important;
    overflow: visible !important;
    font-size: 0.65rem !important;
    line-height: 1.3 !important;
    padding: 0.2rem 0.4rem !important;
}

.md-nav--secondary .md-nav__item {
    max-width: none !important;
    overflow: visible !important;
}

/* Reduce nested indentation */
.md-nav--secondary .md-nav__item .md-nav__item {
    padding-left: 0.5rem !important;
}

/* Content area adjustment */
@media screen and (min-width: 76.25em) {
    .md-sidebar--secondary {
        width: 24rem !important;
    }

    .md-content {
        margin-right: 24rem !important;
    }
}

/* Remove ellipsis on nav links */
.md-nav__link {
    text-overflow: clip !important;
    overflow: visible !important;
    white-space: normal !important;
}
