::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-color-swatch-wrapper {
  padding: 0;
}

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

::-webkit-inner-spin-button {
  height: auto;
}

::-moz-focus-inner {
  padding: 0;
  border-style: none;
}

::selection {
  color: #FFF;
  background: $color-primary;
}

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

* {
  outline: none;
}

:root {
  @media (prefers-reduced-motion: no-preference) {
    scroll-behavior: smooth;
  }
}

html, body {
  font-size: 16px;

  @include max-lg {
    font-size: 14px;
  }
}

body {
  width: 100vw;
  padding-right: 0 !important;
  margin: 0;
  overflow-x: hidden;
  font-family: $system-default-font-family;
  line-height: 1.5;
  color: $color-body;
  letter-spacing: 0.15em;
  background: $color-bg-body;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: rgba(#000, 0);
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

hr {
  margin: 2rem 0;
  background-color: transparent;
  border-width: 1px 0 0 0;
  border-top: 1px solid $color-line;
}

hr:not([size]) {
  height: 1px;
}

%heading {
  margin-top: 0;
  margin-bottom: 0;
  font-weight: 400;
}

h1 {
  @extend %heading;

  font-size: $font-size-h1;
}

h2 {
  @extend %heading;

  font-size: $font-size-h2;
}

h3 {
  @extend %heading;

  font-size: $font-size-h3;
}

h4 {
  @extend %heading;

  font-size: $font-size-h4;
}

h5 {
  @extend %heading;

  font-size: $font-size-h5;
}

h6 {
  @extend %heading;

  font-size: $font-size-h6;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

abbr[title],
abbr[data-bs-original-title] {
  text-decoration: underline dotted;
  cursor: help;
  text-decoration-skip-ink: none;
}

address {
  margin-bottom: 1rem;
  font-style: normal;
  line-height: inherit;
}

ol,
ul {
  padding-left: 2rem;
}

ol,
ul,
dl {
  margin-top: 0;
  margin-bottom: 1rem;
}

ol ol,
ul ul,
ol ul,
ul ol {
  margin-bottom: 0;
}

dt {
  font-weight: 700;
}

dd {
  margin-bottom: .5rem;
  margin-left: 0;
}

blockquote {
  margin: 0 0 1rem;
}

b,
strong {
  font-weight: 700;
}

small {
  font-size: 80%;
}

mark {
  padding: .2em;
  background-color: #FCF8E3;
}

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

sub {
  bottom: -.25em;
}

sup {
  top: -.5em;
}

a {
  color: $color-primary;
  text-decoration: none;

  &:hover {
    color: darken($color-primary, 10%);
    text-decoration: none;
  }
}

a:not([href]):not([class]) {
  &,
  &:hover {
    color: inherit;
    text-decoration: none;
  }
}

pre,
code,
kbd,
samp {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  // @include font-size(1em);
  direction: ltr #{"/* rtl:ignore */"};
  unicode-bidi: bidi-override;
}

code {
  word-wrap: break-word;

  a > & {
    color: inherit;
  }
}

pre {
  // display: none;
  margin-top: 0;
  margin-bottom: 1rem;
  overflow: auto;

  code {
    color: inherit;
    word-break: normal;
  }
}

figure {
  margin: 0 0 1rem;
}

img,
svg {
  max-width: 100%;
  vertical-align: middle;
}

table {
  caption-side: bottom;
  border-collapse: collapse;
}

caption {
  text-align: left;
}

th {
  font-weight: 400;
  text-align: inherit;
  text-align: -webkit-match-parent;
}

thead,
tbody,
tfoot,
tr,
td,
th {
  border-color: inherit;
  border-style: solid;
  border-width: 0;
}

label {
  display: inline-block;
}

%input {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  text-transform: none;

  &:-webkit-autofill {
    box-shadow: 0 0 0 1000px $color-autofill inset !important;
    transition: background-color 5000s ease-in-out 0s;
  }
}


button,
[type="button"],
[type="reset"],
[type="submit"] {
  // @extend %input;

  letter-spacing: inherit;
  border-radius: 0;
  -webkit-appearance: button;

  &:not(:disabled) {
    cursor: pointer;
  }

  &:focus:not(:focus-visible) {
    outline: 0;
  }
}

textarea {
  @extend %input;

  resize: vertical;
}

input,
select,
optgroup {
  @extend %input;
}

[role="button"] {
  cursor: pointer;
}

select {
  word-wrap: normal;

  &:disabled {
    opacity: 1;
  }
}

[list]::-webkit-calendar-picker-indicator {
  display: none;
}

fieldset {
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

legend {
  float: left;
  width: 100%;
  padding: 0;
  line-height: inherit;

  + * {
    clear: left;
  }
}

[type="search"] {
  outline-offset: -2px;
  -webkit-appearance: textfield;
}


output {
  display: inline-block;
}

iframe {
  border: 0;
}

summary {
  display: list-item;
  cursor: pointer;
}

progress {
  vertical-align: baseline;
}

article {
  text-align: left;

  h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5em;
    font-weight: 500;
  }

  h3 {
    font-size: 1rem;
  }

  ul {
    padding-left: 3.5em;
    margin-bottom: 2rem;
    list-style: none;

    li {
      margin-bottom: 0.5rem;
      text-indent: -2.25em;
    }

    ul {
      padding-left: 2.5em;

      li {
        text-indent: -2.5em;

        ul {
          padding-left: 1.5em;
          list-style: disc;

          li {
            text-indent: 0;
          }
        }
      }
    }
  }
}

[hidden] {
  display: none !important;
}
