@import './../mixins/index.scss';

$prefixCls: card-frame;

.#{$prefixCls} {
  @include reset-component2;

  display: inline-block;
  width: 45em;
  height: 20em;
  margin: 0.5em 0.7em;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.3);
  box-shadow: 0 2px 8px rgba(43, 22, 54, 0.2);

  &.#{$prefixCls}-add {
    line-height: 4;
    color: white;
  }

  .card-header {
    display: flex;
    height: 3em;
    padding: 0.3em;
    font-size: 12px;
    color: white;
    cursor: move;
    background: rgba(0, 0, 0, 0.15);
    transition: background-color;
    transition-duration: 0.2s;
    backface-visibility: hidden;
    justify-content: space-between;
    align-items: center;

    .card-header-title {
      display: inline-block;
      height: 1.8em;
      padding: 0;
      font-size: 13px;
      font-weight: normal;
    }

    .card-header-operate {
      cursor: pointer;
    }

    &:hover {
      .card-header-operate {
        display: block;
      }
    }
  }

  .card-body {
    display: flex;
    width: 100%;
    height: calc(100% - 3em);
    padding: 0.5em;
    overflow: hidden;
    cursor: default;
    outline: none;
    flex-flow: row wrap;
    align-content: flex-start;

    .card-item {
      display: flex;
      background-color: rgba(255, 255, 255, 0.1);
      border-color: rgba(213, 208, 215, 0.2);
      border-style: solid;
      border-width: 0 1px 1px 0;
      box-sizing: border-box;
      flex: 0 0 50%;
      justify-content: space-between;
      align-items: center;

      &:hover {
        background-color: rgba(82, 108, 253, 0.15);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
      }
    }
  }
}

.card-app-item {
  height: 4em;
  padding: 0.1em 1em;
  color: white;
  cursor: pointer;
  transition: background-color;
  transition-duration: 0.2s;
  backface-visibility: hidden;

  .item-title {
    img {
      width: 2em;
      height: 2em;
    }

    .title-content {
      float: right;
      padding: 0 1em;
      font-size: 14px;
      line-height: 2;
    }
  }

  .item-info {
    span {
      color: rgba(255, 255, 255, 0.6);
      text-align: right;
    }
  }
}

.align-center {
  text-align: center;
}
