/*
 * Maps Exactun design tokens (tokens.css) onto Bootstrap 5.3's --bs-*
 * custom properties so the vendored vendor/bootstrap.min.css picks up the
 * customer-app theme without a Sass build.
 *
 * Load order matters: this file must load AFTER vendor/bootstrap.min.css
 * (same :root selector and property names, so the later file wins) and
 * BEFORE the .ds-* component files and application.css.
 *
 * -rgb companions cannot be derived from var(); they are hand-decomposed
 * from the hex token noted beside each one. Update them if the token changes.
 */

:root {
  /* Primary and links */
  --bs-primary: var(--color-primary);
  --bs-primary-rgb: 36, 31, 89; /* --color-primary #241f59 */
  --bs-link-color: var(--color-primary);
  --bs-link-color-rgb: 36, 31, 89; /* --color-primary #241f59 */
  --bs-link-hover-color: var(--color-primary-strong);
  --bs-link-hover-color-rgb: 23, 18, 63; /* --color-primary-strong #17123f */
  --bs-primary-bg-subtle: var(--color-avatar-bg);
  --bs-primary-border-subtle: var(--color-border-strong);
  --bs-primary-text-emphasis: var(--color-primary);

  /* Body */
  --bs-body-bg: var(--color-page);
  --bs-body-color: var(--color-ink);
  --bs-body-font-family: Arial, Helvetica, sans-serif;

  /* Shape */
  --bs-border-color: var(--color-border);
  --bs-border-radius: var(--radius-md);
  --bs-border-radius-sm: var(--radius-sm);
  --bs-border-radius-lg: var(--radius-lg);
  --bs-border-radius-pill: var(--radius-pill);

  /* Focus (same gold as --focus-ring) */
  --bs-focus-ring-color: rgba(157, 124, 55, 0.45);

  /* Status "subtle" triplets */
  --bs-success-bg-subtle: var(--color-success-bg);
  --bs-success-border-subtle: var(--color-success-border);
  --bs-success-text-emphasis: var(--color-success-text);
  --bs-warning-bg-subtle: var(--color-warning-bg);
  --bs-warning-border-subtle: var(--color-warning-border);
  --bs-warning-text-emphasis: var(--color-warning-text);
  --bs-danger-bg-subtle: var(--color-danger-bg);
  --bs-danger-border-subtle: var(--color-danger-border);
  --bs-danger-text-emphasis: var(--color-danger-text);
  --bs-info-bg-subtle: var(--color-info-bg);
  --bs-info-border-subtle: var(--color-info-border);
  --bs-info-text-emphasis: var(--color-info-text);
}

/*
 * Bootstrap compiles the pagination active/focus colors as literal hex on
 * the .pagination selector rather than reading --bs-primary, so they need a
 * component-level override (same selector, loaded later, wins).
 */
.pagination {
  --bs-pagination-active-bg: var(--color-primary);
  --bs-pagination-active-border-color: var(--color-primary);
  --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(157, 124, 55, 0.45);
}
