/* Shared accents follow the organism's secondary colour. */
:root {
  --theme-secondary: var(--theme-color-secondaire, #ffc107);
  --wf-accent: var(--theme-color-secondaire, #ffc107);
  --wf-accent-ink: #17212b;
  --wf-accent-soft: color-mix(in srgb, var(--wf-accent) 12%, white);
  --wf-accent-border: color-mix(in srgb, var(--wf-accent) 38%, white);
  --bs-warning: var(--wf-accent);
  --bs-warning-bg-subtle: var(--wf-accent-soft);
  --bs-warning-border-subtle: var(--wf-accent-border);
  --bs-warning-text-emphasis: color-mix(in srgb, var(--wf-accent) 55%, #18212b);
}
body .btn-warning {
  --bs-btn-color: var(--wf-accent-ink);
  --bs-btn-bg: var(--wf-accent);
  --bs-btn-border-color: var(--wf-accent);
  --bs-btn-hover-color: var(--wf-accent-ink);
  --bs-btn-hover-bg: color-mix(in srgb, var(--wf-accent) 90%, var(--wf-accent-ink));
  --bs-btn-hover-border-color: var(--bs-btn-hover-bg);
  --bs-btn-active-color: var(--wf-accent-ink);
  --bs-btn-active-bg: var(--bs-btn-hover-bg);
  --bs-btn-active-border-color: var(--bs-btn-hover-bg);
  --bs-btn-disabled-color: var(--wf-accent-ink);
  --bs-btn-disabled-bg: var(--wf-accent);
  --bs-btn-disabled-border-color: var(--wf-accent);
}
body .btn-outline-warning {
  --bs-btn-color: var(--bs-warning-text-emphasis);
  --bs-btn-border-color: var(--wf-accent);
  --bs-btn-hover-color: var(--wf-accent-ink);
  --bs-btn-hover-bg: var(--wf-accent);
  --bs-btn-hover-border-color: var(--wf-accent);
  --bs-btn-active-color: var(--wf-accent-ink);
  --bs-btn-active-bg: var(--wf-accent);
  --bs-btn-active-border-color: var(--wf-accent);
}
body .bg-warning, body .text-bg-warning { background-color:var(--wf-accent) !important; color:var(--wf-accent-ink) !important; }
body .text-warning { color:var(--bs-warning-text-emphasis) !important; }
body .border-warning { border-color:var(--wf-accent) !important; }
body .alert-warning { --bs-alert-color:var(--bs-warning-text-emphasis); --bs-alert-bg:var(--wf-accent-soft); --bs-alert-border-color:var(--wf-accent-border); }

/* One accent treatment for custom primary actions, on every workspace page. */
:root body :is(.crm-primary, .rp-button.primary, .hab-btn.gold, .ev-btn-primary, .wf-accent-button) {
  background: var(--theme-color-secondaire, #ffc107) !important;
  border-color: var(--theme-color-secondaire, #ffc107) !important;
  color: var(--wf-accent-ink, #000) !important;
}
:root body :is(.crm-primary, .rp-button.primary, .hab-btn.gold, .ev-btn-primary, .wf-accent-button):hover {
  background: var(--theme-color-secondaire, #ffc107) !important;
  color: var(--wf-accent-ink, #000) !important;
  filter: brightness(.94);
}
