/* Turn on font smoothing (does't working in IE) */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body,
p, span, h1, h2, h3, h4, h5, h6,
dl, dt, dd, ol, ul, li,
address, article, aside, figure, figcaption, footer, header, hgroup, menu, section, mark, time, canvas, datalist, details,
blockquote, center, del, div, hr, ins, menu, nav, pre,
a, abbr, acronym, dfn, em, strong,
code, iframe, kbd, samp, var,
b, i, u, small, s, big, strike, tt,
cite, del, q, ruby, sub, sup,
applet, audio, embed, img, object, video,
form, button, fieldset, label, legend, output, input, textarea,
table, tr, th, td, caption, thead, tbody, tfoot {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}

/* Make sure to set some focus styles for accessibility */
:focus {
  outline: 0;
}

/* Reset display HTML5 elements (for older browsers) */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section {
  display: block;
}

/**
 * 1) Correct text resizing oddly in IE 6/7 when body 'font-size' is set using 'em' units
 * 2) Prevent iOS text size adjust after orientation change, without disabling user zoom
 * 3) Add universal box-sizing
 */
html {
  font-size: 100%; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  -ms-text-size-adjust: 100%; /* 2 */
  box-sizing: border-box; /* 3 */
}

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

body {
  line-height: 1;
}

ol,
ul {
  list-style: none;
}

blockquote,
q {
  quotes: none;
  &:before,
  &:after {
    content: '';
    content: none;
  }
}

b,
strong {
  font-weight: bolder;
}

small {
  font-size: 80%;
}

/* Restore styles for sub and sup elements */

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

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/* Remove most spacing between table cells */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

caption, th, td {
  text-align: left;
  font-weight: normal;
  vertical-align: middle;
}

/* Correct 'inline-block' for older browsers */
audio,
canvas,
video {
  display: inline-block;
  *display: inline;
  *zoom: 1;
  max-width: 100%;
}

/*
 * 1) Prevent displaying audio without controls
 * 2) Remove excess height on iOS 5 devices
 */
audio:not([controls]) {
  display: none;
  height: 0;
}

[hidden] {
  display: none;
}

hr {
  height: 0;
  overflow: visible;
}

pre {
  font-size: 1em;
}

/**
 * 1) Remove border when inside 'a' element in IE 6/7/8/9 and Firefox 3
 * 2) Improve image quality when scaled in IE 7
 * 3) Image alignment
*/
img {
  border: 0; /* 1 */
  -ms-interpolation-mode: bicubic; /* 2 */
  vertical-align: middle; /* 3 */
  max-width: 100%;
}

/**
 * 1) Correct color not being inherited in IE 6/7/8/9
 * 2) Correct text not wrapping in Firefox 3
 * 3) Correct alignment displayed oddly in IE 6/7
 */
legend {
  border: 0; /* 1 */
  padding: 0;
  white-space: normal; /* 2 */
  *margin-left: -7px; /* 3 */
}

progress {
  vertical-align: baseline;
}

a {
  &:focus {
    outline: thin dotted; /* Address 'outline' inconsistency between Chrome and other browsers */
  }
  &:active,
  &:hover {
    outline: 0; /* Improve readability when focused and also mouse hovered in all browsers */
  }
}

a,
button,
input,
select,
textarea {
  *vertical-align: middle;
  -webkit-appearance: none;
  -moz-appearance: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

a,
button,
input,
select,
textarea,
label,
summary {
  touch-action: manipulation;
}

a,
button,
textarea,
input {
  background: transparent;
  border: none;
  margin: 0;
}

/* Address Firefox 3+ setting 'line-height' on 'input' using '!important' in the UA stylesheet */
button,
input {
  line-height: normal;
}

/**
 * Address inconsistent 'text-transform' inheritance for 'button' and 'select'
 * All other form control elements do not inherit 'text-transform' values
 * Correct 'button' style inheritance in Chrome, Safari 5+, and IE 6+
 * Correct 'select' style inheritance in Firefox 4+ and Opera
 */
button,
select {
  text-transform: none;
}

/**
 * 1) Avoid the WebKit bug in Android 4.0.* where (2) destroys native 'audio' and 'video' controls
 * 2) Correct inability to style clickable 'input' types in iOS
 * 3) Improve usability and consistency of cursor style between image-type 'input' and others
 * 4) Remove inner spacing in IE 7 without affecting normal text inputs. Known issue: inner spacing remains in IE 6
 */
button,
input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
  -webkit-appearance: button; /* 2 */
  cursor: pointer; /* 3 */
  *overflow: visible; /* 4 */
}

/* Reset cursor for disabled elements */
button,
input {
  &[disabled] {
    cursor: default;
  }
}

input {
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow: none;
}

/* Remove excess padding in IE 8/9 */
input[type="checkbox"],
input[type="radio"] {
  padding: 0;
}

input[type="search"] {
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  box-sizing: content-box;
}

/* Remove padding and search cancel button in Safari 5 and Chrome on OS X */
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  -moz-appearance: none;
}

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

button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}

/**
  * 1) Remove default vertical scrollbar in IE 6/7/8/9
  * 2) Improve readability and alignment in all browsers
  */
textarea {
  overflow: auto; /* 1 */
  vertical-align: top; /* 2 */
  resize: vertical;
}

template {
  display: none;
}

em {
  font-style: italic
}
