$max-width: 980px;
$gutter: 16px;
$font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";

@import '../../node_modules/mocha/mocha';
@import '../../node_modules/modularized-normalize-scss/normalize';
@import './scss/github-markdown';
@import '../demo/index';

@mixin box-sizing {
  &,
  &:before,
  &:after,
  *,
  *:before,
  *:after {
    box-sizing: border-box;
  }
}

.navigation {
  @include box-sizing;
  max-width: $max-width;
  margin-left: auto;
  margin-right: auto;
  padding: 32px $gutter;

  label,
  a {
    display: block;
    font-family: $font-family;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
  }

  input {
    position: absolute;
    top: -1000px;
  }

  ul,
  li {
    list-style: none;
    margin: 0;
    padding: 0;
  }

  ul {
    overflow: hidden;
  }

  > ul > li {
    float: left;
  }

  > ul > li:not(:last-child) {
    margin-right: 20px;
  }

  > ul > li > label ~ ul {
    position: absolute;
    background-color: #fff;
    border: solid 1px #eee;
    margin-top: 20px;
    padding: 20px;
    display: none;
  }

  > ul > li > input:checked ~ ul {
    display: block;
  }

  > ul > li > ul > li:not(:last-child) {
    margin-bottom: 20px;
  }
}

.markdown-body {
  @import '../../node_modules/highlight.js/styles/github';
  @include box-sizing;
  max-width: $max-width;
  margin: 0 auto $gutter auto;
  padding-left: $gutter;
  padding-right: $gutter;

  .hljs {
    padding: 16px !important;
  }

  pre {
    margin: 0 auto $gutter auto;
  }

  pre,
  code {
    font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 14px;
  }

  code {
    background-color: #f8f8f8;
  }
}

.markdown-body:not(.tutorial){
}

.markdown-body table td,
.markdown-body table th {
  vertical-align: top;
}

.markdown-body table th {
  text-align: left;
}

.markdown-body.tutorial {

  .cp_embed_wrapper {
    margin-left: -$gutter;
    margin-right: -$gutter;
    padding: 2px;
    box-shadow: 0 2px 1px -1px rgba(black, .2), 0 1px 1px 0 rgba(black, .14), 0 1px 3px 0 rgba(black, .12);
  }
}

#mocha {
  max-width: $max-width !important;
  margin: 0 auto $gutter*2 !important;
}

#mocha .suite {
  margin-left: 0 !important;
}

.example {
  @include box-sizing;
  position: relative;
  max-width: $max-width;
  margin: 0 auto $gutter;
  padding: $gutter;
  border: solid 1px #eee;

  &--dark {
    color: #fff;
    border: none 0;
    background-color: #333;
  }
}

.checkbox {
  list-style: none;

  &__empty:before,
  &__checked:before {
    display: inline-block;
    width: 2em;
    margin-left: -2em;
    font-family: monospace;
    text-align: center;
  }

  &__empty:before {
    content: '';
    border: solid 1px;
    width: 1em;
    margin-left: -1.5em;
    margin-right: .5em;
    height: 1em;
  }

  &__checked:before {
    content: '✓';
  }
}

.hide-from-github-pages {
  display: none;
}