
// ----------------- Bits and pieces from kotlinlang.org reference -----------------

body {
  -webkit-font-smoothing: antialiased;
  font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  text-decoration: underline;
}

$vertical-rhythm-unit: 15px !global;

h1 {
  margin-top: $vertical-rhythm-unit * 2;
  margin-bottom: $vertical-rhythm-unit;
  font-size: 30px;
  line-height: 33px;

  &:first-of-type {
    margin-top: 0;
    margin-bottom: $vertical-rhythm-unit * 2;
  }

  @media print {
    page-break-before: always;
    page-break-after: avoid;
  }

  &%_section-title {
    padding-top: 140px;
    margin-bottom: 45px;
    font-size: 55px;
    line-height: 65px;
    font-weight: bold;
  }
}

h2 {
  margin-top: $vertical-rhythm-unit * 2;
  margin-bottom: $vertical-rhythm-unit;
  font-size: 24px;
  line-height: 27px;

  &:first-of-type {
    margin-top: 0;
  }

  @media print {
    page-break-after: avoid;
  }
}

h3 {
  margin-top: $vertical-rhythm-unit * 2;
  margin-bottom: $vertical-rhythm-unit;
  font-size: 19px;
  line-height: 22px;

  @media print {
    page-break-after: avoid;
  }
}

h4 {
  margin-top: $vertical-rhythm-unit * 2;
  margin-bottom: $vertical-rhythm-unit;
  font-size: 16px;
  line-height: 20px;
  font-weight: bold;

  @media print {
    page-break-after: avoid;
  }
}

h5 {
  margin-top: $vertical-rhythm-unit * 2;
  margin-bottom: $vertical-rhythm-unit;
  font-size: 16px;
  line-height: 20px;
  font-weight: normal;

  @media print {
    page-break-after: avoid;
  }
}

caption {margin: 0;}

$vertical-rhythm-unit: 15px !global;

// tables

table {
  margin-bottom: $vertical-rhythm-unit*2;
  line-height: inherit;
  font-size: inherit;
  border: 1px solid #dcdcdc;

  // Remove most spacing between table cells
  border-collapse: collapse;
  border-spacing: 0;

  &.zebra {
    tbody tr:nth-child(odd) {
      background-color: #f5f5f5;
    }
  }

  &.wide {
    min-width: 100%;
  }

  // Table header
  thead {
    background-color: #F7F7F7;
    border-bottom-width: 2px;
  }

  // Table footer
  tfoot {
    color: #ccc;

    tr {border-bottom: none;}
  }

  // Row
  tr {
    border-bottom: 1px solid #dcdcdc;
  }

  // Header cell
  th {
    padding-top: 10px;
    padding-bottom: 6px;
    text-align: left;
    font-weight: bold;
  }

  // Cell
  th,
  td {
    padding: 6px 10px;
    vertical-align: top;

    &:first-child {
      padding-left: 12px;
    }

    &:last-child {
      padding-right: 12px;
    }
  }

  // ???
  p:last-child,
  pre:last-child {
    margin-bottom: 0;
  }
}

.api-docs-breadcrumbs {
  margin-bottom: 25px;
}

// code

$font-family-mono: 'Liberation Mono', Consolas, Menlo, Courier, monospace !global;
$code-background: #efefef;

pre {
  background-color: $code-background;
  overflow: auto;
}

code {
  font-family: $font-family-mono;
  font-style: normal;
  background-color: $code-background;
}

code :target {
  background-color: #FFFFCC;
}

// kotlin syntax highlight

.signature {
  background-color: $code-background;
  padding: 4px;
}

.keyword {
  color: #0000C0;
}

.summarizedTypeName {
  background-color: lightcyan;
  font-style: italic;
}

.parameterName {
  font-weight: bold;
}

// MPP projects

.tags {
  display: flex;
}

.tags__tag {
  color: white;
  font-weight: bold;
  text-transform: uppercase;
  background: #a7a7a7;
  padding: 0 7px;
  font-size: 10px;
  border-radius: 9px;
  line-height: 18px;
  margin-right: 5px;
}