/**
* Reset some basic elements
*/
body, h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
dl, dd, ol, ul, figure {
  margin: 0;
  padding: 0;
}

/* base styles */
html {
  box-sizing: border-box;
  font-size: 100%;
  height: 100%;
  min-height: 100%;
  vertical-align: baseline;
}

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

body {
  @media screen and (min-width: $md) {
    font-size: $base-font-size;
    line-height: $base-line-height;
  }
  background: $site-bg;
  color: $font-color;
  font-size: 16px;
  font-family: $sans-serif;
  font-weight: 400;
  line-height: 1.4;
  margin: 0;
  padding: 0;
}
body>.wrapper {
  min-height: 100%;
  margin: 0 auto;
  max-width: $max-width;
  padding: 0;
  width: 95%;
  @media screen and (min-width: 1320px) {
    width: 100%;
  }
}

article,
header,
section {
  display: block;
}

a {
  background-color: transparent;
  color: $font-color;
  border-bottom: 2px solid $gray;
  text-decoration: none;
  -webkit-text-decoration-skip: objects;

  &:hover,
  &:focus {
    color: $gray;
    border-bottom: 2px solid $gray-dark;
  }
}

img {
  border-style: none;
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
  height: auto;
  -ms-interpolation-mode: bicubic;
}

%clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
}

h1,
h2,
h3,
h4,
h5 {
  color: $off-white;
  font-family: $sans-serif;
  font-weight: 600;
  line-height: $base-line-height;
  @media screen and (max-width: $lg) {
    line-height: $base-line-height * 0.9;
  }
}

h1 {
  @media screen and (max-width: $lg) { // mobile headers
    font-size: 47px * 0.7;
  }
  font-size: 47px;
  line-height: 1.3;
  padding: 1rem 0;
}
h2 {
  @media screen and (max-width: $lg) {
    font-size: 37px * 0.7;
  }
  font-size: 37px;
  padding: 1.3rem 0 0.3rem 0;
}
h3 {
  @media screen and (max-width: $lg) { // mobile headers
    font-size: 29px * 0.7;
  }
  font-size: 29px;
  padding: 1.3rem 0 0.3rem 0;
}
h4 {
  @media screen and (max-width: $lg) { // mobile headers
    font-size: 23px * 0.7;
  }
  font-size: 23px;
  padding: 1.3rem 0 0.3rem 0;
}
h5  {
  font-size: $base-font-size;
  padding: 1rem 0;
  text-transform: uppercase;
}

p {
  margin: 0 0 1rem;
  line-height: $base-line-height;
  margin-bottom: 1rem;
  padding: 0;
}


ul {
  margin: 0 0 1rem 2rem;
  li {
    line-height: 26px;
    margin-bottom: 0.5rem;
    ul {
      margin: 0.5rem 0 1rem 1.3rem;
    }
  }
}
ol {
  counter-reset: li-counter;
  list-style-type: none;
  margin: 0;
  margin-left: 3em;
  padding: 0 0 2rem;
  li {
    margin-bottom: 1rem;
    padding: 0.2rem 0 0 0.5rem;
    position: relative;
    &:before {
      color: $off-white;
      content: counter(li-counter);
      counter-increment: li-counter;
      font-size: 1.1rem;
      font-weight: 400;
      line-height: 1;
      position: absolute;
      top: 0.4rem;
      left: -0.6rem;
      text-align: right;
    }
  }
}

ol.ol-decimal {
  list-style-type: decimal;
  li {
    &:before {
      content: " ";
    }
  }
}

blockquote {
  border-left: 0.7rem solid $gray-dark;
  padding-right: 3rem;
  padding-left: 2rem;
  margin-bottom: 2.3rem;
}

.js-no {
  display: inline-block;
}

.js-yes {
  display: none;
}

.left {
  float: left;
}
.right {
  float: right;
}

.centered {
  margin: 0 auto;
}

pre {
  background-color: $gray-light;
  padding: 0 0.5rem 0.5rem;
  margin-bottom: 0.5rem;
}

code {
  display: inline-block;
  font-size: 1.1rem;
  max-width: 100%;
  white-space: normal;
  word-break: break-all;
}

