/* Shared form typography. Keep this unscoped and load it after page styles. */
:root {
  --form-control-font-size: var(--type-input-size, 16px);
  --form-control-line-height: 1.6;
  --form-multiline-line-height: 1.8;
}

/* Control types without editable text retain their existing dimensions. */
input:not(:where([type="hidden"], [type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="button"], [type="submit"], [type="reset"], [type="image"])),
textarea,
select {
  font-size: var(--form-control-font-size) !important;
  font-weight: 400 !important;
  line-height: var(--form-control-line-height) !important;
}

textarea {
  line-height: var(--form-multiline-line-height) !important;
}

input::placeholder,
textarea::placeholder,
input::file-selector-button,
select option,
select optgroup {
  font-size: inherit !important;
}

/* Keep a consistent inset instead of the OS arrow against the field edge. */
select:not([multiple]):not([size]),
select:not([multiple])[size="1"] {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 48px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23453e3a' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-position: right 16px center !important;
  background-size: 12px 12px !important;
  background-repeat: no-repeat !important;
}

@media (forced-colors: active) {
  select:not([multiple]):not([size]),
  select:not([multiple])[size="1"] {
    appearance: auto;
    -webkit-appearance: auto;
    background-image: none !important;
  }
}
