/* App overrides on top of the apelayo.com theme (see THEME_CSS in app.py).
   Dashboards need more room than the main site's 40rem text column. */
:root {
    --measure: 64rem;
}

/* Plotly charts: text and hover boxes follow the site theme. Plotly writes
   fixed colors inline, so these need !important. Slice labels inside the
   roast-level donut keep the colors set in plots.py. */
.js-plotly-plot .main-svg text:not(.slicetext) {
    fill: var(--muted) !important;
}

.js-plotly-plot .pielayer .slice path {
    stroke: var(--bg) !important;
    stroke-width: 2px !important;
}

.js-plotly-plot .hoverlayer .hovertext path {
    fill: var(--bg) !important;
    stroke: var(--border) !important;
}

.js-plotly-plot .hoverlayer .hovertext text {
    fill: var(--text) !important;
}

.grid h3 {
    margin-top: 0;
}

/* Map tiles are light-only; invert them in dark mode. Markers and
   tooltips sit outside the tile pane and keep their colors. */
@media (prefers-color-scheme: dark) {
    .leaflet-tile-pane {
        filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(0.9);
    }
}

.leaflet-container {
    background: var(--surface);
}
