a.sphx-glr-backref-instance {
    text-decoration: underline;
}

.image-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap;
    /* Ensures images don’t break layout */
}

.image-col {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: wrap;
    /* Ensures images don’t break layout */
}

.custom-img {
    display: block;
    justify-content: center;
    /* Center the images */
    align-items: center;
    /* Align them vertically */
    gap: 10px;
    /* Add spacing between images */
    width: auto;
    /* Adjust the percentage as needed */
    height: auto;
    max-width: 48% !important;
    margin: 0 auto;
}

.custom-gif {
    width: auto;
    /* Adjust the percentage as needed */
    height: auto;
    max-width: 48% !important;
    margin: 0 auto;
    display: block;
}

html[data-theme="light"] {
    --pst-color-surface: #f9f9fa;
}

ul.sphx-glr-horizontal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px !important;
    padding: 0;
    margin: 0 auto;
    list-style: none;
    width: fit-content;
    max-width: 100%;
    box-sizing: border-box;
}

ul.sphx-glr-horizontal li {
    margin: 0;
    padding: 0;
}

ul.sphx-glr-horizontal li img.sphx-glr-multi-img {
    display: block;
    max-width: 100%;
    height: auto;
    padding: 5px;
}

img.sphx-glr-single-img {
    display: block;
    max-width: 100%;
    height: auto;
    padding: 5px;
}