/* Palettes supply the base colour and foreground. The button style owns the
   composed surface, glass sheen, icon treatment and interaction effects. */
/* Filled Action only. Subtle, icon-only-subtle and icon-only-tinted have no fill, so the
   on-fill contrast ink (--surux-primary-contrast) is unreadable on the page surface. */
html[data-surux-theme] :is(.surux-button-tone-action, .primary-button):not(:where(.surux-command-button-icon-only-subtle, .surux-command-button-subtle-surface, .surux-command-button-icon-only-tinted)) {
  --surux-button-bg: var(--surux-primary-action-bg) !important;
  --surux-button-fg: var(--surux-primary-contrast) !important;
  --surux-button-icon-fg: var(--surux-primary-contrast) !important;
  --surux-raised-surface: var(--surux-primary-action-bg) !important;
}
/* State-specific surfaces supply their own foreground. Keep this selector weak
   enough for button materials to own rendering and exclude disabled actions. */
html[data-surux-theme] :is(.surux-button-tone-action, .primary-button):not(:where(.surux-command-button-icon-only-subtle, .surux-command-button-subtle-surface, .surux-command-button-icon-only-tinted, :disabled, .disabled, [aria-disabled="true"])) {
  color: var(--surux-primary-contrast) !important;
}
html[data-surux-theme] :is(.surux-command-button, .surux-button, .surux-search-submit-btn, .surux-icon-btn, .surux-theme-row, .surux-input, .form-check-input, .primary-button, .secondary-button, .theme-button, .segmented-control-button):focus-visible {
  outline: 2px solid var(--surux-primary) !important;
  outline-offset: 3px !important;
}
/* Bare Bootstrap buttons are not a SuruX material. They keep Bootstrap's fill and only gain the shared ring. */
html[data-surux-theme] .btn:where(:not(.btn-close, .surux-button, .surux-icon-btn, .surux-command-button)):focus-visible {
  outline: 2px solid var(--surux-primary) !important;
  outline-offset: 3px !important;
}
/* Breadcrumb Back clears its outline in the component and the header band. */
html[data-surux-theme] .surux-breadcrumb-back:focus-visible {
  outline: 2px solid var(--surux-primary) !important;
  outline-offset: 3px !important;
}
/* The ticket action bar sets outline:none !important at (0,7,1). One more pseudo beats it. */
html .surux-surveillance-events-v2-page .surux-ticket-compact .surux-ticket-action-bar .btn.surux-button.surux-command-button.surux-command-button-icon-only:focus-visible {
  outline: 2px solid var(--surux-primary) !important;
  outline-offset: 3px !important;
}

/* Bootstrap's white marks disappear on bright dark-mode accents. */
html[data-surux-theme] .form-check-input:not(:disabled):is(:checked, :indeterminate) {
  background-color: var(--surux-primary-action-bg) !important;
}
html[data-surux-theme] .form-check-input[type="checkbox"]:checked:not(:disabled) {
  background-image: var(--surux-checkbox-mark) !important;
}
html[data-surux-theme] .form-check-input[type="radio"]:checked:not(:disabled) {
  background-image: var(--surux-radio-mark) !important;
}
html[data-surux-theme] .form-check-input[type="checkbox"]:indeterminate:not(:disabled) {
  background-image: var(--surux-indeterminate-mark) !important;
}
html[data-surux-theme] .form-switch .form-check-input:checked:not(:disabled) {
  background-image: radial-gradient(circle closest-side, var(--surux-primary-contrast) 72%, transparent 78%) !important;
  background-size: 50% 100%;
}

/* Palettes supply the base colour and foreground. The button style owns the
   composed surface, glass sheen, icon treatment and interaction effects. */
