/* Apply borders and center alignment to tables inside rendered content */
.md-typeset table {
    border-collapse: collapse;
    width: 100%;
}

.md-typeset table th,
.md-typeset table td {
    border: 1px solid black;
    padding: 4px;
}

/* Default center alignment for tables without explicit alignment */
/* Default center alignment for tables without explicit alignment.
   Match the theme's more specific selectors (table:not([class]) / td:not([align]))
   so our rules win when loaded later. */
.md-typeset table:not([class]) th:not([align]):not(.text-left):not(.text-center):not(.text-right),
.md-typeset table:not([class]) td:not([align]):not(.text-left):not(.text-center):not(.text-right) {
    text-align: center;
}

/* Respect alignment classes from MyST-Parser (use same specificity to override) */
.md-typeset table:not([class]) th.text-left,
.md-typeset table:not([class]) td.text-left,
.md-typeset table th.text-left,
.md-typeset table td.text-left {
    text-align: left;
}

.md-typeset table:not([class]) th.text-center,
.md-typeset table:not([class]) td.text-center,
.md-typeset table th.text-center,
.md-typeset table td.text-center {
    text-align: center;
}

.md-typeset table:not([class]) th.text-right,
.md-typeset table:not([class]) td.text-right,
.md-typeset table th.text-right,
.md-typeset table td.text-right {
    text-align: right;
}

/* Improve header row appearance */
.md-typeset table thead th {
    background-color: #f0f0f0;     /* light gray background */
    color: #333;                   /* dark text */
    font-weight: bold;             /* ensure boldness */
    font-size: 1.05em;             /* slightly larger font */
    border-bottom: 2px solid #444; /* thicker bottom border */
    padding: 6px;
}

/* Optional: add hover effect for entire row */
.md-typeset table tbody tr:hover {
    background-color: #f9f9f9;
}


.md-typeset table thead th:first-child {
    border-top-left-radius: 6px;
}
.md-typeset table thead th:last-child {
    border-top-right-radius: 6px;
}
