/* API Docs 
// ============ */

.hidden{
  height: 0;
  line-height: 0;
  opacity: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.hidden-xs{
  @media (--palm){
    display: none !important;
  }
}

.small-header{
  background: $primarycolour;
  height: 37px;

  .icon-vocus{
    color: $white;
    display: inline-block;
    font-size: 21px;
    margin-left: 19px;
    margin-top: 8px;
    transition: 0.45s all;

    &.scrolled{
      color: $primarycolour;
      margin-top: 23px;
    }

    @media (--palm){
      margin: 0;
      padding-top: 10px;
    }
  }

  .icon-apidocs{
    color: #009fee;
    font-size: 23px;
    margin-left: 10px;
    position: relative;
    top: 0;
  }

  .responses{
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-family: $lightweight;
    font-weight: 300;
    font-size: 0.75em;
    letter-spacing: 2px;
    margin-top: -4px;
    margin-right: 43px;
    padding: 10px;
    position: absolute;
    top: 3px;
    right: 0;
    transition: 0.6s all;

    &:hover, 
    &.open{
      color: $highlightcolour;

      .icon-literature{
        color: $highlightcolour;
      }
    }

    &.open{
      .fixed-section-messages{
        opacity: 1;
        width: 34%;

        @media (--palm){
          width: 88.5%;
        }
      }
    }
  }

  .icon-literature{
    background: $primarycolour;
    color: $white;
    cursor: pointer;
    display: inline-block;
    font-size: 32px;
    position: fixed;
    top: 0;
    right: 0;
    margin-left: 10px;
    padding: 3px 8px 2px 6px;
    transition: 0.6s all;
    white-space: nowrap;
    z-index: 9999;

    &:hover, 
    &.open{
      color: $highlightcolour;
    }

    &.open{
      margin-right: 34%;

      @media (--palm){
        margin-right: 88.5%;
      }
    }
  }

  .fixed-section-messages{
    background-color: #fff;
    box-shadow: 2px 2px 9px rgba(90, 90, 90, 0.2);
    color: #333;
    position: fixed;
    right: 0;
    top: 0;
    padding: 10px 8px 5px 14px;
    opacity: 0;
    transition: 0.6s all;
    width: 0;
    white-space: nowrap;
    z-index: 10000;
  }

  .container{
    max-width: 59em;
  }
}

.fixed{
  position: fixed;

  @media (--palm){
    position: static !important;
  }
}

.apidocs{
  max-width: 59em;

  .hide{
    display: none !important;
  }

  pre, 
  code{
    color: $black;
    font-family: "Source Code Pro", sans-serif;
    line-height: 1;
    position: relative;
    overflow: visible;
    padding: 12px;
    text-align: left !important;

    span{
      color: $black;
      display: inline !important;
      margin: 0 !important;
      text-align: left !important;
    }
  }

  pre{
    background: $grey;
    border: 1px solid $white;
    border-width: 4px 0 5px 0;
    box-shadow: 2px 2px 10px rgba(90, 90, 90, 0.26);
    color: $black;
  }

  .code{
    font-family: "Source Code Pro", sans-serif;
    font-size: 14px;
  }

  pre.prettyprint{
    @media (--palm){
      margin-top: 35px;
    }
  }

  pre.prettyprint[data-type]:before{
    border-radius: 16px;
    border: 1px solid $positivecolour;
    content: attr(data-type);
    color: $positivecolour;
    display: inline-block;
    font-family: "Source Code Pro", sans-serif;
    font-weight: 400;
    font-size: 12px;
    padding: 1px 9px;
    position: absolute;
    top: 14px;
    right: 101.5%;
    text-transform: uppercase;
    text-align: center;
    
    @media (--palm){
      left: 0;
      margin-top: -46px;
      right: auto;
    }
  }

  pre.language-html[data-type=post]:before{
    border-color: $warningcolour;
    color: $warningcolour;
    left: -62px;
    
    @media (--palm){
      left: 0;
      right: auto;
      margin-top: -46px;
      
    }
  }

  pre.prettyprint[data-type=json]:before{
    border-color: $secondarycolour;
    color: $secondarycolour;
    left: -62px;
    @media (--palm){
      left: 0;
      right: auto;
      margin-top: -46px;
    }
  }

  table + h2, 
  pre + h2, 
  .tab-content + h2{
    background: $highlightcolour;
    border-radius: 3px;
    color: $white;
    display: inline-block;
    font-family: $regularweight;
    font-size: 0.8em;
    padding: 2px 7px 1px;
  }

  code{
    font-weight: 500;
    font-size: 14px;
    padding: 0;
  }

  section{
    > div{
      margin-bottom: 60px;
    }
  }

  table{
    td, th{
      padding: 15px 0 5px;
      text-align: left !important;
      width: 20%;
    }

    th{
      border-width: 1px;
      font-size: 0.85em;
      padding-top: 8px;
    }

    p{
      margin: 0;
      padding: 0;
    }

    td{
      font-family: "Source Code Pro", sans-serif;
      font-size: 14px;

      span{
        display: inline !important;
        margin: 0 !important;

        &.label{
          color: $warningcolour;
          font-weight: 500;
        }
      }
    }
  }

  .tab-pane{
    padding: 0;
  }

  #scrollingNav{
    position: fixed;
    width: 14%;

    @media (--palm){
      position: static !important;
      width: 100%;
    }
  }

  .sidenav{
    li{
      display: block;
      font-size: 0.9em;

      a{
        border-left: 5px solid transparent;
        color: $primarycolour;
        padding-left: 16px;
      }

      &.active{
        a{
          border-color: $highlightcolour;
          color: $highlightcolour;
        }
      }
    }
  }

  .nav-header{
    font-family: $heavyweight;
    text-transform: uppercase;
  }

  li + .nav-header{
    margin-top: 2em;
  }

  article{
    .pull-right{
      .btn-group{
        display: none;
      }
    }

    h1{
      color: $grey;
      font-size: 0.82em !important;
      font-family: $lightweight;
      font-weight: 300;
      letter-spacing: 1px;
    }
  }

  h1{
    font-size: 2rem;
    margin-bottom: 9px;

    + div{
      h1{
        color: $grey;
        font-size: 0.82em !important;
        font-family: $lightweight;
        font-weight: 300;
        letter-spacing: 1px;
        
      }
    }

    + h2{
      color: $grey;
      font-size: 0.82em !important;
      font-family: $lightweight;
      letter-spacing: 1px;
      margin: (-4px) 0 5px 4px;
      text-transform: uppercase;
    }
  }

  section > h1{
    font-size: 1.43rem;
  }

  h2{
    color: $grey;
    font-size: 1.3rem;
    margin: 0;
  }

  #header{
    border-bottom: 1px solid $darkgrey;
  }

  #sections{
    padding-top: 24px;
  }

  .container-fluid{
    padding-top: 2.3em;
  }

  .span2{
    /* Extends need to be defined or rewritten for postCSS */
    @extend .one-quarter;
    @extend .column;

/*
    @media (--palm){
      @extend .palm--one-whole;
    }
*/
  }

  #content{
    /* Extends need to be defined or rewritten for postCSS */
    @extend .three-quarters;
    @extend .column;
    padding-left: 66px;

