// Copyright 2017 Palantir Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0.

.docs-prop-details code {
  /* stylelint-disable declaration-no-important */
  background: none !important;
  box-shadow: none !important;
  color: inherit !important;
  font-size: small;
  font-weight: 600;
  padding: 0;
  /* stylelint-enable declaration-no-important */
}

.docs-prop-default {
  font-weight: 400;

  &:empty { display: none; }

  &::before {
    content: "=";
    display: inline-block;
    margin: 0 ($pt-grid-size * 0.5);
  }
}

.docs-prop-description {
  margin-top: $pt-grid-size * 0.5;

  p:last-child {
    margin: 0;
  }
}

.docs-prop-tags {
  &:empty { display: none; }

  .#{$ns}-tag {
    margin-right: $pt-grid-size;
    margin-top: $pt-grid-size * 0.5;
  }
}

.docs-prop-name code::after {
  @include pt-icon();
  line-height: small;
  margin-left: $pt-grid-size * 0.5;
  vertical-align: middle;
}

.docs-prop-is-deprecated code {
  color: $red3;

  &::after {
    content: map-get($blueprint-icon-codepoints, "small-cross");
  }
}

.docs-prop-is-required code {
  color: $green3;

  .#{$ns}-dark & {
    color: $green4;
  }

  &::after {
    content: map-get($blueprint-icon-codepoints, "small-tick");
  }
}

.docs-interface-header {
  align-items: center;
  box-shadow: 0 1px 0 $pt-divider-black;
  display: flex;
  font-family: $pt-font-family-monospace;
  font-size: $pt-font-size-large;
  font-weight: 600;
  justify-content: space-between;
  padding: $pt-grid-size 0;
  position: relative;

  // optional interface description
  + .docs-section {
    box-shadow: 0 1px 0 $pt-divider-black;
    display: flex;
    flex-direction: column;
    margin-top: $pt-grid-size;
  }

  .#{$ns}-dark & {
    box-shadow: 0 1px 0 $pt-dark-divider-white;

    + .docs-section {
      box-shadow: 0 1px 0 $pt-dark-divider-white;
    }
  }
}

.docs-package-name {
  // adjusts text baseline with interface name
  margin-top: $pt-font-size-large - $pt-font-size;
}

.docs-type-alias {
  overflow: auto;
  padding: $pt-grid-size ($pt-grid-size * 2);
}

.docs-modifiers-table {
  .docs-section & .#{$ns}-html-table {
    margin-top: $pt-grid-size;
  }

  th:first-child,
  td:first-child {
    padding-left: 0;
  }

  tr:last-child td {
    padding-bottom: 0;
  }
}

// modifiers table parent
.docs-modifiers {
  margin-bottom: $heading-margin;
  margin-top: $heading-margin * 0.5;
}
