/* tbx-fields.css -- loaded by every surface: the public master layout (every
   public page, the event and purchase pages, account, register), the panel
   sign-in portal, the Staff Portal, the admin app and the promoter layouts. TbxFieldsStylesheetTests
   fails the build when a standalone page or layout head does not link it.

   RULING (Mac, 2026-11-17): "there is a bounding box to be removed -- as a
   rule on ALL pills, when text comes on them, no bounding box."
   The box was the browser's AUTOFILL paint: once Chrome fills a field it gives
   the input a light-blue background (and its own text colour) through a
   user-agent rule marked !important, so no author background can beat it. In a
   pill the input is a square box inside rounded corners, so the paint showed
   as a rectangle in the pill (first seen on the coming-soon Pre-register pill).

   The fix: a transition on the input's background and colour so long that the
   user-agent paint never arrives. The field keeps whatever background and
   text colour its own surface gives it -- transparent inside a white, cream or
   dark pill, or the pill's own fill when the input IS the pill -- so one rule
   serves every surface and no colour is restated here. A transition outranks
   even a user-agent !important in the cascade, which is why this works where a
   background declaration cannot. Measured in Chrome 157 with real autofill
   (CDP Autofill.trigger) and in the headless shell with the autofill state
   forced: without the rule the input turns rgb(232,240,254); with it, the
   field's own colour stays.

   This changes how an autofilled field LOOKS, never WHICH fields autofill:
   the autocomplete tokens on each form (see CLAUDE.md, register page) are
   untouched. */
/* :not(#tbx-af) lifts the rule to one id's weight, so it outranks every
   surface's own autofill rule. Several of those (purchase, drawers, register)
   set `transition: background-color ... !important` without the colour, which
   let Chrome's own text colour through; their box-shadow and text-fill rules
   are left as they are. The hover/focus states need no selectors of their own:
   :-webkit-autofill matches in all of them. */
input:-webkit-autofill:not(#tbx-af),
textarea:-webkit-autofill:not(#tbx-af),
select:-webkit-autofill:not(#tbx-af) {
  -webkit-text-fill-color: currentColor;
  caret-color: currentColor;
  transition: background-color 600000s 0s, color 600000s 0s,
              border-color .15s ease, box-shadow .15s ease !important;
}
/* Firefox paints its autofill through :autofill (yellow background plus a
   filter on older versions). Kept as a separate rule: a selector list holding
   one pseudo-class a browser does not know is dropped whole. */
input:autofill:not(#tbx-af),
textarea:autofill:not(#tbx-af),
select:autofill:not(#tbx-af) {
  -webkit-text-fill-color: currentColor;
  caret-color: currentColor;
  filter: none !important;
  transition: background-color 600000s 0s, color 600000s 0s,
              border-color .15s ease, box-shadow .15s ease !important;
}

/* RULING (Mac, 2026-11-17, same ruling, cart drawer): no square focus box on a
   control somebody CLICKED. A focus ring is for the keyboard: it is drawn on
   :focus-visible only, never on :focus from a mouse or a tap. Text fields are
   unaffected: a focused text field always matches :focus-visible.
   !important and an id's weight because legacy rules (Bootstrap's .btn:focus,
   Webix's dotted list focus) set a mouse-focus outline at higher specificity. A keyboard ring is
   left to each surface; outlines follow border-radius in every current
   engine, so a ring on a rounded control is rounded. */
:focus:not(:focus-visible):not(#tbx-fv) {
  outline: none !important;
}
