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

::selection {
  /* Optional */
  /* It can be really hard to read highlighted text with a text-shadow, it should be removed when selected */
  text-shadow: none;

  /* NOTE: Using this means the color and background-color are set to transparent for selected text... */
  /* So you can customise your styles below */
  color: #fff;
  background-color: #00f;
}

/*
  3. Allow percentage-based heights in the application
*/
html,
body {
  height: 100%;
  font-size: 100%;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
// ul,
// ol {
//   &[role='list'] {
//     list-style: none;
//     margin-block-end: 0;
//     margin-block-start: 0;
//     padding-inline-start: 0;
//   }
// }

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

a,
button {
  cursor: pointer;
}

/* Make images easier to work with */
img,
picture,
video,
canvas {
  display: block;
  max-width: 100%;
  aspect-ratio: auto;
}

img,
video,
iframe {
  max-inline-size: 100%;
  block-size: auto;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  font-style: italic;
  background-repeat: no-repeat;
  background-size: cover;
  shape-margin: 0.75rem;
}

svg {
  display: inline-block;
}

/* Inherit fonts for inputs and buttons */
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  font-style: inherit;
  font-weight: inherit;
  font-variant: inherit;
  line-height: inherit;
  background-color: inherit;
}

/* Inherit fonts for inputs and buttons */
:where(button) {
  font-family: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Create a root stacking context */
#root,
#__next {
  isolation: isolate;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

*:focus {
  outline: none;
  outline-style: auto;
}

b {
  font-weight: normal;
}

/* Removes spacing between cells in tables */
table {
  border-collapse: collapse;
}

svg {
  max-width: inline-size;

  /* Optional - make the SVG's fill be the same as the inherited color */
  // fill: currentColor;

  /* Prevent the SVG from altering cursor interaction */
  pointer-events: none;

  &[role='img'] {
    display: inline-flex;
    align-items: center;
    width: auto;
  }
}
