/* ============================================
   RewardSmart × Bootstrap 5.3 brand override layer
   ============================================
   Reassigns Bootstrap's own CSS custom properties (--bs-*) to this
   site's existing design tokens (see css/styles.css's :root block,
   the single source of truth for these values) so Bootstrap's
   components/utilities render in the site's actual brand instead of
   Bootstrap's stock blue/gray. Loaded AFTER bootstrap.min.css and
   AFTER styles.css, so these overrides win the cascade without
   needing !important anywhere.

   Known gap (documented, not a bug): Bootstrap's spacing utilities
   (.p-*, .m-*, .gap-*) are generated at Sass-compile time from
   Bootstrap's own $spacer scale and can't be retroactively remapped
   via CSS custom properties without a Sass rebuild, which this site's
   build-step-free deploy pipeline doesn't support. Keep using the
   existing --space-* custom properties directly in custom rules;
   treat Bootstrap's spacing utilities as acceptable only on new,
   genuinely Bootstrap-sourced markup where exact rhythm-matching to
   the rest of the site isn't critical. */

:root {
  /* Brand → Bootstrap theme colors */
  --bs-primary: var(--brand);
  --bs-primary-rgb: 37, 99, 235;
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: 37, 99, 235;
  --bs-link-hover-color: var(--brand-dark);
  --bs-link-hover-color-rgb: 29, 78, 216;

  --bs-success: var(--emerald);
  --bs-success-rgb: 16, 185, 129;
  --bs-warning: var(--gold);
  --bs-warning-rgb: 245, 158, 11;
  --bs-danger: var(--rose);
  --bs-danger-rgb: 244, 63, 94;

  /* Neutral scale — same 100-900 convention as styles.css already uses */
  --bs-gray-100: var(--gray-100);
  --bs-gray-200: var(--gray-200);
  --bs-gray-300: var(--gray-300);
  --bs-gray-400: var(--gray-400);
  --bs-gray-500: var(--gray-500);
  --bs-gray-600: var(--gray-600);
  --bs-gray-700: var(--gray-700);
  --bs-gray-800: var(--gray-800);
  --bs-gray-900: var(--gray-900);

  /* Typography */
  --bs-body-font-family: var(--font-primary);
  --bs-body-color: var(--gray-900);

  /* Radius — this site's scale runs noticeably rounder than Bootstrap's
     defaults; this remapping alone does most of the work of keeping
     Bootstrap components from reading as "generic Bootstrap". */
  --bs-border-radius: var(--radius-md);      /* 0.75rem, Bootstrap default 0.375rem */
  --bs-border-radius-sm: var(--radius-sm);   /* 0.375rem */
  --bs-border-radius-lg: var(--radius-lg);   /* 1rem */
  --bs-border-radius-xl: var(--radius-xl);   /* 1.5rem */
  --bs-border-radius-xxl: var(--radius-2xl); /* 2rem */
  --bs-border-radius-pill: var(--radius-full);

  /* Shadows */
  --bs-box-shadow: var(--shadow-md);
  --bs-box-shadow-sm: var(--shadow-sm);
  --bs-box-shadow-lg: var(--shadow-lg);
}

/* Bootstrap has no single --bs-heading-font-family variable in 5.3's
   root — headings inherit body font unless told otherwise. */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-display);
}
