/* css styles */
rect.mermaid-loop {
    fill: #f9f9a3 !important;
    stroke: #333 !important;
    stroke-width: 2px !important;
}

/* Style the lines forming the loop box */
.loopLine {
    stroke: #333 !important;
    /* Dark border */
    stroke-width: 2px !important;
    /* Border thickness */
}

/* Style the label box (the small box around the word 'loop') */
.labelBox {
    fill: #f9f9a3 !important;
    /* Yellow background */
    stroke: #333 !important;
    /* Dark border */
    stroke-width: 1.5px !important;
}

/* Style the loop text */
.loopText {
    font-size: 16px !important;
    font-weight: bold !important;
    fill: #000 !important;
    /* Text color */
}

.figure {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: #fffff6 !important;
}

.quarto-float-caption-bottom {
    position: relative;
    padding-top: 10px;
    /* Adds space above the caption for the line */
}

.quarto-float-caption-bottom::before {
    content: "";
    display: block;
    width: 20%;
    /* Line is 1/5th of the container width */
    height: 2px;
    /* Thickness of the line */
    background-color: rgb(223, 222, 222);
    /* Color of the line */
    position: absolute;
    top: 0;
    /* Position the line at the top of the caption */
    left: 0;
    /* Left-justify the line */
}

.quarto-float {
    margin-bottom: 1.5em;
    /* Adds 20px of padding below the figure */
}

/* Adjust code block styling for narrow layouts */
pre,
code {
    font-size: 0.85em;
}

pre {
    white-space: pre-wrap;
    /* Allow wrapping of long lines */
    word-break: break-word;
    overflow-x: auto;
    /* Enable horizontal scroll if needed */
}

/* Enhanced code block styling for Quarto */
pre.sourceCode,
.sourceCode pre {
    font-size: 0.75em !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
    overflow-x: auto !important;
}

.sourceCode code,
.sourceCode .line {
    font-size: inherit !important;
}