// @file
// Site global scss file.
//
// Import variables and mixins
// Should contain NO css output.
// Only variables / mixins / settings.
@import 'utils/init';

// Import font-face fonts.
//
// This should only be imported and loaded once.
@import 'fonts/fonts';

// Base
//
// Plain html element styling. Shouldn't require
// any classes.
//
// normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css
//
// NOTE: While this uses normalize.css as a starting
// point it has and will be updated as needed.
// This should be ONLY plain html element styling.
// There should be NO classes, IDs, etc.

// StyleLint needs to ignore some Normalize specific things:
/* stylelint-disable property-no-vendor-prefix */

// https://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/
* {
  box-sizing: inherit;

  &::before,
  &::after {
    box-sizing: inherit;
  }
}

html {
  @include font-stack-primary;
  font-size: 100%;
  line-height: 1.15;
  box-sizing: border-box;
  -webkit-text-size-adjust: 100%;
}

// Sections.
body {
  margin: 0;
}

// Render the `main` element consistently in IE11.
main {
  display: block;
}

// Grouping content.
hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
}

pre {
  /* stylelint-disable-next-line font-family-no-duplicate-names */
  font-family: monospace, monospace;
  font-size: 1em;
}

// Text-level semantics.
abbr[title] {
  border-bottom: 0;
  // Fallback for browsers that do not support `text-decoration-style`.
  text-decoration: underline;
  text-decoration: underline dotted;
}

b,
strong {
  font-weight: bolder;
}

code,
kbd,
samp {
  /* stylelint-disable-next-line font-family-no-duplicate-names */
  font-family: monospace, monospace;
  font-size: 1em;
}

small {
  font-size: 80%;
}

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

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

// Embedded content.
img {
  border-style: none;
  max-width: 100%;
  height: auto;
}

// Forms
button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
}

button,
input {
  overflow: visible;
}

button,
select {
  text-transform: none;
}

// Correct the inability to style clickable types in iOS and Safari.
button,
[type='button'],
[type='reset'],
[type='submit'] {
  -webkit-appearance: button;
}

// Remove the inner border and padding in Firefox.
button::-moz-focus-inner,
[type='button']::-moz-focus-inner,
[type='reset']::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

// Restore the focus styles unset by the previous rule.
button:-moz-focusring,
[type='button']:-moz-focusring,
[type='reset']:-moz-focusring,
[type='submit']:-moz-focusring {
  outline: 1px dotted $color-danube;
}

// Correct the padding in Firefox.
fieldset {
  padding: 0.35em 0.75em 0.625em;
}

legend {
  box-sizing: border-box;
  color: inherit;
  display: table;
  max-width: 100%;
  padding: 0;
  white-space: normal;
}

progress {
  vertical-align: baseline;
}

// Remove the default vertical scrollbar in IE 10+.
textarea {
  overflow: auto;
}

// Correct the cursor style of increment and decrement buttons in Chrome.
[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
  height: auto;
}

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

[type='search']::-webkit-search-decoration {
  -webkit-appearance: none;
}

// Correct the inability to style clickable types in iOS and Safari.
::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

// Interactive.
// Add the correct display in Edge, IE 10+, and Firefox.
details {
  display: block;
}

summary {
  display: list-item;
}

// Misc.
// Add the correct display in IE 10+.
template {
  display: none;
}

// Lists
// Unset default list margin and padding because if not
// we'll have to unset it every. single. time.
ul,
ol,
dl {
  margin: 0;
  padding: 0;
}

li {
  margin: 0;
  padding: 0;
}

// Headings are always 'just a bit bigger' than body copy.
// https://csswizardry.com/2016/02/managing-typography-on-large-apps/
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
}
