---
---

@import "_variables";
@import "_typography";
@import "_solarized";
@import "_header";

@mixin code-typography {
  font-family: "source-code-pro", Menlo, Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.5;
}

$skinnyContentWidth: 650px;
$contentWidth: 920px;
$contentPadding: 20px;
$columnWidth: 280px;
$columnGutter: 40px;
$twoColumnWidth: 2 * $columnWidth + $columnGutter;
$navHeight: 50px;

// basic reset
* {
  box-sizing: border-box;
  border: none;
  margin: 0;
  padding: 0;
}

html {
  background: $pageBg;
}

.left {
  float: left;
}

.right {
  float: right;
}

.container {
  min-width: $contentWidth + (2 * $contentPadding);
}

.wrap {
  width: $contentWidth + (2 * $contentPadding);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.skinnyWrap {
  width: $skinnyContentWidth + (2 * $contentPadding);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

hr {
  height: 0;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #eee;
}

ul,
li {
  margin-left: 20px;
}

li + li {
  margin-top: 10px;
}

// Make header navigation linkable and on the screen. Used in documentation and
// blog posts.
h1,
h2,
h3,
h4,
h5,
h6 {
  .anchor {
    margin-top: -$navHeight;
    position: absolute;
  }

  &:hover .hash-link {
    display: inline;
  }
}

.hash-link {
  color: $mediumTextColor;
  display: none;
}

// Main Nav

.nav-main {
  // @include clearfix;
  background: linear-gradient($darkerColor, $darkestColor);
  color: $lightTextColor;
  position: fixed;
  top: 0;
  height: $navHeight;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
  width: 100%;
  z-index: 100;

  a {
    color: $lightColor;
    text-decoration: none;
  }

  .nav-site-internal {
    margin: 0 0 0 20px;
  }

  .nav-site-external {
    float: right;
    margin: 0;
  }

  .nav-site {
    li {
      margin: 0;
    }

    li > a {
      box-sizing: content-box;
      padding: 0 10px;
      line-height: $navHeight;
      display: inline-block;
      height: $navHeight;
      color: #ddd;

      &:hover {
        color: #fff;
      }

      &.active {
        color: $lightTextColor;
        border-bottom: 3px solid $primary;
        background: #333;
      }
    }
  }

  .nav-home {
    color: #e9e9e9;
    font-size: 24px;
    line-height: $navHeight;
    height: $navHeight;
    display: inline-block;
  }

  .nav-logo {
    vertical-align: middle;
    display: inline-block;
  }

  ul {
    display: inline-block;
    vertical-align: top;
  }

  li {
    display: inline;
  }
}

.buttons-unit {
  margin-top: 60px;
  text-align: center;

  a {
    color: $blueColor;
  }

  .button {
    font-size: 24px;
    background: $primary;
    color: $lightTextColor;

    &:active {
      background: darken($primary, 5%);
    }
  }
}

// Docs Nav

.nav-docs {
  color: $darkColor;
  font-size: 14px;
  // position: fixed;
  float: left;
  width: 214px;

  ul {
    list-style: none;
    margin: 0;
  }
  ul ul {
    margin: 6px 0 0 20px;
  }
  li {
    line-height: 16px;
    margin: 0 0 6px;
  }
  h3 {
    text-transform: uppercase;
    font-size: 14px;
  }
  a {
    color: $mediumestColor;
    display: block;

    &:hover {
      text-decoration: none;
      color: $primary;
    }

    &.active {
      color: $primary;
    }

    &.external {
      &:after {
        content: "";
        display: inline-block;
        width: 10px;
        height: 10px;
        padding-left: 5px;
        background-image: url("/img/external_2x.png");
        background-position: 100% 0;
        background-repeat: no-repeat;
        font-size: 10px;
        line-height: 1em;
        opacity: 0.5;
      }
    }
  }

  .nav-docs-section {
    border-bottom: 1px solid #ccc;
    border-top: 1px solid #eee;
    padding: 12px 0;

    &:first-child {
      padding-top: 0;
      border-top: 0;
    }

    &:last-child {
      padding-bottom: 0;
      border-bottom: 0;
    }
  }
}

.nav-blog {
  li {
    margin-bottom: 5px;
  }
}

// Home Page specifics

.home-section {
  margin: 50px 0;
}

.home-divider {
  border-top-color: #bbb;
  margin: 0 auto;
  width: 400px;
}

.skinny-row {
  // @include clearfix;
}

.skinny-col {
  float: left;
  margin-left: $columnGutter;
  width: ($skinnyContentWidth - $columnGutter) / 2;
  &:first-child {
    margin-left: 0;
  }
}

#examples h3,
.home-presentation h3 {
  color: $darkColor;
  font-size: 24px;
  font-weight: normal;
  margin-bottom: 5px;
}

#examples {
  p {
    margin: 0 0 25px 0;
    max-width: $twoColumnWidth;
  }

  .example {
    margin-top: 60px;
  }

  #todoExample {
    font-size: 14px;
    ul {
      list-style-type: square;
      margin: 0 0 10px 0;
    }
    input {
      border: 1px solid #ccc;
      font: 14px proxima-nova, "Helvetica Neue", "Helvetica", "Arial", sans-serif;
      padding: 3px;
      width: 150px;
    }
    button {
      font: 14px proxima-nova, "Helvetica Neue", "Helvetica", "Arial", sans-serif;
      margin-left: 5px;
      padding: 4px 10px;
    }
  }

  #markdownExample {
    textarea {
      border: 1px solid #ccc;
      font: 14px proxima-nova, "Helvetica Neue", "Helvetica", "Arial", sans-serif;
      margin-bottom: 10px;
      padding: 5px;
    }
  }
}

