@import "../../lib/normalize/normalize";

html {
  font-family: fixit-var(global-font-family);
  font-weight: fixit-var(global-font-weight);
  font-display: swap;
  font-size: fixit-var(global-font-size);
  line-height: fixit-var(global-line-height);
  width: 100%;
  scroll-behavior: smooth;
  overflow: auto;

  @include media('reduce-motion') {
    scroll-behavior: auto;
  }
}

::selection {
  background-color: fixit-var(selection-color);
}

body {
  background-color: fixit-var(global-background-color);
  color: fixit-var(global-font-color);
  @include overflow-wrap(break-word);
}

iframe {
  border: 0;
  @include border-radius;
}

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

summary {
  cursor: pointer;
}

abbr[title] {
  cursor: help;
  text-decoration-skip-ink: none;
}

img {
  object-fit: cover;
}

img,
video {
  max-width: 100%;
  height: auto;
  @include border-radius;
}

dialog {
  padding: 0;
}

details {
  &.center {
    summary {
      text-align: center;
    }
  }
}

%code {
  padding: 0.2em 0.4em;
  margin: 0;
  font-size: fixit-var(code-font-size);
  line-height: fixit-var(code-font-size);
  font-family: fixit-var(code-font-family);
  color: fixit-var(code-color);
  background-color: fixit-var(code-inline-background-color);
  text-decoration: inherit;
  @include border-radius;
  @include overflow-wrap(break-word);
}

@include link(true, true);
