/* One keyboard indicator; taps and restored dialog focus leave no outline. */
html {
  --bn-keyboard-focus: var(--crm-ink-soft, var(--account-muted, var(--muted, #58647A)));
}
html[data-input-method="pointer"] :where(a[href], button, input, select, textarea, summary, [tabindex], [role="button"], [role="tab"]):focus,
:where(a[href], button, input, select, textarea, summary, [tabindex], [role="button"], [role="tab"]):focus:not(:focus-visible) {
  outline: none;
}
:where([tabindex="-1"]):not(a, button, input, select, textarea, [role="button"], [role="tab"]):focus {
  outline: none;
}
html:not([data-input-method="pointer"]) :where(
  a[href], button, summary, [role="button"], [role="tab"],
  input:is([type="checkbox"], [type="radio"], [type="range"], [type="file"]),
  [tabindex]:not([tabindex="-1"])
):where(:not(.crm-select-button, .crm-picker-button, .schedule-event)):focus-visible,
html:not([data-input-method="pointer"]) :where(
  .crm-switch, .staff-access-switch, .schedule-day-toggle, .schedule-mode-choice
) input:focus-visible + span,
html:not([data-input-method="pointer"]) .crm-upload-control:has(input:focus-visible) {
  outline: 2px solid var(--bn-keyboard-focus);
  outline-offset: 2px;
}
/* Keep keyboard focus inside clipped tab and calendar surfaces. */
html:not([data-input-method="pointer"]) :where(
  .crm-connected-tabs > a, .crm-connected-tabs > button,
  .service-tab, .service-tab-panel, .schedule-team-cell-action,
  .crm-date-picker-day, .crm-picker-day, .bn-ledger-range-day
):focus-visible {
  outline-offset: -3px;
}
