/* Tabler is Bootstrap 5 compiled with the "tblr-" variable prefix, so it defines
   --tblr-body-bg where Bootstrap defined --bs-body-bg. site.css, several views and
   scripts still read the --bs- names. This file points each name they use at Tabler's
   value, so they follow Tabler's palette in both themes without being rewritten.
   Declared on [data-bs-theme] as well as :root so a nested theme switch resolves too. */

:root,
[data-bs-theme] {
  --bs-body-bg: var(--tblr-body-bg);
  --bs-body-bg-rgb: var(--tblr-body-bg-rgb);
  --bs-body-color: var(--tblr-body-color);
  --bs-body-font-family: var(--tblr-body-font-family);
  --bs-secondary-color: var(--tblr-secondary-color);
  --bs-secondary-bg: var(--tblr-secondary-bg);
  --bs-tertiary-bg: var(--tblr-tertiary-bg);
  --bs-border-color: var(--tblr-border-color);
  --bs-border-color-translucent: var(--tblr-border-color-translucent);
  --bs-border-radius-lg: var(--tblr-border-radius-lg);
  --bs-link-color: var(--tblr-link-color);
  --bs-link-hover-color: var(--tblr-link-hover-color);

  --bs-primary: var(--tblr-primary);
  --bs-primary-rgb: var(--tblr-primary-rgb);
  --bs-primary-bg-subtle: var(--tblr-primary-bg-subtle);
  --bs-primary-border-subtle: var(--tblr-primary-border-subtle);
  --bs-primary-text-emphasis: var(--tblr-primary-text-emphasis);

  --bs-success: var(--tblr-success);
  --bs-success-rgb: var(--tblr-success-rgb);
  --bs-success-border-subtle: var(--tblr-success-border-subtle);

  --bs-info: var(--tblr-info);
  --bs-info-rgb: var(--tblr-info-rgb);
  --bs-info-bg-subtle: var(--tblr-info-bg-subtle);
  --bs-info-border-subtle: var(--tblr-info-border-subtle);
  --bs-info-text-emphasis: var(--tblr-info-text-emphasis);

  --bs-warning: var(--tblr-warning);
  --bs-warning-rgb: var(--tblr-warning-rgb);
  --bs-warning-bg-subtle: var(--tblr-warning-bg-subtle);
  --bs-warning-text-emphasis: var(--tblr-warning-text-emphasis);

  --bs-danger: var(--tblr-danger);
  --bs-danger-rgb: var(--tblr-danger-rgb);
  --bs-danger-text-emphasis: var(--tblr-danger-text-emphasis);

  --bs-purple: var(--tblr-purple);
}

/* Bootstrap gave every .badge white text, so the views write "badge bg-success" with no
   text class. Tabler expects a matching "text-success-fg" instead and otherwise prints
   grey text on the colored fill. This restores Bootstrap's pairing for that markup.
   An explicit text class in the view (text-dark, text-bg-*) still wins, because
   Tabler's text utilities are !important. */
.badge.bg-primary { color: var(--tblr-primary-fg); }
.badge.bg-secondary { color: var(--tblr-secondary-fg); }
.badge.bg-success { color: var(--tblr-success-fg); }
.badge.bg-info { color: var(--tblr-info-fg); }
.badge.bg-warning { color: var(--tblr-warning-fg); }
.badge.bg-danger { color: var(--tblr-danger-fg); }
.badge.bg-dark { color: var(--tblr-dark-fg); }

/* Tabler underlines every link on hover; Bootstrap only changed its color. These
   site.css components are links styled as chips, rows and menu items, and they already
   show hover with a border or background, so they keep Bootstrap's no-underline hover. */
.topnav-brand:hover,
#topnav-links a:hover,
#mobile-nav a:hover,
.calendar-job-entry:hover,
.client-contact-chips a:hover,
.address-link:hover,
.job-row:hover,
.job-step-filter:hover,
.help-nav-link:hover,
.help-chip:hover {
  text-decoration: none;
}

/* Component variables site.css sets or reads under their Bootstrap names. */
.table-header-themed {
  --tblr-table-color: var(--tblr-body-color);
  --tblr-table-bg: var(--tblr-tertiary-bg);
}

.card {
  --bs-card-inner-border-radius: var(--tblr-card-inner-border-radius);
}
