@import 'fonts';
@import 'colors';
@import 'code';
@import 'grid';

@import 'components';
@import './routes/docs';

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: OfficeCodePro, Consolas, Inconsolata, monspace;
  background: linear-gradient(#FFFFFF, #FFFFFF 50%, $primary-color 50%, $primary-color);
}

input[type=text],
input[type=date],
input[type=datetime-local],
input[type=email],
input[type=tel],
input[type=password],
input[type=number],
input[type=url],
textarea {
  height: 40px;
  border: 2px solid $black;
  font-size: 1rem;
  padding: 0 0.5em;
  font-family: OfficeCodePro, Consolas, Inconsolata, monspace;
  border-radius: 0;
  box-shadow: none;
  width: 100%;
  max-width: 100%;
  transition: box-shadow 120ms;
  -webkit-appearance: textfield;
     -moz-appearance: textfield;
      -ms-appearance: textfield;
          appearance: textfield;

  background: $transparent;
  box-shadow: none;
  &:hover {
    box-shadow: 0 0 0 3px rgba($black, 0.1);
  }

  &:focus, &:active {
    outline: none;
    box-shadow: 0 0 0 3px rgba($black, 0.25);
  }
}

.boolean-field {
  font-size: 1rem;
  padding: 0 0.5em;
  cursor: pointer;
}

.info {
  max-width: 500px;
  margin: 0 auto;
  padding-bottom: 1.5em;
}

header {
  background: $primary-color;
  color: #FFF;
  padding: 20px 50px;

  h1 {
    width: 40%;
    display: inline-block;
    font-size: 18px;
    margin: 0;

    svg {
      position: relative;
      top: 2px;
    }
  }

  svg {
    -webkit-filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
            filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
  }

  nav {
    width: 60%;
    display: inline-block;
    text-align: right;

    a {
      color: #FFF;
      text-decoration: none;
      margin-left: 40px;

      transition: all 0.25s;
      opacity: 0.7;

      &:hover {
        opacity: 1;
      }
    }
  }
}

section > h2 {
  padding: 30px 0;
  margin: 40px 0;
}

main {
  background: #FFFFFF;
}

p {
  line-height: 1.5em;
  padding-bottom: 1.5em;
}

h2 {
  padding-bottom: 30px;
  font-size: 1.2em;
  text-align: center;
  border-bottom: 1px solid #D8D8D8;
}

hr {
  border: 0;
  border-bottom: 1px solid #D8D8D8;
}


pre, pre.hljs {
  font-family: 'OfficeCodePro';
  font-size: 14px;
  background: #FAFAFA;
  border-top: 1px solid #DEDEDE;
  border-bottom: 1px solid #DEDEDE;
  padding: 20px;
}

::selection {
  background: #DEDDED;
}
::-moz-selection {
  background: #DEDDED;
}

@media screen and (max-width: 550px) {
  header {
    position: relative;
    height: 90px;
    padding: 0;
    margin: 0;

    h1 {
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 49px;
      line-height: 48px;
      background: rgba(0, 0, 0, 0.3);
      border-bottom: 1px solid rgba(255, 255, 255, 0.5);
      text-align: center;
    }

    nav {
      position: absolute;
      top: 50px;
      right: 0;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 39px;
      display: -webkit-flex;
      display:         flex;
      display: flex;
      border-bottom: 1px solid rgba(255, 255, 255, 0.5);

      a {
        margin: 0;
        -webkit-flex: 1;
                flex: 1;
        text-align: center;
        line-height: 38px;
        background: rgba(0, 0, 0, 0.4);
        border-right: 1px solid rgba(255, 255, 255, 0.5);
      }
    }
  }
}
