/* ==========================================================================
   API
   ========================================================================== */

.api {
  font-family: $font-secondary;
}

.api section {
  border: 1px solid $gray-lighter;
  margin: 20px 0px;
  padding: 20px;
}

.api .sidebar {
  height: 100vh;
}

.api .sidebar-list {
  height: auto;
  overflow: visible;
}

.api .sidebar-list-1 .sidebar-link {
  padding: 12px;
}

.api .card {
  background: $white;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(14, 20, 26, .1);
  position: relative;
}

.api .entity-filter {
  margin-top: 20px;
  padding: 20px;
}

.api .entity-container {
  &.public {
    .entity[data-access="public"] {
      display: none;
    }
  }

  &.protected {
    .entity[data-access="protected"] {
      display: none;
    }
  }

  &.private {
    .entity[data-access="private"] {
      display: none;
    }
  }
}

.api .entity .entity-name {
  margin-top: 0;
  max-width: 65%;
  word-break: break-word;
}

.api .entity-name-type, .api .entity-access {
  color: $gray-light;
}

.api .entity-link {
  position: absolute;
  right: 20px;
  text-decoration: underline;
  top: 20px;

  @media (max-width: $screen-md) {
    position: static;
  }
}

.api .version-dropdown {
  z-index: 2000;

  .btn {
    padding: 0 20px;

    span {
      padding: 0 5px;
      vertical-align: text-top;
    }
  }

  .dropdown-menu {
    margin-left: -20px;

    a {
      border-width: 0;
      font-size: 16px;
    }
  }

  .toggler-collapsed {
    display: block;
  }
}

@media (max-width: $screen-md) {
  .api {
    display: flex;
    flex-direction: column;

    .sidebar {
      height: auto;
    }

    .sidebar-offset {
      display: flex;
      flex-direction: column;
    }
  }
}

.entity-description, .entity-params, .entity-returns {
  margin: 20px 0;
}

.entity-params .table {
  width: 100%;
}

.entity-members h2 {
  margin: 40px 0 20px;
}
