/*
 * 1. Remove the top inner shadow that iOS applies to all textual inputs.
 * 2. Remove rounded corners that iOS applies to all input buttons.
 */

input,
textarea {
  background-clip: padding-box; /* 1 */
  border-radius: 0; /* 2 */
}

/*
 * 1. Prevent any horizontal overflow.
 * 2. sanitize.css's evergreen.css stylesheet doesn't apply the logical property
 *    version. Therefore, it's applied here alongside the non-logical property
 *    version.
 */

textarea {
  max-width: 100%; /* 1 */
  resize: vertical; /* 2 */
  resize: block; /* 2 */
}

/*
 * Apply left text alignment to buttons instead of the default center alignment.
 */

[type='submit'],
[type='button'],
[type='reset'],
button {
  text-align: left;
  text-align: start;
}

/*
 * Apply the more familiar pointer cursor to non-disabled buttons.
 */

[type='submit']:not(:disabled),
[type='button']:not(:disabled),
[type='reset']:not(:disabled),
button:not(:disabled) {
  cursor: pointer;
}

/**
 * Apply OpenType features to mostly numeric input types:
 * - Remove kerning.
 * - Remove proportional numerals.
 * - Remove old-style numerals.
 * - Apply lining numerals.
 *
 * NOTE: See the "OpenType features" section in the README.md.
 */

[type='color'],
[type='date'],
[type='datetime-local'],
[type='month'],
[type='number'],
[type='range'],
[type='tel'],
[type='time'],
[type='week'] {
  font-feature-settings: 'kern' 0, 'onum' 0, 'lnum';
  font-kerning: none;
  font-variant-numeric: lining-nums;
}

/**
 * Indicates that a label will shift focus to its associated control.
 */

label[for] {
  cursor: pointer;
}

/**
 * 1. Remove user-agent styles.
 * 2. Fix an issue in Safari where the element prematurely wraps.
 */

legend {
  border: 0; /* 1 */
  padding: 0; /* 1 */
  width: 100%; /* 2 */
}

/**
 * 1. Remove user-agent styles.
 * 2. Override the user-agent's `min-width: min-content;` rule with the more
 *    standard `min-width: 0;` to render as a block element would.
 *    @credit https://thatemil.com/blog/2015/01/03/reset-your-fieldset.
 * 3. Remove the padding applied by both the user-agent and sanitize.css.
 */

fieldset {
  border: 0; /* 1 */
  min-width: 0; /* 2 */
  padding: 0; /* 3 */
}

body:not(:-moz-handler-blocked) fieldset {
  display: table-cell;
}
