/* Custom CSS for diagram scaling and full-width content */

/* Increase max-width of main content container */
.rst-content {
    max-width: 100%;
    margin: 0;
}

/* Make documentation content wider */
.wy-nav-content-wrap {
    background: #fcfcfc;
}

.wy-nav-content {
    max-width: 100%;
    margin: 0;
    padding: 0 2rem;
}

/* Reduce the container constraints */
.wy-container {
    max-width: 100%;
    margin: 0;
}

/* Constrain PlantUML diagrams to fit within page width */
.figure {
    max-width: 100%;
    overflow-x: auto;
}

.figure img,
.figure svg {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Specific styling for PlantUML generated images */
img[src*="plantuml"],
svg.plantuml {
    max-width: 100%;
    height: auto;
    background-color: white;
    padding: 10px;
}

/* Make sure images in figure captions scale properly */
.figure p {
    text-align: center;
}

/* Responsive container for diagrams */
@media (max-width: 768px) {
    .figure {
        margin-left: -1em;
        margin-right: -1em;
    }
    
    .figure img,
    .figure svg {
        max-width: 100vw;
    }
}

/* Code blocks should also be responsive */
.highlight {
    overflow-x: auto;
}

/* Ensure proper spacing around diagrams */
.rst-content .figure {
    margin: 1.5em 0;
}

/* Adjust table width */
.rst-content table.docutils {
    width: 100%;
}
