@import '~@cainiaofe/cn-ui-m-theme/token.px.scss';
@import '../../styles/mixins.scss';

$class-prefix: 'cn-ui-m';

.#{$hashClassName}.cn-ui-m-card-items-container {
  .#{$class-prefix}-card-items {
    &-body {
      text-align: center;
    }

    &-card {
      margin-top: $m-s-12;
      cursor: pointer;

      &:first-child {
        margin-top: 0;
      }

      &-with-detail * {
        pointer-events: none;
      }

      .cn-ui-m-card-items-card-row-label {
        font-size: $m-s-14;
        color: #666;
        text-align: left;
      }

      .cn-ui-m-card-items-card-row-value {
        font-size: $m-s-14;
        color: #333;
        word-break: break-all;
        overflow: hidden;

        &-link {
          color: $m-color-primary;
          cursor: pointer;
        }
      }

      &-row {
        width: 100%;
        margin-top: $m-s-12;

        &:first-child {
          margin-top: 0;
        }
      }

      &-row-left {
        display: flex;
        line-height: $m-s-16;

        .cn-ui-m-card-items-card-row-label {
          width: 5em;
          margin-right: $m-s-12;
          line-height: $m-s-16;
        }

        .cn-ui-m-card-items-card-row-value {
          flex: 1;
          line-height: $m-s-16;
        }
      }

      &-row-top {
        line-height: $m-s-21;
      }
    }

    &-format {
      &-more {
        line-height: $m-s-20;
        padding: 0 $m-s-4;
        background: $m-color-bg-light;
        border-radius: $m-s-4;
        font-size: $m-font-size-caption;
      }

      &-file {
        margin: 0;
        border: 0;

        &-ext {
          height: $m-s-20;

          > div {
            height: 100%;
          }

          img {
            max-width: 100%;
            max-height: 100%;
          }
        }
      }

      &-user {
        &-item {
          display: flex;
          align-items: center;

          > img {
            max-width: $m-s-16;
            max-height: $m-s-16;
            margin-right: $m-s-4;
            border-radius: 50%;
          }
        }

        &-depart {
          height: $m-s-20;
          padding: 0 $m-s-8;
          border-radius: 10px;
          background-color: $m-color-text-tip;
          color: $m-color-bg-white;
          margin-left: 5px;
          display: inline-flex;
          align-items: center;
          justify-content: center;
        }
      }

      &-image-text {
        &-img {
          display: flex;
          align-items: center;
          justify-content: center;
          width: $m-s-70;
          height: $m-s-70;
          background-size: cover;
          background-repeat: no-repeat;
          background-position: 50% 50%;
          border-radius: $m-s-8;
          overflow: hidden;

          &.format-is-simple {
            width: $m-s-42;
            height: $m-s-42;
          }
        }

        > * {
          margin-top: $m-s-6;

          &:first-child {
            margin-top: 0;
          }
        }

        &-title {
          display: flex;
          font-size: $m-font-size-body-1;
          line-height: $m-font-lineheight-3;
        }

        &-content {
          display: flex;
          color: $m-color-text-tip;
          font-size: $m-font-size-caption;
          line-height: $m-font-lineheight-2;
        }
      }
    }
  }
}
