/* Dark mode support.
 *
 * Bootstrap 5.3 themes itself from the data-bs-theme attribute on <html>, which
 * base.html sets from prefers-color-scheme. Everything here covers the gaps that
 * Bootstrap cannot: our own hardcoded colors, and the handful of Bootstrap
 * utilities that are deliberately fixed rather than adaptive.
 */

/* Tiles behind box art. BGG images are frequently transparent PNGs or have their
 * own white matte, so these sit *under* the artwork and cannot simply follow the
 * page background -- a near-black tile makes dark box art vanish into it. These
 * stay a neutral that reads as "empty slot" in both themes instead. */
:root {
  --bgdb-tile: #f0f0f0;
  --bgdb-tile-empty: #e9ecef;
}

[data-bs-theme="dark"] {
  --bgdb-tile: #2b3035;
  --bgdb-tile-empty: #343a40;
}

/* Table headers. Bootstrap's .table-light pins itself to a light palette in both
 * themes, so it is unusable here. --bs-secondary-bg is the adaptive equivalent,
 * giving the same subtle contrast against the row background either way. */
.bgdb-thead {
  --bs-table-bg: var(--bs-secondary-bg);
  --bs-table-color: var(--bs-body-color);
}
