//
// Docs.css
// --------------------------------------------------

//Imports
@import "mixins.scss";

// Docs variables
$desktop-spacing: 3rem;
$mobile-spacing: 1rem;

//Base styles
* {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

body {
  font: 16px/1.7 "Roboto", "Helvetica Neue", Helvetica, arial, sans-serif;
  font-weight: 300;
  color: #333;
}

// Typography
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  font-weight: 300;
}

h2 {
  margin-bottom: .18em;
  font-size: 1.6em;
}

h3 {
  margin-bottom: .15em;
  font-size: 1.3em;
}

h5 {
  font-weight: 400;
}

p {
  margin-top: .5em;
  margin-bottom: .5em;
  font-size: 1em;
  color: #555;
}

.download-decription {
  margin-bottom: 1em;
}

.lead {
  font-size: 1.1em;
  color: #777;
}

a {
  color: #4b92c6;
  text-decoration: none;
}

// Code
.highlight {
  margin: 0;
  font-size: .9em;
}

// Buttons
.btn {
  display: inline-block;
  padding: 10px 15px;
  margin-bottom: 0;
  font-size: 14px;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  text-decoration: none;
  color: #666;
  background-image: none;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: all .2s linear;

  &:hover {
    border-color: #999;
  }
}

.btn-components,
.btn-download {
  margin-right: $mobile-spacing;
  margin-left: $mobile-spacing;
  padding: 12px 30px;
  display: block;
}

.btn-download {
  margin-bottom: 1rem;
  color: #0f2b3c;
  border-color: transparent;
  background-color: rgba(255,255,255,.9);

  &:hover {
    border-color: transparent;
    background-color: #fff;
  }
}

@media (min-width: 32em) {
  .btn-components,
  .btn-download {
    margin-right: 0;
    margin-left: 0;
    display: inline-block;
  }

  .btn-download {
    margin-right: 1rem;
    margin-bottom: 0;
    margin-left: 0;
  }
}

.btn-inversed {
  color: #fff;
  border-color: rgba(255,255,255,.7);

  &:hover {
    border-color: #fff;
  }
}

// Use a simple flexbox grid
.container {
  margin-left: auto;
  margin-right: auto;
  padding-left: $mobile-spacing;
  padding-right: $mobile-spacing;
  @include clearfix;
}
.col {
  position: relative;
  padding: 3rem $mobile-spacing;
}

@media (min-width: 32em) {
  .container {
    padding-left: 0;
    padding-right: 0;
    max-width: 65rem;
  }

  .col-group {
    display: -webkit-flex; // Make the grid work in older Safari browsers
    display: -ms-flex; // Make the grid work in older IE browsers
    display: flex
  }

  .col {
    min-width: 0; // Fixes everything for firefox
    padding-right: $desktop-spacing;
    padding-left: $desktop-spacing;
    flex: 1;
  }

  .col-one-third {
    max-width: 33.333%;
  }
}

// Masthead Jumbotron
.masthead {
  position: relative;
  padding-bottom: 80px;
  color: #fff;
  background-image: url('/assets/img/photo-couch.png');
  background-size: cover;

  &:after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    content: "";
    background-color: #000;
    opacity: .25;
    z-index: 1;
  }
}

.masthead-content {
  position: relative;
  margin-top: 50px;
  z-index: 10;
}

.masthead-title {
  margin: 0;
  padding: 0 1rem 1.5rem;
  font-size: 1.5em;
  text-shadow: 0 0 3px rgba(0,0,0,.3);
}

@media (min-width: 32em) {
  .masthead {
    background-position: center;

    &:after {
      display: none;
    }
  }

  .masthead-title {
    padding: 0 8rem 3rem;
    font-size: 2.1em;
  }
}

.photo-credit {
  position: absolute;
  left: 50%;
  bottom: 1em;
  font-size: .8em;
  color: #fff;
  white-space: nowrap;
  transform: translatex(-50%);
  transition: opacity .15s linear;
  opacity: .5;
  z-index: 10;

  &:hover {
    opacity: .9;
  }
}

// Sub page masthead
.sub-masthead {
  color: #fff;
  text-shadow: 0 0 3px rgba(0,0,0,.3);
  @include directional-gradient(#000, #0f2b3c);
}

.subpage-header-content {
  padding: 2.5rem 1rem 3rem;
}

@media (min-width: 32em) {
  .subpage-header-content {
    padding: 3rem 3rem 4rem;
  }
}

.subpage-title {
  margin-top: 0;
  margin-bottom: 0;
  font-weight: 300;
}

.subpage-lead {
  margin-top: 0;
  margin-bottom: 0;
  color: #fff;
  font-size: 1.3em;
  font-weight: 300;
  opacity: .8;
}

// Navbar inside each masthead and sub masthead
.nav {
  position: relative;
  padding-top: 1.2rem;
  padding-bottom: 1.2rem;
  margin-left: $mobile-spacing;
  margin-right: $mobile-spacing;
  display: block;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,.2);
  z-index: 10;
  @include clearfix;
}

