.figure-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 1.2rem 0;
    background: none;
    box-shadow: none;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.subfigure-container {
    position: absolute;
    inset: 0;
    background: none;
    padding: 0;
    border: none;
}

.subfigure-container.active {
    position: relative;
}

.subfigure-container.inactive {
    opacity: 0;
    pointer-events: none;
    z-index: 0;
}

/* Tabs container: display buttons inline with a bottom border to indicate grouping */
.tabs-container {
    display: flex;
    justify-content: flex-start;
    gap: 0;
    margin-bottom: 0.4rem;
}


.figure-tab {
    background: none;
    border: none;
    font-size: 0.9rem;
    color: #444;
    cursor: pointer;
    border: 1px solid #ccc;
    padding: 0.2rem 0.5rem;
}

.figure-tab:hover {
    color: #000;               /* subtle darkening on hover */
    background: none;          /* no hover background */
}


.export-container {
    display: flex;
    justify-content: flex-end;
    gap: 0.3rem;
    margin-bottom: 0.3rem;
}

.export-container button {
    background: none;
    color: #666;
    border: none;
    padding: 0;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: underline;
}

.export-container button:hover {
    color: #000;
}

.exampleblock.plot{
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Example block styling for plots */
.exampleblock.plot,.exampleblock.grid,.exampleblock.image {
    border: none;
    padding: 0;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
}

.exampleblock.plot>.content,.exampleblock.grid>.content ,.exampleblock.image>.content {
    order: 1;
    padding: 0;
    border: none;
}

.exampleblock.plot>.title,.exampleblock.grid>.title,.exampleblock.image>.title, .plotly-figure-caption{
    order: 2;
    text-align: center;
    font-style: italic;
    margin-top: 0.5rem;
}

.exampleblock.example {
    border-left: 4px solid var(--brand-primary);
}
