.demobox {
  position: relative;
  background: #fff;
  box-shadow: 0 0 6px rgba(0,0,0,.15);
  border: 1px solid #e9e9e9;
  border-radius: 6px;
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  -webkit-transition: all .2s ease;
          transition: all .2s ease;
}

.demobox-result {
  padding: 30px 20px;
}

.demobox-result:before {
  content: '';
  display: table;
}

.demobox-result:after {
  content: '';
  display: table;
  clear: both;
}

.demobox-meta {
  position: relative;
  padding: 15px 20px 10px;
  margin-top: 10px;
  border-radius: 0 0 6px 6px;
  font-size: 12px;
  border-top: 1px solid #e9e9e9;
}

.demobox-meta-collapse {
  position: absolute;
  right: 20px;
  top: -12px;
  cursor: pointer;
  width: 22px;
  height: 22px;
  font-size: 16px;
  line-height: 22px;
  text-align: center;
  -webkit-transition: all .3s;
  transition: all .3s;
  border: 1px solid #dfdfdf;
  color: #aaa;
  background: #fff;
  -webkit-user-select: none;
  user-select: none;
  border-radius: 100%;
}

.demobox-meta-collapse:hover {
  border-color: #d8d8d8;
  background-color: #f3f3f3;
}

.demobox-meta-collapse:after {
  content: '>';
  font-family: sans-serif;
}

.demobox-name {
  position: absolute;
  height: 24px;
  line-height: 24px;
  top: -14px;
  padding: 1px 8px;
  margin-left: -8px;
  font-size: 14px;
  font-weight: bold;
  color: #777;
  background: #fff;
  -webkit-transition: background-color .4s ease;
  transition: background-color .4s ease;
}

.demobox-intro p {
  margin: .6em 0;
}

.demobox-code-wrap {
  max-height: 0;
  opacity: 0;
  overflow: auto;
  -webkit-transition: all .4s ease;
  transition: all .4s ease;
  border-radius: 0 0 6px 6px;
}

.demobox-code figure.highlight {
  margin: 4px;
  border-radius: 6px;
}

.demobox-expand .demobox-meta-collapse {
  -webkit-transform: rotate(90deg);
  transform: rotate(90deg);
}

.demobox-expand .demobox-code-wrap {
  max-height: 600px;
  opacity: 1;
}
