/* Dark mode: the colors the pages ask for by name, swapped for ones that read on a dark page.
   The UI library handles its own parts, like cards and menus, from the colors in frame(). */

body.body--dark { color: #eef0ea; }
.body--dark .q-card, .body--dark .q-menu, .body--dark .q-uploader, .body--dark .chip-surface,
.body--dark .heart-surface { color: #eef0ea; }
.body--dark .text-stone-700, .body--dark .q-card .text-stone-700, .body--dark .q-menu .text-stone-700 { color: #eef0ea; }
.body--dark .text-stone-600, .body--dark .q-card .text-stone-600, .body--dark .q-menu .text-stone-600 { color: #dcdfd6; }
.body--dark .text-stone-500, .body--dark .q-card .text-stone-500, .body--dark .q-menu .text-stone-500 { color: #c0c5b8; }
.body--dark .text-stone-400, .body--dark .q-card .text-stone-400, .body--dark .q-menu .text-stone-400 { color: #adb3a5; }
.body--dark .text-amber-700 { color: #fbbf24; }
.body--dark .bg-stone-200 { background-color: #443f3a; }

/* The UI library's color classes can't be overridden directly, but they read these variables. */
.body--dark .text-primary, .body--dark .q-card .text-primary, .body--dark .q-menu .text-primary,
.body--dark .q-uploader .text-primary, .body--dark .chip-surface .text-primary { --q-primary: #bcc3b1; }
.body--dark .text-negative { --q-negative: #ff8f85; }

/* For the same reason, small white surfaces use these rather than bg-white. */
.chip-surface { background-color: #fff; }
.body--dark .chip-surface { background-color: #443f3a; }
.heart-surface { background-color: rgb(255 255 255 / 0.8); }
.body--dark .heart-surface { background-color: rgb(45 41 38 / 0.8); }

/* A species not found yet: its category's emoji as a solid shape. */
.silhouette { filter: brightness(0); opacity: 0.6; }
.body--dark .silhouette { filter: brightness(0) invert(1); opacity: 0.5; }

/* A slider on the page rather than the header: a white knob would vanish on a light page. */
.page-slider .q-toggle__thumb:after { background: var(--q-accent); }

/* OpenStreetMap only has light tiles. This turns them dark and keeps water blue and land green. */
.body--dark .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.9); }
.body--dark .leaflet-container { background-color: #2D2926; }
