/* Custom styles for Laminr API documentation */

/* Make content area wider - remove max-width constraint */
.md-grid {
    max-width: 100% !important;
}

.md-main__inner {
    max-width: 100% !important;
}

/* Make the main content container wider */
.md-content {
    max-width: none !important;
}

/* Adjust container padding for better use of space */
.md-content__inner {
    margin: 0 1rem !important;
}

/* Hide sidebars on API Reference page for maximum width */
.md-sidebar--primary:has(~ .md-content #redoc-iframe),
.md-sidebar--secondary:has(~ .md-content #redoc-iframe) {
    display: none !important;
}

/* Alternative: Hide sidebars when redoc-iframe is present */
body:has(#redoc-iframe) .md-sidebar--primary,
body:has(#redoc-iframe) .md-sidebar--secondary {
    display: none !important;
}

/* Hide search bar on API Reference page (doesn't index API content in iframe) */
body:has(#redoc-iframe) .md-search {
    display: none !important;
}

/* Make the API reference iframe use full width and remove margins when sidebars are hidden */
#redoc-iframe {
    width: 100% !important;
    min-height: 100vh !important;
    border: none !important;
}

/* Remove content padding on API reference page for full width */
body:has(#redoc-iframe) .md-content {
    margin: 0 !important;
}

body:has(#redoc-iframe) .md-content__inner {
    margin: 0 !important;
    padding: 0 !important;
}

/* Remove the h1 title on API reference page since it's redundant with Redoc */
body:has(#redoc-iframe) .md-content h1 {
    display: none !important;
}

/* Reduce sidebar width on larger screens to give more space to content */
@media screen and (min-width: 76.25em) {
    .md-sidebar--primary {
        width: 12rem;
    }

    .md-sidebar--secondary {
        width: 12rem;
    }
}

/* On very large screens, use even more width */
@media screen and (min-width: 100em) {
    .md-main__inner {
        padding: 0 2rem;
    }
}

/* Compact layout: Reduce font sizes by 30% total (0.85 * 0.85 = 0.7225) */
:root {
    --md-typeset-font-size: 0.7225rem;
}

/* Base content font size */
.md-typeset {
    font-size: 0.7225rem;
    line-height: 1.53; /* Keep spacing unchanged */
}

/* Headings */
.md-typeset h1 {
    font-size: 1.445rem; /* 2rem * 0.85 * 0.85 */
    line-height: 1.105; /* Keep spacing unchanged */
    margin: 0 0 0.85rem;
}

.md-typeset h2 {
    font-size: 1.156rem; /* 1.6rem * 0.85 * 0.85 */
    line-height: 1.19; /* Keep spacing unchanged */
    margin: 1.36rem 0 0.68rem;
}

.md-typeset h3 {
    font-size: 0.939rem; /* 1.3rem * 0.85 * 0.85 */
    line-height: 1.275; /* Keep spacing unchanged */
    margin: 1.36rem 0 0.68rem;
}

.md-typeset h4 {
    font-size: 0.795rem; /* 1.1rem * 0.85 * 0.85 */
    line-height: 1.36; /* Keep spacing unchanged */
    margin: 0.85rem 0 0.68rem;
}

.md-typeset h5,
.md-typeset h6 {
    font-size: 0.7225rem;
    line-height: 1.445; /* Keep spacing unchanged */
    margin: 0.85rem 0 0.68rem;
}

/* Paragraphs */
.md-typeset p {
    margin: 0 0 0.85rem;
}

/* Lists */
.md-typeset ul,
.md-typeset ol {
    margin: 0.85rem 0;
}

.md-typeset li {
    margin-bottom: 0.425rem; /* 0.5rem * 0.85 */
}

/* Code blocks */
.md-typeset code {
    font-size: 0.650rem; /* 0.9rem * 0.85 * 0.85 */
    padding: 0.085rem 0.34rem; /* Keep padding unchanged */
}

.md-typeset pre {
    margin: 0.85rem 0;
    padding: 0.85rem;
    line-height: 1.36; /* Keep spacing unchanged */
}

.md-typeset pre code {
    font-size: 0.650rem; /* 0.9rem * 0.85 * 0.85 */
}

/* Tables */
.md-typeset table {
    font-size: 0.650rem; /* 0.9rem * 0.85 * 0.85 */
    margin: 0.85rem 0;
}

.md-typeset th,
.md-typeset td {
    padding: 0.68rem 0.85rem; /* Keep padding unchanged */
}

/* Admonitions (tip, note, warning boxes) */
.md-typeset .admonition {
    font-size: 0.650rem; /* 0.9rem * 0.85 * 0.85 */
    margin: 0.85rem 0;
    padding: 0.68rem 0.85rem; /* Keep padding unchanged */
}

.md-typeset .admonition-title {
    font-size: 0.7225rem;
    padding: 0.51rem 0.85rem 0.51rem 2.55rem; /* Keep padding unchanged */
    margin: -0.68rem -0.85rem 0.68rem; /* Keep margin unchanged */
}

/* Navigation */
.md-nav {
    font-size: 0.650rem; /* 0.9rem * 0.85 * 0.85 */
    line-height: 1.36; /* Keep spacing unchanged */
}

.md-nav__item {
    padding: 0 0.85rem;
}

.md-nav__link {
    margin-top: 0.085rem; /* Keep spacing unchanged */
}

/* Breadcrumbs */
.md-typeset .md-breadcrumb {
    font-size: 0.650rem; /* 0.9rem * 0.85 * 0.85 */
}
