/* -------------------------------------------------
    Page styles
   ------------------------------------------------- */

$minWidthBreakPoint: 650px;

$fontFamily: Tahoma, sans-serif;

html {
  color: #333;
  font-family: $fontFamily;
  font-size: 14px;
  min-width: 320px;
}

p {
  line-height: 1.3;
  margin-bottom: 14px;
}

h1, h2, h3, h4 {
  font-family: 'Fira Sans', sans-serif;
  line-height: 1;
}

h2 {
  font-weight: 100;
  font-size: 32px;
  margin: 48px 0 8px;
}

h3 {
  font-weight: 500;
  font-size: 18px;
  margin: 24px 0 8px;
}

h4 {
  font-weight: normal;
  color: #939393;
  font-size: 16px;
  margin: 24px 0 0;
}

.row {
  display: flex;
  > * {
    flex: 1;
  }
}

article {
  h2, h3 {
    position: relative;
    z-index: 1;

    &:after {
      content: '';
      background: rgba(#439cff, .2);
      border-radius: 4px;
      opacity: 0;
      left: -8px;
      right: -8px;
      top: -10px;
      bottom: -4px;
      position: absolute;
      z-index: -1;
      transition: all .4s .3s linear;
    }

    &.-hilited- {
      &:after {
        opacity: 1;
        transition: all .4s .7s linear;
      }
    }
  }
}


.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1px 0;
  position: relative;

  article {
    margin: 60px 0 30px;
  }
  
  @media all and (max-width: 1525px) {
    margin-left: 270px;
  }

  @media all and (max-width: 1280px) {
    margin-right: 20px;
  }

  @media all and (max-width: $minWidthBreakPoint) {
    margin-right: 20px;
    margin-left: 20px;
  }
}

.list-inline {
  display: flex;
  margin: -8px -8px 0;
  > * {
    margin: 8px 8px 0;
  }
}

.buttons {
  position: absolute;
  top: 19px;
}

.lang-link {
  position: absolute;
  display: inline-flex;
  align-items: center;
  right: 0;
  top: 15px;

  img {
    margin-right: 5px;
  }

  @media all and (max-width: 650px) {
    span {
      display: none;
    }
  }
}

.-text-center- {
  text-align: center;
}

input[type='text'] {
  outline: none;
  height: 32px;
  border: 1px solid #b5b5b5;
  padding: 0 8px;
  margin: 0 0 14px;
  color: #444;
  font-family: $fontFamily;
  transition: all .2s;
  width: 250px;

  &:focus {
    border-color: #ffd75c;
  }
}

ul {
  margin: 0 0 16px;
  li {
    list-style: none;
    margin-bottom: 8px;
  }
}

/*  Example
   ------------------------------------------------- */

%example-label {
  background: #ececec;
  border-radius: 0 0 4px 4px;
  position: absolute;
  padding: 4px 12px;
  right: 8px;
  top: 0;
}

$exampleBorderRadius: 4px;

.hljs {
  font-family: Consolas, monospace;
  line-height: 1.2;
  tab-size: 4;
}

.example {
  border: 1px solid #ececec;
  border-radius: $exampleBorderRadius;
  position: relative;
  margin: 16px 0;

  .example-code {
    border: none;
    border-radius: 0 0 $exampleBorderRadius $exampleBorderRadius;
    border-top: 1px solid #ececec;
    margin: 0;
  }
}

.example-inline {
  background: red;
  display: inline-block;
  vertical-align: middle;
  margin: 0 4px;

  .hljs {
    padding: 0 4px;
  }
}

.example--label {
  @extend %example-label;
}

.example-content {
  padding: 32px;

  @media all and (max-width: $minWidthBreakPoint) {
    padding-left: 4%;
    padding-right: 4%;
  }

  h1, h2, h3 {
    &:first-child {
      margin-top: 0;
    }
  }

  >*:last-child {
    margin-bottom: 0 !important;
  }
}

a {
  color: #47A6EC;

  &:hover {
    color: #ff767e;
  }
}

.example-code  {
  border: 1px solid #ddd;
  border-radius: $exampleBorderRadius;
  overflow: hidden;
  margin: 16px 0;
  font-size: 13px;

  code {
    padding: 16px 32px;
  }
}

//  Param
// -------------------------------------------------


.param-inline {
  font-family: Consolas, monospace;
  strong {
    background: #efefef;
    color: #333;
    border-radius: $exampleBorderRadius;
    font-weight: normal;
    display: inline-block;
    vertical-align: middle;
    padding: 3px 6px 4px;
    margin-right: 4px;
  }

  i {
    color: #838383;
    font-size: .95em;
    font-style: normal;
    font-weight: 100;
    font-family: 'Fira Sans', sans-serif;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
  }
}