.title {
  display: block;
  font-size: 1em;
  color: #fff;
}

.nav-item {
  margin-right: .7rem;
  font-size: .8em;
  color: #fff;
  line-height: 1;
  opacity: .7;
  transition: opacity .15s linear;

  &:hover {
    opacity: 1;
  }
}

.nav-group {
  display: block;
}

@media (min-width: 32em) {
  .nav {
    margin-left: $desktop-spacing;
    margin-right: $desktop-spacing;
  }

  .title {
    float: left;
  }

  .nav-group {
    margin-top: .5em;
    float: right;
  }

  .nav-item {
    margin-right: $desktop-spacing;
    float: left;
  }

  .nav-item:last-child {
    margin-right: 0;
  }
}

// Wrap the example in window style (border and box-shadow)
.example-component-window {
  height: 300px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0,0,0,.1);
  border: 1px solid #bebebe;
  border-radius: 6px;
}

// The demo is useless on mobile
@media (min-width: 32em) {
  .example-component-container {
  	position: -webkit-sticky;
  	position: -moz-sticky;
  	position: -ms-sticky;
  	position: -o-sticky;
  	position: sticky;
    top: $desktop-spacing;
    min-width: 310px;
    margin-bottom: $desktop-spacing;
  }
}

// This is the homepage's demo
.demo-app-container {
  height: 450px;
  margin-right: $desktop-spacing;
  margin-bottom: $desktop-spacing;
  margin-left: $desktop-spacing;
  display: none;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,0,0,.3);
}

// The demo is useless on mobile
@media (min-width: 32em) {
  .demo-app-container {
    display: block;
  }
}

.demo-app,
.component-example {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

// Sections
.docs-section {
  border-bottom: 1px solid #ddd;
}

.docs-section-gray {
  background-color: #f8f8f8;
}

@media (min-width: 32em) {
  .basic-template-section {
    border-top: 1px solid #ddd;
  }
}

.oss-section {
  position: relative;
  color: #fff;
  text-shadow: 0 0 3px rgba(0,0,0,.3);
  @include directional-gradient(#000, #0f2b3c);

  a:not(.btn) {
    color: #fff;
  }

  p {
    color: darken(#ffffff, 20%);
  }

  .btn {
    margin-top: 20px;
  }

  .col:last-child {
    padding-top: 0; // Give the two sections consistent spaceing on mobile
  }
}

@media (min-width: 32em) {
  .oss-section .col:last-child {
    padding-top: $desktop-spacing;
  }
}

.component-section {
  margin-bottom: $mobile-spacing;
  border-bottom: 1px solid #ddd;

  &.last-component-section {
    margin-bottom: 0;
  }

  .col:last-child {
    padding-top: 0;
  }
}

// Component section (split)
@media (min-width: 32em) {
  .component-section {
    margin-bottom: 0;
    border-bottom: 0;
    @include split-linear-gradient(#fff, #f5f5f5);

    .col {
      padding-top: $desktop-spacing;
      border-left: 1px solid #ddd;

      &:first-child {
        border-left: 0;
      }

      &:last-child {
        padding-top: $desktop-spacing;
        padding-bottom: 0;
      }
    }
  }
}

.component-description {
  margin-bottom: 2rem;
}

// Footer
.footer {
  margin-top: -1px; // Remove the double border
  border-top: 1px solid #ddd;
}

.footer-content {
  font-size: .8em;
  font-weight: 500;
  opacity: .8;
}

.footer-links {
  padding-left: 0;
  list-style: none;

  li {
    display: inline-block;
  }
}

@media (min-width: 32em) {
  .footer-content {
    margin-right: 5rem;
    margin-left: 5rem;
  }
}

// Utilities
.text-centered {
  text-align: center;
}

.docs-hr {
  margin-top: 2rem;
  margin-bottom: 2rem;
  background: 0 0;
  border: 0;
  border-bottom: 1px solid #ddd;
}

// Icons
@font-face {
  font-family: "photon-entypo";
  src: url('/dist/fonts/photon-entypo.eot');
  src: url('/dist/fonts/photon-entypo.eot?#iefix') format('eot'),
    url('/dist/fonts/photon-entypo.woff') format('woff'),
    url('/dist/fonts/photon-entypo.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

.icon:before {
  position: relative;
  display: inline-block;
  font-family: "photon-entypo";
  speak: none;
  font-size: 100%;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-bucket:before { content: '\e8d5'; } /* '' */
.icon-code:before { content: '\e834'; } /* '' */
.icon-window:before { content: '\e86d'; } /* '' */


// Component specific CSS
.buttons-component {
  height: 80px;
}

.button-groups-component {
  height: 110px;
}

.forms-component {
  height: 430px;
}

.icons-component {
  height: 700px;
  overflow: hidden;
}
