*,
*:before,
*:after {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
}

body {
  margin: 0;
  line-height: 1;
  text-rendering: optimizeLegibility;
  text-decoration-skip: objects;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

p,
dd,
dl,
figure,
blockquote {
  margin: 0;
}
/* Совутую не забывать о списке определений <dl>. Семантика это хорошо.
Для более удобного использования можно позьзоваться дивом (валидно):
dl>div*3>dd{value}+dt{prop} */

blockquote,
q {
  quotes: none;
}

ul,
ol {
  padding: 0;
  margin: 0;
  list-style-type: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

th {
  font-weight: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

audio,
video {
  display: block;
}

img {
  display: block;
  border: none;
}

iframe {
  border: none;
}

pre,
code,
kbd,
samp {
  font-family: monospace, monospace;
  font-size: inherit;
}

a {
  background-color: transparent;
  text-decoration: none;
  color: inherit;
}

abbr {
  border: none;
  text-decoration: none;
}

b,
strong {
  font-weight: inherit;
}

i,
em {
  font-style: inherit;
}

dfn {
  font-style: inherit;
}

mark {
  background-color: transparent;
  color: inherit;
}

small {
  font-size: inherit;
}

sub,
sup {
  position: relative;
  vertical-align: baseline;
  font-size: inherit;
  line-height: 0;
}

sub {
  bottom: -.25em;
}

sup {
  top: -.5em;
}

button,
input,
optgroup,
select,
textarea {
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background-color: transparent;
  font: inherit; /* По дефолту, шрифтовые свойства, для этих элементов не наследуются */
  color: inherit;
  letter-spacing: inherit;
}

button,
input {
  overflow: visible;
}

button,
select {
  text-align: left;
  text-transform: none;
}

button,
[type='button'],
[type='reset'],
[type='submit'] {
  cursor: pointer;
  -webkit-appearance: none;
}

textarea {
  resize: none;
  overflow-y: auto;
  overflow-x: hidden;
}

button::-moz-focus-inner,
[type='button']::-moz-focus-inner,
[type='reset']::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
  border: none;
  padding: 0;
}

button:-moz-focusring,
[type='button']:-moz-focusring,
[type='reset']:-moz-focusring,
[type='submit']:-moz-focusring {
  outline: none;
}

[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
  height: auto;
}

[type='search']::-webkit-search-decoration {
  -webkit-appearance: none;
}

[type='search'] {
  outline: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

input,
textarea,
select {
  &:-webkit-autofill,
  &:-webkit-autofill:focus {
    color: var(--color-contrast-100);
    -webkit-text-fill-color: var(--color-contrast-100);
    box-shadow: 0 0 0 1000px var(--field-bg) inset;
    transition: background-color 0s ease 5000s, box-shadow 200ms ease-in-out;
    background-color: transparent;
  }
  &:-webkit-autofill:hover {
    box-shadow: 0 0 0 1000px var(--field-bg-hover) inset;
    transition: box-shadow 200ms ease-in-out;
  }
  -webkit-tap-highlight-color: transparent;

  &[disabled] {
    &:-webkit-autofill,
    &:-webkit-autofill:focus,
    &:-webkit-autofill:hover {
      -webkit-box-shadow: 0 0 0 1000px var(--field-bg-disabled) inset;
    }
  }
}

fieldset {
  padding: 0;
  margin: 0;
  border: none;
}

legend {
  display: block;
  padding: 0;
  white-space: normal;
}

select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

select::-ms-expand {
  display: none;
}

::-webkit-input-placeholder {
  color: inherit;
  opacity: 1;
  transition: opacity .3s;
}

::-moz-placeholder {
  color: inherit;
  opacity: 1;
  transition: opacity .3s;
}

:-moz-placeholder {
  color: inherit;
  opacity: 1;
  transition: opacity .3s;
}

:-ms-input-placeholder {
  color: inherit;
  opacity: 1;
  transition: opacity .3s;
}

:focus::-webkit-input-placeholder {
  opacity: 0;
}

:focus::-moz-placeholder {
  opacity: 0;
}

:focus:-moz-placeholder {
  opacity: 0;
}

:focus:-ms-input-placeholder {
  opacity: 0;
}

:disabled,
.disabled {
  cursor: not-allowed;
}

::-ms-clear {
  display: none;
}

::selection {
  color: #fff;
  background-color: #004fe4;
}

//Hide arrows default
/* Chrome */
input[type=number],
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}
