@import '../../style/variable';
@import '../../style//mixins/text.scss';
@import './token';

.#{$namespace} {
  &-dataset-card {
    flex: 1;
    min-width: 260px;
    padding-bottom: 26px;
    overflow: hidden;
    background-color: $white;
    border: #{$border-1} #{$border-solid} #{$color-border-1};
    border-radius: $border-radius-large;
    transition: all 0.2s;

    &:hover {
      box-shadow:
        0 6px 12px 5px rgb(52 103 166 / 10%),
        0 -2px 10px 0 rgb(0 0 0 / 10%);
      opacity: 0.9;
    }

    &__img {
      width: 100%;
      height: $dataset-card-img-height;
      margin-bottom: $spacing-10;

      &--error {
        background-color: rgb(216 216 216 / 100%);
      }

      & > img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
    }

    &__head {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
      margin-bottom: $spacing-5;
      padding-right: $spacing-5;
      padding-left: $spacing-5;

      &-title {
        padding-right: 6px;
        color: rgb(0 0 0 / 85%);
        font-weight: bold;
        font-size: 16px;
        line-height: 16px;
        @include text-ellipsis;
      }

      &-action {
        padding-right: $spacing-5;
        white-space: nowrap;

        &-button:not(:last-child) {
          margin-right: $spacing-10;
        }
      }
    }

    &__desc {
      height: 60px;
      margin-bottom: $spacing-6;
      padding-right: $spacing-6;
      padding-left: $spacing-6;
      overflow: hidden;
      color: rgb(0 0 0 / 85%);
      font-weight: 400;
      font-size: 12px;
      line-height: 20px;
      text-align: left;
      @include clamp-line(3);
    }

    &__tags {
      display: flex;
      flex-direction: row;
      align-items: flex-start;
      margin-bottom: $spacing-2;
      padding-right: $spacing-6;
      padding-left: $spacing-6;

      &-left {
        min-width: 60px;
        color: rgb(0 0 0 / 65%);
        font-weight: 400;
        font-size: 12px;
        line-height: 26px;
      }

      &-right {
        flex: 1;
        @include text-ellipsis;

        &-tag {
          margin-right: 8px;
          margin-bottom: 8px;

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

    &__label1 {
      display: flex;
      flex-direction: row;
      align-items: center;
      margin-bottom: $spacing-6;
      padding-right: $spacing-6;
      padding-left: $spacing-6;

      &-left {
        min-width: 60px;
        color: rgb(0 0 0 / 65%);
        font-weight: 400;
        font-size: 12px;
      }

      &-right {
        flex: 1;
        color: rgb(0 0 0 / 85%);
        font-weight: 400;
        font-size: 12px;
        @include text-ellipsis;
      }
    }

    &__label2 {
      display: flex;
      flex-direction: row;
      align-items: center;
      padding-right: $spacing-6;
      padding-left: $spacing-6;

      &-left {
        min-width: 60px;
        color: rgb(0 0 0 / 65%);
        font-weight: 400;
        font-size: 12px;
      }

      &-right {
        flex: 1;
        color: rgb(0 0 0 / 85%);
        font-weight: 400;
        font-size: 12px;
        @include text-ellipsis;
      }
    }
  }
}
