/* ===== ONE SEARCH BOX (Zach, 2026-12-02: "standardize the look and feel and
   function of the search boxes") =====
   Every search a member types into is <input type="search" class="tmb-search">:
   a 34px pill, white with a grey edge, a magnifier inside on the left, the
   placeholder grey, a blue edge and soft ring when focused, the browser's own
   clear (x) on the right. 14px text; 16px in the app (a phone zooms into
   anything smaller). Width is the page's: the box fills what it is given.
   What it does is scripts/tmb-common.js's (TMB SEARCH BOX): Esc clears it, and a
   clear by Esc or by the (x) tells the page's own `input` listener, so the list
   comes back. Write it with autocomplete="off" spellcheck="false"
   autocapitalize="off" enterkeyhint="search" and a "Search ..." placeholder
   (no ellipsis), and give it an aria-label.
   A page TUNES it, never redraws it:
     --tmb-search-h     the height (34px)
     --tmb-search-font  the text size (14px)
   Written input.tmb-search.tmb-search so it beats Bootstrap's .form-control,
   front.css's phone rule for input[type=search].form-control and a page's
   `.wrap input` rule; the magnifier, its room and the round ends are
   !important, as the select arrow's, so a page's `background` or `padding`
   shorthand cannot take them away. The magnifier is a data URI (it cannot read a
   variable): a mid grey that reads on white and on a dark theme.
   Its own file so a page that does not load front.css has it too: every page
   through includes/styles.php, the fantasy pages through fantasy_chrome_css().
   Not for a <select>'s own search (TMB.searchSelect) or the admin tools. */
input.tmb-search.tmb-search {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 240px;   /* a page sets its own: a flex share, or 100% where the box fills its row */
    max-width: 100%;
    height: var(--tmb-search-h, 34px) !important;   /* front.css shrinks every .form-control on a phone, !important */
    min-height: 0;
    margin: 0;
    padding: 0 10px 0 34px !important;
    padding-left: 34px !important;   /* the magnifier's room and the magnifier: !important, as the select arrow's */
    box-sizing: border-box;
    font-size: var(--tmb-search-font, 14px) !important;
    font-weight: 500;
    line-height: 1.2;
    color: var(--tmb-gray-900);
    background-color: var(--tmb-surface, #fff);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23868e96' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: 13px center !important;
    background-size: 14px 14px !important;
    border: 1px solid var(--tmb-gray-300);
    border-radius: 999px !important;   /* Bootstrap's .input-group squares a side off */
    box-shadow: none;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
input.tmb-search.tmb-search::placeholder { color: var(--tmb-gray-500); font-weight: 400; opacity: 1; }
input.tmb-search.tmb-search:focus {
    border-color: var(--tmb-blue);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tmb-blue) 20%, transparent);
}
input.tmb-search.tmb-search::-webkit-search-decoration { -webkit-appearance: none; }
input.tmb-search.tmb-search::-webkit-search-cancel-button { cursor: pointer; }
/* In the app: 16px text (iOS zooms the page into a box under 16px), the same 34px; app-look.css's rule for every
   app search box draws the app's magnifier. */
html.tmb-app-look input.tmb-search.tmb-search { font-size: var(--tmb-search-font, 16px) !important; }
