@import './codemirror.scss';
@import './prism.scss';

.demo-block {
  border: solid 1px #eaeefb;
  border-radius: 4px;
  transition: 0.2s;

  &:hover {
    box-shadow: 0 0 8px 0 rgba(232, 237, 250, .6), 0 2px 4px 0 rgba(232, 237, 250, .5);
  }

  .source {
    position: relative;
    padding: 24px;
  }

  .meta {
    position: relative;
    overflow: hidden;
    background-color: #f9fafc;
    border-top: solid 1px #eaeefb;
  }

  .highlight {
    overflow: auto;
    border-right: 1px solid #eaeefb;
  }

  .description {
    padding: 20px;
    height: 100%;
    box-sizing: border-box;
    border-radius: 3px;
    border: 1px solid #eaeefb;
    font-size: 14px;
    line-height: 22px;
    color: #666;
    word-break: break-word;
    margin: 10px;
    background: #fff;

    p {
      margin: 0;
    }

    code {
      color: #5e6d82;
      background-color: #e6effb;
      margin: 0 4px;
      display: inline-block;
      padding: 1px 5px;
      font-size: 12px;
      border-radius: 3px;
      height: 18px;
      line-height: 18px;
    }
  }

  .demo-block-control {
    border-top: solid 1px #eaeefb;
    height: 36px;
    box-sizing: border-box;
    background-color: #fff;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    text-align: center;
    margin-top: -1px;
    color: #d3dce6;
    cursor: pointer;
    transition: 0.2s;
    position: relative;

    i {
      font-size: 12px;
      line-height: 36px;
      margin-right: 5px;
    }

    span {
      display: inline-block;
      font-size: 14px;
      line-height: 36px;
    }

    .code-pen {
      float: right;
      opacity: 0;
      text-decoration: none;
      color: #20a0ff;
      font-size: 14px;
      line-height: 36px;
      margin-right: 20px;

      &:hover {
        color: #66b1ff;
      }
    }

    &:hover {
      color: #20a0ff;
      background-color: #f9fafc;

      span {
        opacity: 1;
        transform: translateX(0);
      }

      .code-pen {
        opacity: 1;
        transform: translateX(0);
      }
    }

  }

  .style-block {
    padding: 10px;
    border-top: 1px dashed #ebedf0;
    max-height: 250px;
    overflow-y: auto;
  }
}