.home-bottom-section {
  margin-bottom: 100px;
}

.docs-nextprev {
  // @include clearfix;
}

.docs-prev {
  float: left;
}

.docs-next {
  float: right;
}

footer {
  font-size: 13px;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 18px;
  overflow: auto;
}

section.black content {
  padding-bottom: 18px;
}

/**
 * Blog
 */

.blogContent {
  // @include clearfix;

  padding-top: 20px;

  blockquote {
    padding: 5px 15px;
    margin: 20px 0;
    background-color: #f8f5ec;
    border-left: 5px solid #f7ebc6;
  }

  h2 > code {
    font-size: inherit;
    line-height: inherit;
    color: #555;
    background-color: rgba(0, 0, 0, 0.04);
  }
}

/**
 * Docs
 */

.documentationContent {
  // @include clearfix;

  .subHeader {
    font-size: 24px;
  }

  // H2s form documentation topic dividers. Extra space helps.
  h2 {
    margin-top: 30px;
  }

  padding-top: 20px;

  // Make a notice box out of blockquotes in the documentation:
  blockquote {
    padding: 15px 30px 15px 15px;
    margin: 20px 0;
    background-color: rgba(204, 122, 111, 0.09999999999999998);
    border-left: 5px solid #db2975;
    h4 {
      margin-top: 0;
    }
    p {
      margin-bottom: 0;
    }
    // Treat first child as the title - promote to H4.
    p:first-child {
      font-weight: bold;
      font-size: 14.5px;
      line-height: 20px;
      margin-top: 0;
      text-rendering: optimizelegibility;
    }
  }

  iframe {
    width: 100%;
    height: calc(100% - 97px);
    position: absolute;
    top: 97px;
    bottom: 0;
  }
}

.docs-prevnext {
  clear: right;
  padding-top: 40px;
  padding-bottom: 40px;
}

/* Button */

.button {
  background: linear-gradient($buttonGreyTop, $buttonGreyBottom);
  // border: 1px solid $darkestColor;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 18px;
  font-weight: 400;
  margin: 0 12px;
  // word-spacing: -2px;
  // letter-spacing: 1px;
  display: inline-block;
  color: $lightTextColor;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  text-decoration: none;

  &:hover {
    text-decoration: none;
  }

  &:active {
    box-shadow: none;
  }
}

.hero {
  .button {
    box-shadow: 1px 3px 3px rgba(0, 0, 0, 0.3);
  }
}

.button.blue {
  background: linear-gradient($buttonBlueTop, $buttonBlueBottom);
}

/* Row */

.row {
  padding-bottom: 4px;
}

.row .span4 {
  width: 33.33%;
  display: table-cell;
}

.row .span8 {
  width: 66.66%;
  display: table-cell;
}

.row .span6 {
  width: 50%;
  display: table-cell;
}

/* Content */

