.wy-nav-content {
    max-width: 96% !important;
}
.sphx-glr-thumbcontainer .xref.std.std-ref {
    display: none;
}

/* Hide images in the gallery */
.sphx-glr-thumbcontainer img {
display: none !important;
}

/* Reset container height to fit text only */
.sphx-glr-thumbcontainer {
    min-height: auto !important;
    height: auto !important;
}

/* Set background as white for the sidebar logo and the Leaspy logo in index */
.sidebar-logo, img[src*="leaspy_logo.png"] {
    background-color: white;
    padding: 5px;       /* Adds some space around the logo */
    border-radius: 4px; /* Rounds the corners of the background */
}

/* Pandas DataFrame styling for Furo */
table.dataframe {
    border: none !important;
    border-collapse: collapse;
    border-spacing: 0;
    margin-bottom: 1em;
    width: auto;
    overflow-x: auto;
    display: block; /* Makes it scrollable if wide */
}

table.dataframe thead {
    border-bottom: 1px solid var(--color-border-primary);
    vertical-align: bottom;
}

table.dataframe tr, table.dataframe th, table.dataframe td {
    text-align: right;
    vertical-align: middle;
    padding: 0.5em 0.5em;
    line-height: normal;
    white-space: normal;
    max-width: none;
    border: none;
    color: var(--color-foreground-primary); /* Fix dark mode text */
}

table.dataframe th {
    font-weight: bold;
    background: var(--color-background-secondary); /* Header background */
}

table.dataframe tbody tr:nth-child(odd) {
    background: var(--color-background-secondary); /* Zebra striping */
}

table.dataframe tbody tr:hover {
    background: var(--color-background-hover); /* Hover effect */
}

/* --- API Reference Styling --- */

/* 1. Class Separation (Big) */
dl.py.class {
    margin-bottom: 4rem !important;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--color-border-primary); /* Stronger separator */
}

/* 2. Method/Function Separation (Small) */
dl.py.method, dl.py.function {
    margin-bottom: 2rem !important;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border-secondary); /* Lighter separator */
}

/* Remove the border from the last method to avoid double borders with the class end */
dl.py.class > dd > dl.py.method:last-child {
	
    border-bottom: none;
    margin-bottom: 0 !important;
    padding-bottom: 0;
}

/* 3. Signature Highlighting - Split for differentiation */

/* Class Header (Level 1) */
dl.py.class > dt {
    background-color: var(--color-background-secondary);
    padding: 0.8rem;
    border-radius: 4px;
    margin-top: 1.5rem;
    font-weight: bold;
    border-left: 5px solid var(--color-brand-primary); /* Brand Color (Blue) */
    display: block;
    text-indent: 0 !important;
    margin-left: 0 !important;
    width: 100%;
    box-sizing: border-box;
}

/* Method/Function Header (Level 2) */
dl.py.function > dt,
dl.py.method > dt {
    background-color: var(--color-background-secondary);
    padding: 0.6rem;
    border-radius: 4px;
    margin-top: 1.0rem;
    font-weight: bold;
    border-left: 3px solid var(--color-foreground-primary); /* Darkest/Thickest (Black/Dark Grey) */
    display: block;
    text-indent: 0 !important;
    margin-left: 0 !important;
    width: 100%;
    box-sizing: border-box;
}

/* 4. Indentation and Vertical Lines */

/* Level 1: Class Body (Darkest Line, aligned left) */
dl.py.class > dd {
    margin-left: 0 !important; /* Move line to the left edge */
    padding-left: 1.5rem; /* Keep content indented */
    border-left: 4px solid var(--color-brand-primary); /* Brand Color (Blue) */
}

/* Level 2: Method/Function Body (Brand Color Line) */
dl.py.method > dd,
dl.py.function > dd {
    margin-left: 0 !important; /* Move line to the left edge */
    padding-left: 1.5rem;
    border-left: 2px solid var(--color-foreground-primary);
}

/* 5. Styling for Parameters, Returns, Attributes (Field Lists) */
/* Removed Level 3 indentation/borders as requested, keeping only tight spacing */

/* The Headers (e.g. "Parameters", "Returns") - Simple bold, no box */
dl.field-list > dt {
    font-weight: bold;
    font-size: 1.0em;
    color: var(--color-foreground-primary);
    margin-top: 1.0rem;
    margin-bottom: 0.5rem;
    padding: 0;
    border: none;
    background: none;
}

/* Field Lists Content - No vertical line, just simple indentation */
dl.field-list > dd {
    margin-left: 0 !important;
    padding-left: 1.0rem;
    border-left: none; /* Removed the third level line */
}

/* The Items (e.g. parameter names like "settings", "name") */
dl.field-list > dd > dl > dt {
    background-color: transparent !important;
    padding: 0 !important;
    margin-top: 0.0rem !important; /* Zero margin */
    margin-bottom: 0.0rem !important;
    font-weight: bold;
    border: none !important;
    color: var(--color-foreground-primary);
    font-family: var(--font-stack-monospace);
    line-height: 1.2;
}

/* The Descriptions (e.g. "Name of the algorithm.") */
dl.field-list > dd > dl > dd {
    margin-top: 0.0rem !important;
    margin-bottom: 0.1rem !important; /* Extremely tight */
    margin-left: 1.0rem !important;
}

/* Remove default margins from paragraphs inside descriptions to fix spacing */
dl.field-list > dd > dl > dd > p {
    margin-top: 0 !important;
    margin-bottom: 0.0rem !important; /* Zero margin */
    line-height: 1.3;
}

/* Add a small bullet or marker to parameter names to make them distinct */
dl.field-list > dd > dl > dt::before {
    content: "•";
    color: var(--color-foreground-muted);
    margin-right: 0.5rem;
    font-weight: normal;
}
