@import '~ng-devui/styles-var/devui-var.scss';

@mixin tag-custom {
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 800;
  border-radius: 14px;
  letter-spacing: 0.6px;
  text-shadow: rgba(0, 0, 0, 0.16) 0 1px 1px;
}

:host ::ng-deep .devui-tag-item.update-custom {
  background-color: $devui-purple-10;
  color: $devui-purple-60;
  @include tag-custom;
}

:host ::ng-deep .devui-tag-item.sunset-custom {
  background-color: $devui-orange-10;
  color: $devui-orange-60;
  @include tag-custom;
}

.devui-overview-wrapper {
  .d-overview-introduce {
    h1 {
      margin: 32px 0 16px 0;
      display: flex;
      align-items: center;
      font-size: 36px;
      line-height: 44px;
    }

    .d-overview-total-components {
      margin-left: 8px;
      display: flex;
      align-items: center;
    }

    .d-overview-introduce-description {
      margin-bottom: 24px;
    }

    d-search {
      width: 100%;
    }

    .d-overview-filters {
      margin-top: 18px;
      display: flex;

      .d-overview-filters-title {
        margin-right: 8px;
        font-size: $devui-font-size-card-title;
        font-weight: $devui-font-title-weight;
      }

      .d-overview-filters-item {
        margin-right: 4px;
      }
    }
  }

  .d-overview-components {
    .d-overview-components-list {
      padding: 20px 0;

      .d-overview-component-title {
        margin: 12px 0;

        h2 {
          display: inline-block;
          margin: 0 8px 0 0;
          font-size: $devui-font-size-page-title;
        }

        .d-overview-component-count {
          display: inline-block;
          width: 16px;
          height: 16px;
          line-height: 16px;
          text-align: center;
          font-size: $devui-font-size;
          color: $devui-disabled-text;
          border: 1px solid $devui-disabled-line;
          border-radius: $devui-border-radius;
          background-color: $devui-disabled-bg;
        }
      }
    }
  }

  .d-overview-component-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;

    .d-component-place-holder,
    d-card {
      width: 320px;
      height: 0;
    }

    d-card {
      height: 240px;
      margin-bottom: 18px;
      cursor: pointer;
      background: $devui-base-bg;
      box-shadow: none;
      border: 1px solid $devui-dividing-line;
      transition: transform $devui-animation-duration-slow $devui-animation-ease-in-out-smooth;

      &:hover {
        box-shadow: 14px 14px 0 0 var(--devui-light-shadow, rgba(37, 43, 58, 0.1));
        transform: translate(-5px, -5px);
      }

      .d-overview-card-wrapper {
        text-align: center;
        position: relative;

        d-tag {
          position: absolute;
          top: 0;
          right: 0;

          & + d-tag {
            top: 24px;
          }
        }

        .d-overview-card-icon {
          padding: 20px 0;
          height: 150px;

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

        .d-overview-card-title {
          font-size: $devui-font-size-card-title;
          line-height: $devui-line-height-base;
          color: $devui-text-weak;
          font-weight: $devui-font-title-weight;
          margin-bottom: 10px;
        }

        .d-overview-card-description {
          color: $devui-aide-text;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
      }
    }
  }

  .d-overview-no-data {
    padding-top: 20px;

    .d-overview-no-data-title {
      font-size: $devui-font-size-page-title;
    }

    .d-overview-no-data-img {
      transform: translateX(-50%);
      margin: 20px 0;
      margin-left: 50%;
    }
  }
}

:host ::ng-deep d-tag {
  .devui-tag-item {
    cursor: pointer;
  }
}
