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

.item {
  position: relative;
  padding: 11px 12px;
  margin-bottom: 8px;
  border-radius: 4px;
  background-color: $white;
  border: solid 1px $border-color;
  transition: all $trans-speed ease-in-out;

  &:last-child {
    margin-bottom: 0;
  }

  .wrapper {
    position: relative;
    display: flex;
    align-items: center;
  }

  &:hover {
    border-color: $border-hover-color;
    box-shadow: 0 4px 8px 0 rgba(36, 46, 66, 0.2);

    :global .buttons {
      display: block;
    }
  }

  :global .buttons {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    height: 32px;
    padding: 0px 4px;
    border-radius: 4px;
    background-color: #fff;

    & > button {
      width: 56px;
      margin-left: 4px;
    }
  }
}

.icon {
  position: relative;
  margin-right: 12px;
  & > img {
    width: 40px;
    height: 40px;
  }

  .indicator {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 8px;
    height: 8px;
  }
}

.texts {
  display: flex;
  overflow: hidden;
  flex: 1;
}

.text {
  min-width: 160px;
  padding-right: 20px;

  &:first-of-type {
    min-width: 200px;
  }

  .title {
    @include ellipsis;
    @include TypographyTitleH6($dark-color07);
  }

  .description {
    @include ellipsis;
    @include TypographyParagraph($dark-color01);
  }
}

.add {
  position: relative;
  padding: 11px 12px;
  border-radius: 4px;
  border: 1px dashed $border-color;
  background-color: $white;
  cursor: pointer;
  transition: all $trans-speed ease-in-out;

  &.withIcon {
    padding-left: 64px;
  }

  &:hover {
    box-shadow: 0 4px 8px 0 rgba(36, 46, 66, 0.2);
    border-color: $border-hover-color;
  }

  &.empty {
    height: auto;
    padding: 28px 0;
    text-align: center;

    .icon {
      position: relative;
      left: 0;
      top: 0;
      transform: none;
      margin: 0 auto;
      margin-bottom: 4px;
    }
  }
}