/*
    @media (--palm){
      @extend .palm--one-whole;
      padding: 0 9px;
    }
*/
  }

  #code_examples{
    background: $lightgrey;
    box-shadow: -2px 0 10px rgba(90, 90, 90, 0.25);
    min-height: 100%;
    overflow: hidden;
    padding-top: 20px;
    position: absolute;
    top: 0;
    right: 0;
    transition: 0.6s all;
    width: 0%;

    &.open{
      width: 34%;
      @media (--palm){
        width: 88.5%;
      }
    }

    h6{
      font-family: $mediumweight;
      margin: 0;
    }
  }

  #examples{
    padding: 59px 30px 0 73px;
    overflow: scroll;

    @media (--palm){
      padding-left: 30px;
    }
  }

  .btn-group{
    position: relative;
  }

  .dropdown-menu{
    background: $primarycolour;
    display: none;
    font-size: 0.8em;
    list-style-type: none;
    margin: 0;
    padding: 12px;
    position: absolute;
    top: 34px;
    right: 0;
    width: 230px;

    li.divider{
      border-bottom: 1px solid $lightborders;
      margin-bottom: 4px;
      padding-bottom: 4px;
    }

    a{
      color: $white !important;
    }
  }

  .open{
    .dropdown-menu{
      display: block;
    }
  }

  .pull-left{
    float: left;
  }

  .pull-right{
    float: right;
  }

  .error{
    background: $warningcolour;
  }

  .clearfix{
    clear: both;
  }

  .reveal-code{
    cursor: pointer;
    display: block;
    display: block !important;
    font-size: 16px;
    transition: 0.6s all;
    &.open{
      transform: rotate(180deg) translateX(1px);
      color: $highlightcolour;
    }
  }

  tr.show-reveal{
    cursor: pointer;
    transition: 0.2s all;
    td{
      transition: 0.2s all;
    }

    &:hover{
      td{
        color: $highlightcolour;
      }

      .reveal-code{
        color: $highlightcolour;
      }
    }
  }

  .reveal{
    font-size: 16px;
    overflow: hidden;
    opacity: 0;

    td{
      border: 0 !important;
      padding: 0;
    }

    max-height: 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: 0.6s all;

    &.open{
      color: $darkgrey;
      max-height: 300px;
      overflow: visible;
      opacity: 1;
      transform: scaleY(1);
    }
  }

  #generator{
    border-top: 1px solid $grey;
    display: none;
    font-weight: $regularweight;
    font-size: 13px;
    padding-top: 10px;
    position: relative;
    bottom: -60px;
  }
}
