/* THE ONE PLACE BobFit's theme feeds the BobsComponents package (docs/CSS-CONTRACT.md in that repo).
   The package reads --bob-* tokens; here they are defined from BobFit's own theme variables
   (themes.css), so switching [data-theme] restyles every package component.

   Deliberately unlayered: the package's own tokens, including its prefers-color-scheme dark values, sit in
   cascade layer `bob`, so these always win and a dark-mode OS can't flip package components away from the
   active BobFit theme (BobFit themes decide light/dark themselves).

   Per-component restyling (e.g. the full-screen workout item editor) overrides --bob-modal-* etc. at the
   caller, not here. Variables used by the package: docs/COMPONENT-THEME-VARIABLES.md. */
:root {
  --bob-color-surface: var(--surface);
  --bob-color-border: var(--surface-border);
  --bob-color-text: var(--ink);
  --bob-color-text-muted: var(--ink-muted);
  --bob-color-ground: var(--ground);
  --bob-color-accent: var(--accent);
  --bob-color-accent-text: var(--accent-contrast);
  --bob-color-success: var(--accent-2);
  --bob-color-danger: var(--danger);
  --bob-color-focus: var(--focus-ring);
  --bob-color-surface-alt: var(--surface-strong);
  --bob-color-danger-text: #FFFFFF; /* the old ConfirmDialog confirm button was always white-on-danger */
  --bob-color-info: var(--accent);   /* the old info toast icon used --accent */
  --bob-color-warning: #B45309;      /* BobFit has no warning colour; only the error card uses it */
  --bob-font-family: var(--font-body);
  --bob-font-display: var(--font-display);
  --bob-font-mono: var(--font-mono);
  --bob-radius-sm: var(--radius-sm);
  --bob-radius-md: var(--radius-md);
  --bob-radius-lg: var(--radius-lg);
  --bob-shadow: var(--shadow);
}

/* Spinner look: BobFit's loading label is muted ink and the spinning arc is the accent colour (also inside
   AsyncButton while busy), as before the package swap. Variable for the label; the icon colour is a rule
   because the package's icon strokes currentColor. */
:root {
  --bob-spinner-color: var(--ink-muted);
}
.bob-spinner__icon {
  color: var(--accent);
}

/* Bootstrap's reboot (css/bootstrap, unlayered) sets element-level rules (h3, p, button) that beat the package's
   layered class rules whatever the specificity. These restate the few package properties it overrides, so
   the components look as designed. Remove this block if Bootstrap ever moves into its own cascade layer. */
.bob-modal__header .bob-modal__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.bob-modal__close {
  border-radius: 50%;
}
.bob-button {
  border-radius: var(--bob-button-radius, var(--bob-radius-md));
}
.bob-confirm__message,
.bob-fullscreen-loader__text {
  margin: 0;
}

/* Development only: the exact-cause BobErrorCard sits right under BobFit's own error card. */
.route-error-card + .bob-error-card,
.immersive-error-card + .bob-error-card {
  margin-top: 0.75rem;
}

/* ElapsedClock (the workout clock): BobFit's bold mono readout. */
:root {
  --bob-elapsed-clock-color: var(--ink);
  --bob-elapsed-clock-size: 1.3rem;
}
.bob-elapsed-clock {
  font-weight: 700;
}
