/**
* Mixin to reset elements standard styles.
*/

@mixin reset-text {
  margin: 0;
  padding: 0;
}

@mixin reset-list {
  list-style: none;
  margin: 0;
  padding: 0;

  > li {
    margin: 0;
  }
}

@mixin reset-link {
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;

  &:focus {
    outline: none;
  }
}

@mixin reset-button {
  appearance: none;
  background-color: transparent;
  border: 0;
  border-radius: 0;
  color: inherit;
  cursor: pointer;
  display: block;
  font-family: inherit;
  font-size: 1em;
  inline-size: auto;
  margin: 0;
  padding: 0;
  text-decoration: none;

  &:focus {
    outline: none;
  }
}

@mixin reset-figcaption {
  display: block;
  margin: 0;
  padding: 0;
  user-select: text;
}

@mixin reset-img {
  block-size: auto;
  border-style: none;
  display: block;
  max-inline-size: 100%;
  position: relative;

  &:not([src]),
  &[src=''] {
    &::before {
      content: attr(alt);
      align-items: center;
      background-color: $color-black;
      block-size: 100%;
      color: $color-white;
      display: flex;
      inline-size: 100%;
      justify-content: center;
      position: absolute;
      z-index: 1;
    }
  }

  &:not([alt]),
  &[alt=''] {
    // outline: 5px solid #f00;
  }
}

@mixin reset-input {
  appearance: none;
  background: none;
  border: 0;
  color: inherit;
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
  padding: 0;

  &[type='submit'] {
    cursor: pointer;
  }

  &[type='text'] {
    &::-ms-clear {
      block-size: 0;
      display: none;
      inline-size: 0;
    }

    &::-ms-reveal {
      block-size: 0;
      display: none;
      inline-size: 0;
    }
  }

  /* clears the ‘X’ from Chrome */
  &[type='email'],
  &[type='search'] {
    &::-webkit-search-decoration {
      display: none;
    }

    &::-webkit-search-results-button {
      display: none;
    }

    &::-webkit-search-cancel-button {
      display: none;
    }

    &::-webkit-search-results-decoration {
      display: none;
    }
  }

  &[type='number'] {
    appearance: textfield;
  }

  &:focus {
    outline: 0;
  }
}

@mixin reset-fieldset {
  border: 0;
  margin: 0;
  min-inline-size: 0;
  padding: 0;
}

@mixin reset-svg {
  display: block;
}

@mixin reset-figure {
  margin: 0;

  * {
    user-select: none;
  }
}

@mixin reset-address {
  font-style: normal;
}

@mixin reset-blockquote {
  margin: 0;
}
