/* Portaled surfaces sit outside .theme-dark; use the shared Mantine theme. */
[data-mantine-color-scheme="dark"] :is(.mantine-Modal-content, .mantine-Menu-dropdown, .mantine-Popover-dropdown) {
    --text: #eaf2ff;
    --ink: #eaf2ff;
    --muted: #b4c5dc;
    --line: #3c5775;
    --card: #10223a;
    color: var(--text);
}
[data-mantine-color-scheme="dark"] .mantine-Modal-content,
[data-mantine-color-scheme="dark"] .mantine-Modal-header {
    background: #10223a;
    color: #eaf2ff;
}
[data-mantine-color-scheme="dark"] .mantine-Menu-dropdown .download-description {
    color: var(--muted) !important;
}
[data-mantine-color-scheme="dark"] .mantine-Menu-dropdown .download-menu-item:hover {
    background: #19334f !important;
}
[data-mantine-color-scheme="dark"] .mantine-Modal-content :is(.mantine-Title, .mantine-Modal-title, .mantine-Accordion-control, .mantine-Accordion-content) {
    color: inherit;
}
[data-mantine-color-scheme="dark"] .mantine-Modal-content .mantine-Accordion-item {
    border-color: var(--line);
}
[data-mantine-color-scheme="dark"] .mantine-Modal-content .mantine-Accordion-control:hover {
    background: #19334f;
}
[data-mantine-color-scheme="dark"] .mantine-Modal-content a:not(.kaggle-link-card) {
    color: #8cc7ff;
}
[data-mantine-color-scheme="dark"] .mantine-Modal-content a:not(.kaggle-link-card):hover {
    color: #b9dfff;
}
[data-mantine-color-scheme="dark"] .mantine-Modal-content :is(a, button):focus-visible {
    outline: 2px solid #8cc7ff;
    outline-offset: 2px;
}
[data-mantine-color-scheme="dark"] .mantine-Modal-content .dictionary-table {
    background: #10223a;
    color: #eaf2ff;
    border-color: #3c5775;
}
[data-mantine-color-scheme="dark"] .mantine-Modal-content .dictionary-table :is(th, td) {
    border-color: #3c5775;
    color: #eaf2ff;
}
[data-mantine-color-scheme="dark"] .mantine-Modal-content .dictionary-table th {
    background: #1b3653;
}
[data-mantine-color-scheme="dark"] .mantine-Modal-content .dictionary-table tbody tr:nth-child(even) {
    background: #142b45;
}
/* Keep the approved pale information cards and their readable dark text. */
[data-mantine-color-scheme="dark"] .mantine-Modal-content .kaggle-link-card {
    --text: #07134f;
    --ink: #07134f;
    --muted: #34537a;
    color: #0874ee;
}
[data-mantine-color-scheme="dark"] .mantine-Modal-content .kaggle-link-card small {
    color: #34537a;
}
