/*
 * @license
 * Copyright (c) 2023 - 2026 Christopher Bishop <christopher.bishop@webkitjs.com>
 *
 * The above copyright notice shall be included in all copies or substantial portions of the Software.
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
 */

/* Bishop: reset + pre-boot fallbacks ONLY. Every styled element in the app is a
 * stylekit visualAdapter (see the *.styled.ts files); the theme tokens land as
 * an inline :root{} sheet FIRST in <head>, so anything declared here wins the
 * cascade — which is exactly the user-override mechanism. The fallback values
 * keep the pre-boot frame readable before the runtime applies the theme. */

:root {
  color: var(--wk-color-label, #111827);
  background: var(--wk-color-grouped-background, #f5f7fb);
  font-family: var(
    --wk-type-font-family,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif
  );
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

/* Bishop: this site wants FLAT filled buttons - no raised drop shadow. The
   framework keeps the shadow ON by default (and per-button via elevated={false});
   the site opts every button out at once by clearing the elevation var. */
:root {
  --wk-button-elevation: none;
}

/* Bishop: themable custom scrollbars driven by the stylekit tokens, so they match
   the app in both appearances (the runtime also stamps color-scheme, so even a
   UA-default scrollbar follows the theme instead of the OS). The thumb is inset
   with a rounded, padded clip; the track is clear. */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--wk-color-scrollbar-thumb, rgba(60, 60, 67, 0.34))
    var(--wk-color-scrollbar-track, transparent);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--wk-color-scrollbar-track, transparent);
}

::-webkit-scrollbar-thumb {
  background: var(--wk-color-scrollbar-thumb, rgba(60, 60, 67, 0.34));
  border-radius: 8px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--wk-color-scrollbar-thumb-hover, var(--wk-color-secondary-label, rgba(60, 60, 67, 0.5)));
  background-clip: padding-box;
}
