/* Focus and selection rings, in one place.

   The 3px halo behind a focused field was written into about twenty rules
   across thirteen stylesheets — every surface had rolled its own copy of
   `box-shadow: 0 0 0 3px var(--brand-blue-soft)`. Editing twenty rules to
   change one decision is how they drift apart, so the decision lives here and
   the copies are overridden rather than hunted down.

   The halo is gone. The border still turns brand blue on focus, which is the
   part that says "you are typing here" — dropping that as well would leave a
   keyboard user with nothing, and this file is loaded last precisely so the
   rule is easy to find and change again.

   Loaded after every other stylesheet, so it wins on order rather than on
   specificity or !important. */

:where(input, textarea, select, [contenteditable="true"]):focus,
:where(input, textarea, select, [contenteditable="true"]):focus-visible,
.jc-dd-btn:focus, .jc-dd-btn:focus-visible,
.cl-fm-search:focus, .cs-name:focus, .cs-pick-q:focus, .cs-pick-sel:focus,
.mc-input:focus, .mc-select:focus, .mc-ta:focus,
.dcr-input:focus, .dcr-select:focus,
.ac-in:focus, .ac-sel:focus, .cds-select:focus,
.cx-ask input:focus, .cx-notes-ta:focus, .cx-post-ta:focus,
.sv-name:focus, .cd-note-t:focus,
.cl-aip-input:focus, .sb-search:focus, .sb-search-input:focus,
.vc-composer:focus, .ac-in:focus, .ac-in.is-bad:focus, .ac-phone:focus,
.demo-input:focus, .ds-find:focus, .sv-input:focus, .vc-aipop-input:focus,
.jc-dd-btn:focus-visible, .dcr-mode:focus-visible, .dcr-prio-r:focus-visible {
  box-shadow: none;
}

/* Containers that took the focus on behalf of a borderless field inside them
   carry the same halo, and the same rule applies. */
:where(.mc-card, .cd-note, .cs-card, .aia-input-wrap, .ags-search,
       .mc-block, .dcr-block, .jc-field, .sb-search, .vc-composer,
       .jc-dd, .cl-aip-input, .ds-find, .ac-phone):focus-within {
  box-shadow: none;
}
/* Those last three carry the ring on the wrapper rather than the field, and
   :where() cannot reach a class-set shadow — so they are named too. */
.sb-search:focus-within, .vc-composer:focus-within, .jc-dd:focus-within,
.ac-phone:focus-within, .ds-find:focus-within {
  box-shadow: none;
}

/* The same halo appears behind things that are *chosen* rather than focused —
   a picked mode card, a selected template. It reads as focus and was called
   that, so it goes the same way: the accent border and the tick already say
   which one is selected, and a glow behind a card that is already outlined is
   the third thing saying it.

   The two 1px rings elsewhere (.an-met.selected, .cs-seg button.active) stay:
   at that width a ring is not a halo, it is the border drawn twice, and
   removing it would thin those borders rather than quieten them. */
.dcr-mode.on,
.dcr-mode:focus-visible,
.an-tpl-card.selected,
.vc-tab.active .vc-tab-num {
  box-shadow: none;
}