.visually-hidden {
  // For screen-readers.
  // https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
  // sass-lint:disable no-duplicate-properties
  clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
  clip: rect(1px, 1px, 1px, 1px);
}

.hidden {
  display: none;
}

h5.category {
  color: $gray;
  font-size: $base-font-size * 0.9;
  padding-bottom: 0;
  padding-top: 1rem;
}

.push { height: 100px;}

a:hover {
  text-decoration: none;
}

.nav > li {
  margin-bottom: 0;
}

.nav > li > a {
  line-height: 10px;
  padding-right: 20px;
  padding-left: 20px;
  border: none;
  &:hover {
    border-bottom: 2px solid white;
  }
}

.nav-form-link {
  input[type=submit] {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    margin: 0;
    text-decoration: none;
  }
}

.avatar-frame {
  border: 2px solid #cc0000;
}

.avatar-frame, .avatar-frame img {
  width: 120px;
  margin-bottom: 17px;
  height: 120px;
  -webkit-border-radius: 80px; /* Saf3+, Chrome */
  border-radius: 80px; /* Opera 10.5, IE 9 */
  /*-moz-border-radius: 30px;  Disabled for FF1+ */
}

#anon-stats {
  height: 0;
  overflow: hidden;
}


.top-buffer {
  margin-top: 20px;
}

.bottom-buffer {
  margin-bottom: 20px;
}

.panel-body {
  color: $gray-dark;
}

/* ==============================================
Styles for the alert box
===============================================*/

.alert-container {
  position: relative;
  height: 0;
  overflow: visible;
}

.alert.alert-info, .alert.alert-error {
  @include box-shadow(0 0 10px 3px rgba(0, 0, 0, 0.1));
  position: fixed;
  z-index: 101;
  bottom: 0;
  right: 20px;
  background-color: $blue;

  background-image: -webkit-linear-gradient($gray-dark, lighten($gray-dark, 10%));
  background-image: -moz-linear-gradient($gray-dark, lighten($gray-dark, 10%));
  background-image: linear-gradient($gray-dark, lighten($gray-dark, 10%));

  color: $font-color;
  text-align: center;
  line-height: 1.3;
  overflow: hidden;
  border: 1px solid #ddd;
  padding: 20px 30px;
  font-size: 15px;
  height: auto;
  max-width: 500px;

  .close {
    position: absolute;
    right: 10px;
    top: 9px;
    text-indent: -9999px;
    background: image-url('close.png');
    height: 16px;
    width: 16px;
    cursor: pointer;
  }
}

.cssanimations.csstransforms
.alert.alert-info,
.cssanimations.csstransforms
.alert.alert-error {
  -webkit-animation: fade 3.5s 1.0s 1 ease forwards;
  -moz-animation:    fade 3.5s 1.0s 1 ease forwards;
  #close {
    display: none;
  }
}

@-webkit-keyframes fade {
  0%, 100% { opacity: 0; transform: translate(0, 30px); }
  10%, 90% { opacity: 1; transform: translate(0, 0); }
}
@-moz-keyframes fade {
  0%, 100% { opacity: 0; transform: translate(0, 30px); }
  10%, 90% { opacity: 1; transform: translate(0, 0); }
}


/* ======================
No-js styles
========================*/

html.no-js {
  .collapse {
    display: block;
  }
  .shown-if-no-js {
    display: block;
  }
  .hidden-if-no-js {
    display: none;
  }
}

html.js {
  .shown-if-no-js {
    display: none;
  }
}

/* ======================
Email Target Copy Page
========================*/
textarea#email_target_text {
  width: 100%;
  height: 500px;
}
div#email_target_text {
  display: none;
}


// row default
.row {
  margin: 1rem 0;
}
// screen readers only
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;

}

.container {  // overriding bootstrap
  padding: 0;
  max-width: 860px !important;
  width: 100% !important;
  @media screen and (min-width: $lg) {
    max-width: 1280px !important;
  }
}

.popover {  // overriding bootstrap
  color: $charcoal;
  font-family: $sans-serif;
  font-size: $base-font-size * 0.8 !important;
  line-height: $base-line-height;
  h3 {
    color: $charcoal;
  }
}
