// lms - base
// ====================

// html {
//   overflow-y: scroll;
// }

html, body {
  font-family: $sans-serif;
  font-size: 1em;
  font-style: normal;
  line-height: 1em;
}

html{
  background: white;
}

body {
  background: $body-bg;
}

h1, h2, h3, h4, h5, h6 {
  color: $base-font-color;
  font: normal 1.2em/1.2em $serif;
  margin: 0;
}

h1 {
  color: $base-font-color;
  font: normal 2em/1.4em $sans-serif;
  letter-spacing: 1px;
  margin-bottom: ($baseline*1.5);
  text-align: center;
}

h2 {
  color: $lighter-base-font-color;
  font: normal 1.2em/1.2em $serif;
  letter-spacing: 1px;
  margin-bottom: ($baseline*0.75);
  text-transform: uppercase;
  -webkit-font-smoothing: antialiased;
}

p + h2, ul + h2, ol + h2 {
  margin-top: ($baseline*2);
}

p {
  color: inherit;
  margin: 0;
}

span {
  font: inherit;
  color: inherit;
}

/* Fix for CodeMirror: prevent top-level span from affecting deeply-embedded span in CodeMirror */
.CodeMirror span {
  font: inherit;
}

.text-center {
  text-align: center;
}

.text-dark-grey {
  color: $dark-gray1;
  font-size: 24px;
}

p + p, ul + p, ol + p {
  margin-top: $baseline;
}

p {
  a, a:visited {
    color: $link-color;
    font: inherit;
    font-weight: inherit;
    text-decoration: none;
    @include transition(all 0.1s linear 0s);

    &:hover, &:focus {
      color: $link-hover;
      text-decoration: underline;
    }
  }
}

a, a:visited {
  color: $link-color;
  font: inherit;
  text-decoration: none;
  @include transition(all 0.1s linear 0s);

  &:hover,
  &:focus {
    color: $link-hover;
    text-decoration: underline;
  }

  &:disabled, &.is-disabled, &.disabled {
    @extend %ui-disabled;
    opacity: 0.5;
    cursor: not-allowed;
  }
}

.content-wrapper {
  width: flex-grid(12);
  margin: 0 auto;
  background: $content-wrapper-bg;

  @media print {
    padding-bottom: 0;
  }
}

.container {
  @include clearfix();
  @include box-sizing(border-box);
  margin: 0 auto 0;
  padding: ($baseline*2) 0;
  max-width: grid-width(12);
  min-width: 760px;
  width: flex-grid(12);
}

span.edx {
  text-transform: none;
  font: inherit;
}

.static-container {
  @include clearfix();
  margin: 0 auto 0;
  max-width: 1200px;
  padding: ($baseline*3) 0 ($baseline*6);
  width: flex-grid(12);

  .inner-wrapper {
    margin: 0 auto 0;
    width: flex-grid(10);
  }

  ol, ul {
    list-style: disc;

    li {
      color: $base-font-color;
      font: normal 1em/1.4em $serif;
      margin: 0;
    }
  }

  h1 {
    margin-bottom: ($baseline*1.5);
  }

  h1 + hr {
    margin-bottom: ($baseline*3);
  }

  p + h2, ul + h2, ol + h2 {
    margin-top: ($baseline*2);
  }

  ul + p, ol + p {
    margin-top: $baseline;
  }
}

.loading-animation {
  position: absolute;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-left: -($baseline/2);
  background: url('#{$static-path}/images/spinner.gif') no-repeat;
}

mark {
  padding: 0 3px;
  border-radius: 2px;
  background-color: #f7e9a8;
  color: #333;
}

.site-status {
  display: none;
  padding: ($baseline/2);
  @include linear-gradient(top, $shadow-l1, rgba(0, 0, 0, .0));
  background-color: $site-status-color;
  box-shadow: 0 -1px 0 rgba(0, 0, 0, .3) inset;
  font-size: 14px;

  .white-error-icon {
    position: relative;
    top: -4px;
    float: left;
    display: block;
    width: 27px;
    height: 24px;
    margin-right: ($baseline*0.75);
    background: url('#{$static-path}/images/large-white-error-icon.png') no-repeat;
  }

  .inner-wrapper {
    margin: auto;
    max-width: 1180px;
    min-width: 760px;
  }

  p {
    line-height: 1.3;
    color: $white;
  }
}

.ie-banner {
  display: none;
  max-width: 1140px;
  min-width: 720px;
  margin: auto;
  border-radius: 0 0 3px 3px;
  background: #f4f4e0;
  color: #3c3c3c;
  padding: ($baseline/4) $baseline 8px;
  font-size: 13px;
  text-align: center;

  strong {
    font-weight: 700;
  }
}

.help-tab {
  @include transform(rotate(-90deg));
  @include transform-origin(0 0);
  @extend %ui-depth2;
  @extend %ui-print-excluded;
  top: 250px;
  left: 0;
  position: fixed;

  a:link, a:visited {
    cursor: pointer;
    border: 1px solid $gray-l3;
    border-top-style: none;
    border-radius: 0 0 ($baseline/2) ($baseline/2);
    background: transparentize($white, 0.25);
    color: transparentize(#333, 0.25);
    font-weight: bold;
    text-decoration: none;
    padding: 6px 22px 11px;
    display: inline-block;

    &:hover, &:focus {
      color: $white;
      background: $link-color;
    }
  }
}

.help-buttons {
  padding: ($baseline/2) ($baseline*2.5);

  a:link, a:visited {
    padding: ($baseline*0.75) 0;
    text-align: center;
    cursor: pointer;
    background: $white;
    text-decoration: none;
    display: block;
    border: 1px solid $gray-l3;

    &#feedback_link_problem {
      border-bottom-style: none;
      border-radius: ($baseline/2) ($baseline/2) 0 0;
    }

    &#feedback_link_question {
      border-top-style: none;
      border-radius: 0 0 ($baseline/2) ($baseline/2);
    }

    &:hover, &:focus {
      color: $white;
      background: $link-color;
    }
  }
}

#feedback_form {
  input, textarea {
    font: normal 1em/1.4em $sans-serif;
  }
  textarea[name="details"] {
    height: 150px;
  }
}

#feedback_success_wrapper {
  p {
    padding: 0 $baseline $baseline $baseline;
  }
}

// ====================

// UI - disabled state
.is-disabled {
  @extend %ui-disabled;
}

// UI - is hidden
.is-hidden {
  display: none;
}

// UI - is deprecated
.is-deprecated {
  @extend %ui-deprecated;
}

// UI - semantically hide text
.sr {
  @extend %text-sr;
  @extend %a11y-ensure-contrast;
}

// UI - skipnav
.nav-skip {
  @extend %ui-print-excluded;

  display: block;
  position: absolute;
  left: 0;
  top: -($baseline*30);
  width: 1px;
  height: 1px;
  overflow: hidden;
  background: $white;
  border-bottom: 1px solid $border-color-4;
  padding: ($baseline*0.75) ($baseline/2);

  &:focus, &:active {
    position: static;
    width: auto;
    height: auto;
  }
}
