@import '../../../helper/config.scss';

.demo {
  &-box {
    position: relative;
    display: inline-block;
    width: 100%;
    margin: 0 0 16px;
    border: 1px solid $normal-border;
    border-radius: 4px;
    transition: all 0.2s;
    box-sizing: border-box;

    & iframe {
      width: 100%;
      border: none;
    }
  }

  &-demo {
    padding: 42px 24px 50px;
    color: rgba(
      0,
      0,
      0,
      0.65
    );
  }

  &-deep {
    background: #f4f4f4;
    padding: 20px;
  }

  &-meta {
    position: relative;
    width: 100%;
    font-size: 14px;
    line-height: 2;
    border-radius: 0 0 4px 4px;
    transition: background-color 0.4s;
    border-top: 1px solid $normal-border;
    z-index: 2;
  }

  &-title {
    position: absolute;
    top: -16px;
    margin-left: 16px;
    padding: 1px 8px;
    color: $text-color;
    background: $normal-bg;
    border-radius: 4px 4px 0 0;
    transition: background-color 0.4s;
  }

  &-desc {
    padding: 18px 24px 12px;
    margin: 0;
  }

  &-actions {
    text-align: center;
    height: 40px;
    background: #fff;
    position: relative;

    &-on {
      border-bottom: 1px solid $normal-border;
    }

    &-btn {
      padding: 0 8px;
    }

    &-run {
      position: absolute;
      right: 16px;
      top: 50%;
      transform: translateY(-50%);
      color: $red-6;
    }

    &-panel {
      border-top: 1px dashed $normal-border;
      height: 40px;
    }
  }

  &-core {
    display: -none;
    overflow: auto;
    border-radius: 0 0 4px 4px;
    position: relative;
    z-index: 1;
  }

  &-nav {
    height: 40px;
    border-bottom: 1px solid $normal-border;
    display: flex;
    position: relative;

    &-btn {
      line-height: 40px;
      font-size: 12px;
      font-family: $family;
      color: $text-color;
      text-decoration: none;
      padding: 0 24px;
      border-right: 1px solid $normal-border;

      &-on {
        color: $blue-6;
      }
    }

    &-run {
      @extend .demo-nav-btn;

      position: absolute;
      right: 0;
      top: 0;
      border-right: none;
      color: $red-6;
    }
  }
}
