@import "colors.less";
@import "icons.less";
@import "base.less";
@import "search.less";

body {
  background: @darker-grey;
}

.page-nav {
  .context {
    position: relative;
    margin-bottom: 2rem;

    .children a.active {
      text-decoration: underline;
    }

    a.self {
      color: white;
      text-decoration: underline;
    }

    .top {
      font-size: 1.1em;
    }
  }

  .children {
    margin-left: 0.5em;

    table {
      border-spacing: 0;
      border-collapse: collapse;

      td {
        vertical-align: top;
      }
    }
  }

  .section-number {
    width: 100px;
    display: inline-block;
    text-align: right;
    margin-left: -100px;
    padding-right: .5rem;
  }

  .children {
    margin-left: -100px;

    .number-cell {
      text-align: right;
      padding-right: .5rem;
      width: 100px;
    }

    .title-cell {
      display: inline-block;
      padding-left: 5px;
      text-indent: -5px;
    }
  }
}

.page-aside pre {
  background: @offest-white;
  color: @dark-grey;
}

.page-toc h2 {
  margin-top: 0;
  color: @light-grey;
}

.page-toc .section-number {
  color: @grey-secondary;
}

.page-toc a {
  color: @grey-primary;
}

.page-toc a:hover {
  text-decoration: underline;
}

.page-toc ol {
  padding-left: 30px;
}

.page-toc > .toc {
  padding-left: 0px;
}

.page-aside {
  background: @off-white;
}

.page-content.full {
  grid-column-start: 2;
  grid-column-end: span 2;
}

.page-content h1 {
  border-top: 4px solid @darker-grey;
  padding-top: 10px;
}

.toc {
  font-family: 'Roboto Slab', serif;
}

.page-toc > .toc > li > .toc {
  margin-bottom: 1.5em;
}

.toc li {
  margin-bottom: 10px;
}

.toc li li {
  margin-bottom: 0;
}

.toc a {
  text-decoration: none;
}

.toc ol a, .toc ol .section-number {
  font-size: 16px;
}

.toc, .toc ol {
  list-style: none;
}

.table-of-contents {
  margin: 2em 0;

  .toc-header {
    font-family: 'Roboto Slab', serif;
  }
}

.page-content ol.toc {
  margin-top: 1em;
  margin-bottom: 1.5em;

  ol.toc {
    margin-top: 0;
  }

  .section-number {
    color: @light-grey;
    padding-right: 5px;
  }
}

.improve-docs {
  position: fixed;
  bottom: 0;
  left: 0;
  color: @grey-secondary;
  font-size: 13px;
  list-style-type: none;
  margin: 0;
  padding: 30px;
}

.improve-docs a {
  text-decoration: none;
}

.improve-docs a, .improve-docs a:visited {
  color: @grey-primary;
}

.improve-docs a:hover {
  text-decoration: underline;
}

.improve-docs li {
  margin-top: 5px;
  margin-left: -4px;
}

.improve-docs img {
  width: 16px;
  height: 16px;
  margin-bottom: -4px;
  margin-right: 4px;
  filter: grayscale(100%);
  opacity: 0.5;
}

.improve-docs li:hover a {
  color: white;
}

.improve-docs li:hover img {
  filter: none;
  opacity: 1;
}

.definition-thumb a {
  color: inherit;
}

.definition-thumb pre {
  background: @off-white;
  border-left: 1px solid @darker-grey;
  color: @darker-grey;
  margin-bottom: 0;
}

.definition-thumb a:hover {
  text-decoration: underline;
}

.definition-content {
  padding: 1em;
}

.definition-content .definition {
  margin: 1em;
}

.aside {
  color: @light-grey;
  font-style: italic;
  background: @off-white;
  padding: 1em;
  margin: 2em;
}

.definition {
  margin-top: 2em;
}

.definition-content {
  border-left: 1px solid @offest-white;
}

.page-aside .example {
  margin-bottom: 3em;
}

.example h3 {
  font-size: 20px;
}

.trademark-guidelines {
  font-family: 'Iosevka', monospace;
}

.trademark-guidelines li::before {
  display: none;
}

.trademark-guidelines ul > li {
  list-style-type: decimal;
}

.trademark-guidelines ul ul > li {
  list-style-type: lower-alpha;
}

.trademark-guidelines ul ul ul > li{
  list-style-type: lower-roman;
}

.trademark-guidelines ul ul ul ul > li {
  list-style-type: decimal;
}

.trademark-guidelines img {
  display: block;
  width: 100px;
  height: auto;
  margin-right: 20px;
}

.trademark-guidelines h1 {
  text-align: center;
  margin: 10px 0 30px;
}

.warning {
  background: @highlight;
  padding: 5px 10px;
  margin: 1em 0;
}

.warning p {
  color: darken(@highlight, 80%);
}

.diagram {
  text-align: center;
}

.video {
  text-align: center;
}

.anchor-target {
  display: inline-block;
  position: absolute;
  box-sizing: content-box;
  left: -35px;
  width: 27px;
  height: 100%;
  padding-right: 10px;
  background: @anchor-icon;
  background-repeat: no-repeat;
  background-size: 22px 22px;
  background-position: 3px center;
  opacity: 0.5;

  &:hover {
    opacity: 1;
  }
}

.section-header {
  position: relative;
}

h1 .anchor {
  top: 23px;
}

h2 .anchor {
  top: 5px;
}

h3 .anchor {
  top: 3px;
}

.prev-next {
  border-top: 1px solid @darker-grey;
  color: @grey-primary;
  padding: 1rem 0;
  margin-top: 50px;
  display: block;
  font-family: 'Roboto Slab', serif;
  font-weight: 500;

  display: flex;
  flex-direction: row;
}

.prev-next .prev, .prev-next .next {
  flex-grow: 1;
}

.prev-next .next {
  text-align: right;
}

.prev-next .section-number {
  margin-left: .4rem;
  margin-right: .2rem;
  color: @grey-secondary;
}

.prev-next a {
  color: @light-grey;
  text-decoration: none;
}

.prev-next a:hover {
  text-decoration: underline;
}

a.github-user {
  font-weight: 600;
  color: @dark-grey;
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

@import "index.less";
@import "schema.less";

.toggleable.metric {
  margin-top: 1em;

  .toggle-title {
    background-color: @off-white;

    code {
      background: 0;
      padding: 0;
      border-radius: 0;
    }

    .metric-name {
      font-weight: bold;
    }

    .metric-labels {
      color: @grey-primary;

      .metric-label {
        color: @darker-grey;
      }
    }

    .metric-type {
      float: right;
      font-style: italic;
      color: @dark-grey;
    }
  }
}

.dim {
  opacity: 0.5;
}

.top-banner {
  background-color: @darkest-grey;
  color: white;
  font-family: 'Roboto Slab', serif;

  .banner-text {
    max-width: @page-width;
    margin: 0 auto;
    padding: 10px 0;
    text-align: center;
  }

  a {
    font-weight: bold;

    &, &:visited {
      color: @offest-white;
    }

    &:hover {
      color: white;
    }
  }
}
