@import '~scss/variables';
@import '~scss/mixins';

.repo {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  height: 64px;
  border-radius: 4px;
  background-color: #ffffff;
  border: solid 1px transparent;
  margin-bottom: 8px;
  transition: all $trans-speed ease-in-out;

  &:hover {
    box-shadow: 0 8px 16px 0 rgba(36, 46, 66, 0.08);

    .action {
      opacity: 1;
    }
  }

  .icon {
    flex-basis: 48px;
    min-width: 48px;
    height: 48px;
    width: 48px;
    line-height: 48px;
    margin-right: 20px;

    svg {
      height: 48px;
      width: 48px;
    }
  }

  .info {
    flex-grow: 1;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;

    .name {
      line-height: 20px;
      font-size: 12px;
      font-weight: bold;
      color: #242e42;
    }

    .desc {
      line-height: 20px;
      color: $dark-grey;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }
  }

  .action {
    padding-top: 4px;
    opacity: 0;
    flex-basis: 100px;
    transition: all $trans-speed ease-in-out;
  }
}

.clickable {
  color: $green;
  cursor: pointer;
  margin-left: 15px;
}

.orgList {
  flex-basis: 332px;
  min-width: 332px;
  height: 300px;
  overflow: auto;

  :global {
    .spin-nested-loading {
      width: 100%;
      height: 100%;
    }

    .spin-container {
      width: 100%;
      height: 100%;
    }
  }
}

.repo {
  display: flex;
  padding: 12px 20px;
  background-color: white;
  margin-bottom: 8px;
  border: solid 1px $light-color03;
  border-radius: 4px;
  cursor: pointer;

  &:hover {
    box-shadow: 0 8px 16px 0 rgba(36, 46, 66, 0.08);
  }
}

.repo-active {
  border-color: $green;
}

.avatar {
  flex-basis: 32px;
  height: 32px;

  img {
    width: 32px;
    height: 32px;
  }

  margin-right: 16px;
}

.name {
  line-height: 32px;
}

.repoListContainer {
  flex-grow: 1;
  padding-right: 12px;
  margin-left: 12px;
  height: 310px;
  border-radius: 4px;
  min-width: 560px;
  display: flex;
  flex-direction: column;

  .search {
    width: 100%;
    margin-bottom: 10px;
    input {
      width: 100%;
    }
  }

  .repoList {
    overflow: auto;
    position: relative;
    flex: 1 1;

    :global {
      .spin-nested-loading,
      .spin-container {
        height: 100%;
      }
    }

    .repoListBox {
      padding: 12px;
      background-color: $bg-color;
    }

    .placeHolder {
      text-align: center;

      img {
        max-height: 120px;
        margin-top: 50px;
      }

      .title {
        margin-top: 40px;
        font-size: 16px;
        font-weight: 600;
        color: #abb4be;
      }
    }
    .empty {
      margin-top: 0;
      box-shadow: none;
      height: 100%;
    }
  }
}

.emptyRepoList {
  flex-grow: 1;
  padding: 12px;
  overflow: auto;
  margin-left: 12px;
  height: 310px;
  border-radius: 4px;
  background-color: $bg-color;
  min-width: 560px;
  position: relative;

  .placeHolder {
    text-align: center;

    img {
      max-height: 120px;
      margin-top: 50px;
    }

    .title {
      margin-top: 40px;
      font-size: 16px;
      font-weight: 600;
      color: #abb4be;
    }
  }
}

.tabContent {
  display: flex;
}

.card {
  padding: 12px;
  border-radius: 4px;
  background-color: #ffffff;
  border: solid 1px $light-color03;
  @include clearfix;
}

.loadMore {
  text-align: center;
  color: #79879c;
  margin: 0 auto;
  display: flex;
  span {
    padding: 0 2em;
  }
  &:before,
  &:after {
    content: '';
    flex: 1;
    background: linear-gradient(transparent 50%, #ccc 50%, transparent 54%);
  }
}

.confirmButton {
  float: right;
  margin-top: 12px;
}