p {
  margin: 10px 0;
}

.highlight {
  padding: 10px;
  margin-bottom: 20px;
}

figure {
  text-align: center;
}

.inner-content {
  float: right;
  width: $skinnyContentWidth;
}

.nosidebar .inner-content {
  float: none;
  margin: 0 auto;
}

h1 {
  // Contains .edit-page-link
  // @include clearfix;
}

.edit-page-link {
  float: right;
  font-size: 16px;
  font-weight: normal;
  line-height: 20px;
  margin-top: 17px;
}

/* Blog */

.post-list-item + .post-list-item {
  margin-top: 60px;
}

.hll {
  background-color: #f7ebc6;
  border-left: 5px solid #f7d87c;
  display: block;
  margin-left: -14px;
  margin-right: -14px;
  padding-left: 9px;
}

/* CodeMirror doesn't support <jsx> syntax. Instead of highlighting it
   as error, just ignore it */
.highlight .javascript .err {
  background-color: transparent;
  color: inherit;
}

.highlight {
  position: relative;
  margin-bottom: 14px;
  padding: 30px 14px 14px;
  border: none;
  border-radius: 0;
  overflow: auto;
}

.highlight pre {
  padding: 0;
  margin-top: 0;
  margin-bottom: 0;
  background-color: transparent;
  border: 0;
  float: left;
  min-width: 100%;
}

.highlight pre code {
  /* Respect line-height defined in <code> styles above */
  display: block;

  /* Cancel out styles for `li code` in case we have a <pre> within an <li>. */
  background: none;
  padding: 0;
}

.highlight pre .lineno {
  display: inline-block;
  width: 22px;
  padding-right: 5px;
  margin-right: 10px;
  color: #bebec5;
  text-align: right;
}

/* Echo out a label for the example */

div.highlight:after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: bold;
  color: #c2c0bc;
  background-color: #f1ede4;
  content: "Code";
}

.downloadCenter {
  text-align: center;
  margin-top: 20px;
  margin-bottom: 25px;
}

.downloadSection:hover {
  text-decoration: none !important;
}

@media screen and (max-width: 960px) {
  .nav-main {
    position: static;
  }
  .container {
    padding-top: 0;
  }
}

.post {
  margin-bottom: 30px;
}

.post img {
  max-width: 100%;
}

.pagination {
  margin-bottom: 30px;

  /* Trick to get the wrapper to expand to fit floating elements */
  width: 100%;
  overflow: hidden;

  .next {
    float: right;
  }
}

.logo-blue {
  color: $textLogoBlue;
}

.logo-orange {
  color: $textLogoOrange;
}

small code,
li code,
p code {
  color: #555;
  background-color: rgba(0, 0, 0, 0.04);
  padding: 1px 3px;
}

small a code,
li a code,
p a code {
  color: inherit;
}

.cm-s-default span.cm-string-2 {
  color: inherit;
}

/* Contributing section style */

#contribute-section {
  min-height: 600px;

  .feature-number {
    background-color: #1a3f5d;
  }

  .contribute-heading {
    font-size: 24px;
    color: #1a3f5d;
    border-bottom: 1px solid #cccccc;
  }

  .contribute-subheading,
  .contribute-repo-link,
  .subheading {
    color: #df2375;
  }

  .left-side,
  .right-side {
    display: inline-block;
    width: 48%;
    margin-right: 10px;
  }

  .left-side {
    float: left;
  }

  .right-side {
    float: right;
  }

  .repo-name {
    display: block;
    margin: 20px 0;
  }

  .repo-issues-see-all {
    margin-left: 15%;
    margin-bottom: 10px;
    padding-left: 10px;
  }

  .issue-list {
    list-style: none;
    margin: 0;
  }

  .issue-item {
    margin: 10px 0;
    vertical-align: top;
  }

  .issue-number {
    background-color: #cccccc;
    display: inline-block;
    text-align: center;
    color: #df2375;
    width: 15%;
    vertical-align: top;
  }

  .issue-title {
    margin: 0 0 0 10px;
    display: inline-block;
    width: 80%;
  }
}

img[alt^="OTA:"] {
  width: 50%;
  transition: width 0.3s ease-in;
  display: block;
}

img[alt^="OTA:"]:hover {
  width: 100%;
  transition: width 0.3s ease-in;
}
