/**
 * @license EUPL-1.2+
 * Copyright Gemeente Amsterdam
 */

@mixin reset-body {
  margin-block: 0;
  margin-inline: 0;
}

@mixin reset-blockquote {
  margin-block: 0;
  margin-inline: 0;
}

@mixin reset-button {
  border: none;
  margin-block: 0; // [1]
  margin-inline: 0; // [1]
  padding-block: 0;
  padding-inline: 0;

  // [1] Remove the margin in older Safari.
}

@mixin reset-dd {
  margin-inline: 0;
}

@mixin reset-dialog {
  inset-block: 0;
  padding-block: 0;
  padding-inline: 0;
}

@mixin reset-dl {
  margin-block: 0;
}

@mixin reset-fieldset {
  border: none;
  margin-inline: 0;
  padding-block: 0;
  padding-inline: 0;
}

@mixin reset-figure {
  margin-block: 0;
  margin-inline: 0;
}

@mixin reset-hx {
  margin-block: 0;
}

@mixin reset-input {
  appearance: none; // Reset native appearance on iOS and Android devices
  border-radius: 0; // Reset rounded borders on iOS devices
  margin-block: 0;
}

@mixin reset-legend {
  /* stylelint-disable-next-line csstools/use-logical */
  float: left; // [1]
  inline-size: 100%; // [1]
  padding-inline: 0;

  + * {
    clear: both; // [2]
  }

  // [1] This combination allows the fieldset border to go around the legend, instead of through it.
  // The actual value for float is not important, a legend should never have elements that wrap around it.
  // [2] Reset the applied float for the legend’s first sibling.
}

@mixin reset-ol {
  list-style: none;
  margin-block: 0;
  padding-inline-start: 0;
}

@mixin reset-p {
  margin-block: 0;
}

@mixin reset-placeholder {
  opacity: 100%; // Reset lower opacity set by Firefox
}

@mixin reset-select {
  appearance: none; // Reset native appearance to hide default chevron
  border-radius: 0; // Reset rounded borders for Safari on macOS
}

@mixin reset-textarea {
  appearance: none; // Reset native appearance on iOS and Android devices
  border-radius: 0; // Reset rounded borders on iOS devices
  margin-block: 0;
}

@mixin reset-ul {
  list-style: none;
  margin-block: 0;
  padding-inline-start: 0;
}
