/* =====================================================================
   BUILD 169 — one look for every input: "make the input boxes a slightly lighter color than the background; date pickers etc. should all be the same color."
   Loaded for everyone, right after rampart-theme.css (layout/header.php).

   - The field colour (--field-bg) is the one the whole app already uses for boxes that were styled on purpose; in the dark theme it is now a little LIGHTER than the
     cards and the page behind it (it used to be darker than the cards). The light theme keeps white fields on the light-grey page.
   - Every text box, search box, number / date / time / month / week box, drop-down and text area gets that colour and border — including the ones nobody styled on purpose,
     which used to take the card colour (so they looked like holes in the card). Specificity is the lowest possible (:where), so a box that is meant to look different
     (transparent boxes inside the compose header, the search field inside the search pill, a sticky note's reminder box ...) still does.
   - The browser's own pop-ups (the date picker, the list of a drop-down) and the little calendar / clock icons follow the theme, and the list items use the same colour.
   ===================================================================== */
:root,
html[data-theme="dark"]{--field-bg:#1b3150;--field-line:#3b5886}

input:where(:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image])),
select,
textarea{background-color:var(--field-bg);border-color:var(--field-line)}

html[data-theme="dark"] :is(input,select,textarea){color-scheme:dark}
html[data-theme="light"] :is(input,select,textarea){color-scheme:light}
select option,select optgroup{background-color:var(--field-bg);color:var(--text)}

/* the browser's saved-password / address fill paints its own blue or yellow: keep our colour */
input:-webkit-autofill,input:-webkit-autofill:hover,textarea:-webkit-autofill,select:-webkit-autofill{
  -webkit-text-fill-color:var(--text);caret-color:var(--text);-webkit-box-shadow:0 0 0 1000px var(--field-bg) inset;box-shadow:0 0 0 1000px var(--field-bg) inset}
input:-webkit-autofill:focus,textarea:-webkit-autofill:focus,select:-webkit-autofill:focus{
  -webkit-box-shadow:0 0 0 1000px var(--field-bg) inset,0 0 0 3px var(--accent-wash);box-shadow:0 0 0 1000px var(--field-bg) inset,0 0 0 3px var(--accent-wash)}

/* the mail search box is a rounded pill like every other box (it was square-ish: 6px) */
.ox-app .ox-search-box{border-radius:var(--field-radius,999px);padding:0 16px}
.ox-app .ox-search-box:focus-within{box-shadow:0 0 0 3px var(--accent-wash)}

/* =====================================================================
   BUILD 170 — the rich-text editor (the Warden composer / reply box, the task notes editor): the writing area is the same colour as every other box
   (it was the card colour, so on the lighter fields it looked like a hole), inside a box with the field border and the same soft corners as a text area.
   The toolbar stays a little darker than the writing area (--card-2); its drop-downs and buttons keep the field colour.
   ===================================================================== */









