:root { --control-height: 2.25rem; }

/* Single-line fields share the action-button height. Native pickers and list boxes keep their own dimensions. */
input:where(:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=image], [type=hidden])),
select:where(:not([multiple]):not([size]), [size="1"]:not([multiple])) {
  height: var(--control-height); padding-block: 0;
}
@media (pointer: coarse) { :root { --control-height: 2.75rem; } }

select:not([multiple]):not([size]) {
  appearance:none;
  padding-inline:.5rem 2rem;
  background-image:url("./img/select-chevron.svg");
  background-repeat:no-repeat; background-position:right .65rem center;
}
select:dir(rtl):not([multiple]):not([size]) { background-position:left .65rem center; }
@media (forced-colors:active) { select:not([multiple]):not([size]) { appearance:auto; background-image:none; } }

input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]), select, textarea {
  transition: box-shadow .14s ease-out, border-color .14s ease-out;
}
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=color]):focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--border-strong); box-shadow: inset 0 -2px 0 var(--accent);
}
input[aria-invalid="true"]:focus-visible, textarea[aria-invalid="true"]:focus-visible { border-color: var(--danger); box-shadow: inset 0 -2px 0 var(--danger); }
@media (forced-colors: active) {
  :is(input, select, textarea):focus-visible { outline: 2px solid Highlight; outline-offset: 1px; }
}
