/* Make ReDoc API documentation full-width for better three-column layout */

/* Make the left navigation drawer narrower on ReDoc pages */
body:has(.redoc-iframe) .md-sidebar--primary {
    width: 12rem !important;
}

body:has(.redoc-iframe) .md-sidebar--primary .md-sidebar__scrollwrap {
    width: 12rem !important;
}

/* Hide the right table of contents sidebar on ReDoc pages */
body:has(.redoc-iframe) .md-sidebar--secondary {
    display: none !important;
}

/* Adjust grid layout to full width when nav is hidden */
body:has(.redoc-iframe) .md-grid {
    max-width: 100% !important;
}

/* Make the main container full-width on ReDoc pages */
body:has(.redoc-iframe) .md-main__inner {
    max-width: 100% !important;
    margin: 0 !important;
}

/* Remove margins from the content wrapper */
body:has(.redoc-iframe) .md-content {
    max-width: 100% !important;
    margin: 0 !important;
}

/* Make the article container full-width on ReDoc pages */
body:has(.redoc-iframe) .md-content__inner {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Ensure the ReDoc iframe takes full available width */
.redoc-iframe {
    width: 100vw !important;
    min-height: 85vh !important;
    height: 85vh !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove padding from the main content area on ReDoc pages */
body:has(.redoc-iframe) article {
    padding: 0 !important;
    margin: 0 !important;
}

/* Keep the heading visible with some padding */
body:has(.redoc-iframe) .md-content h1 {
    padding: 1rem 1.6rem 0.5rem 1.6rem;
    margin: 0;
}

/* Add minimal padding to paragraphs before ReDoc */
body:has(.redoc-iframe) .md-content p {
    padding: 0 1.6rem 0.5rem 1.6rem;
    margin: 0;
}

/* Ensure hamburger menu is visible */
body:has(.redoc-iframe) .md-header__button.md-logo {
    display: block !important;
}
