/* ==========================================================================
   caps.css - DISPLAY-ONLY Title Case for DATA (names, departments, roles).
   Memo text, reasons, descriptions, and notes stay as typed via class="no-caps".
   Menus, buttons, headings, table headers (th), form labels,
   badges and other system text keep their original look.
   Nothing is changed in the database or in PHP: the browser only draws the first letter of each word as a capital (text-transform: capitalize).
   Remove the <link> to caps.css (or empty this file) to undo.

   What is shown in Title Case:
     1. the body cells of every table      (table tbody td)
     2. anything wrapped in class="caps"   (or class="caps-data")

   What always stays as written (even inside the above):
     buttons, .btn, .badge, inputs / selects / textareas, email / url / password
     fields, mailto: and tel: links, code / pre, and anything with class="no-caps"
     (or data-no-caps). Add class="no-caps" to any cell or element that must
     keep its original letters, e.g. an email address.
   ========================================================================== */

html body :is(table tbody td, .caps, .caps-data),
html body :is(table tbody td, .caps, .caps-data) * {
  text-transform: capitalize;
}

html body :is(table tbody td, .caps, .caps-data) :is(
  .btn, button, .badge, input, select, textarea, option,
  a[href^="mailto:"], a[href^="tel:"], code, pre, kbd, samp
),
html body :is(table tbody td, .caps, .caps-data) :is(
  .btn, button, .badge, input, select, textarea, option,
  a[href^="mailto:"], a[href^="tel:"], code, pre, kbd, samp
) *,
html body input[type="submit"],
html body input[type="button"],
html body .no-caps,
html body .no-caps *,
html body [data-no-caps],
html body [data-no-caps] * {
  text-transform: none;
}

/* title-case.js marks an element whose own text it already converted from ALL CAPS to Title Case
   (it lowercases words like "and" / "of"), so capitalize must not re-capitalize them. Display only. */
html body [data-tc][data-tc] {
  text-transform: none;
}