//  Promo block
// -------------------------------------------------

.promo-header {
  font-size: 48px;
  font-weight: 100;
  text-align: center;
  margin-top: 54px;

  span {
    display: block;
    font-size: .5em;
  }
}

.datepicker-promo {
  text-align: center;

  .datepicker-inline {
    display: inline-block;
  }
}

//  Range example
// -------------------------------------------------

.range-example {
  input[type='text'] {
    width: 150px;
  }
  span {
    display: inline-block;
    margin: 0 8px;
  }
}

//  Param header
// -------------------------------------------------

.param-header {
  margin-bottom: 8px;
  h3 {
    margin-bottom: 2px;
  }

  p {
    margin: 0;
    font-size: 13px;
  }
}

.param-header--row {

}

.param {
  margin-bottom: 32px;
}

.param-header--label {
  color: #707070;
  display: inline-block;
  vertical-align: middle;
}

//  Navigation
// -------------------------------------------------

.nav-wrap {
  background: #fff;
  position: fixed;
  overflow: hidden;
  width: 250px;
  top: 0;
  left: 0;
  bottom: 0;
  box-shadow: 0 0 4px rgba(0, 0, 0, .3);

  @media all and (max-width: $minWidthBreakPoint) {
    display: none;
  }

  &:after, &:before {
    content: '';
    pointer-events: none;
    position: absolute;
    left: 0;
    right: 0;
    height: 28px;
  }

  &:after {
    background: linear-gradient(to top, #fff, rgba(255, 255, 255, 0));
    bottom: 0;
  }
}

.nav {
  position: absolute;
  padding: 18px;
  right: 0;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
}

.nav--section {
  margin-bottom: 20px;


}
.nav--section-title {
  line-height: 1;
  font-size: 22px;
  margin: 0 0 8px;

  a {
    color: #000;
    text-decoration: none;

    &:hover {
      color: #ff767e;
    }
  }
}
.nav--subsection {
  margin-left: 2px;
}

.nav--subsection-title {
  font-size: 13px;
  margin: 0 0 8px;
  font-weight: normal;
  font-family: Tahoma, sans-serif;


  a {
    color: #787878;
    text-decoration: none;

    &:hover {
      color: #ff767e;
    }
  }
}


//  Cell note
// -------------------------

.dp-note {
  position: absolute;
  background: #cccccc;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  left: 50%;
  bottom: 1px;
  transform: translateX(-50%);

  .-selected- & {
    bottom: 2px;
    background: #fff;
    opacity: .5;
  }
}

//  Visual tests
// -------------------------------------------------

.visual-tests {
  padding-top: 12px;
  padding-bottom: 120px;

  h1 {
    color: #555;
    font-size: 20px;
    margin: 0;
    padding-left: 16px;
  }

  .row {
    border-bottom: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 16px;


  }

  article:last-child {
    .row {
      border: none;
    }
  }
}

.vt-tile {
  padding: 16px;
  width: 284px;

  input {
    width: 100%;
  }

  h2 {
    font-family: monospace;
    font-size: 14px;
    margin: 0 0 8px;
    text-align: center;
  }
}

.v-log {
  position: fixed;
  padding: 8px;
  font-size: 12px;
  font-family: monospace;
  background: rgba(0, 0, 0, .7);
  height: 100px;
  width: 100%;
  bottom: 0;
  overflow: auto;
  z-index: 10;

  p {
    margin: 0;
    color: greenyellow;
  }

  span {
    color: #ddd;
  }
}

//  Logger
// -------------------------------------------------

.logger {
  background: rgba(0, 0, 0, .7);
  border-radius: 4px;
  font-size: 12px;
  font-family: Monospace, monospace;
  height: 150px;
  overflow: auto;
  position: relative;
}

.logger--content {
  padding: 4px 8px;
  height: 100%;
  overflow: auto;

  p {
    margin: 0;
    color: greenyellow;
  }

  span {
    color: #ddd;
  }
}

.logger--clear {
  color: #333;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  position: absolute;
  height: 32px;
  padding: 0 8px;
  font-family: 'Tahoma', sans-serif;
  font-size: 13px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, .5);
  right: 24px;
  bottom: 0;

  &:hover {
    background: rgba(255, 255, 255, .8);
  }

  &:active {
    background: rgba(255, 255, 255, .3);
  }
}