/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 * Preserve contrast for the existing light-theme composition charts.
 */
@media screen {
    /* These amCharts renderers explicitly request dark labels and light slice
       outlines. A light plot surface retains the supplied data colors. */
    :is([data-theme="dark"], .theme-dark, .dark-theme) :is(.adhr-chart, .exh-composition-chart, .pshr-composition .pshr-chart),
    :is([data-theme="dark"], .theme-dark, .dark-theme) .chrh-visual-shell:has([data-chrh-view="chart"][aria-pressed="true"]) .chrh-visual {
        background-color: #faf8f4;
        outline: 1px solid #819980;
        border-radius: 8px;
    }
    /* Keep map attribution and zoom controls legible while tiles are loading
       or when the page explicitly selects a dark theme. Marker colors are untouched. */
    :is([data-theme="dark"], .theme-dark, .dark-theme) .leaflet-container {
        background-color: #18291f;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme) .leaflet-control-zoom a {
        color: #f3eee3 !important;
        background-color: #20372a !important;
        border-color: #819980 !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme) .leaflet-control-zoom a:is(:hover, :focus-visible) {
        color: #f3eee3 !important;
        background-color: #39543f !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme) .leaflet-control-zoom a:is(.leaflet-disabled, [aria-disabled="true"]) {
        color: #aebbb0 !important;
        background-color: #29372e !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme) .leaflet-control-zoom a:focus-visible {
        outline: 3px solid #dfc58b;
        outline-offset: 2px;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme) .leaflet-control-attribution {
        color: #c3c7bc !important;
        background-color: rgba(24, 41, 31, .94) !important;
    }
    :is([data-theme="dark"], .theme-dark, .dark-theme) .leaflet-control-attribution a {
        color: #dfc58b !important;
    }
}
