
@import './variables.scss';
@import '~@alifd/next/lib/core/style/_global';
@import '~@alifd/next/lib/core/style/_motion';
@import '~@alifd/next/lib/card/scss/variable';
@import '~@alifd/next/lib/card/scss/mixin';

.#{$css-prefix}card {
  .#{$css-prefix}card-header {
    margin-bottom: 0;

    .#{$css-prefix}card-header-title {
      height: $s-6;
      line-height: $s-6;
    }

    .#{$css-prefix}card-header-subtitle {
      margin-top: $s-1;
      line-height: 18px;
      height: 18px;
    }

    .#{$css-prefix}card-header-extra {
      line-height: 24px;
      color: $color-text1-2;

      .#{$css-prefix}-icon-button {
        color: $color-fill1-5;

        &:hover {
          color: black;
        }
      }

      .#{$css-prefix}btn-helper {
        padding-top: $b-design-card-link-btn-helper-top;
        vertical-align: top;
      }
    }
  }

  .#{$css-prefix}card-content-container {
    margin-top: $s-3;
    line-height: 18px;
  }

  // 行动按钮/icon设置
  .#{$css-prefix}card-actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
    padding-top: 0;
    padding-bottom: $s-4;

    .#{$css-prefix}btn {
      flex: 1;
    }

    &.#{$css-prefix}card-btn-action-reverse {
      flex-direction: row-reverse;

      .btn-ok {
        margin-right: $s-2;
      }

      .btn-cancel {
        margin-right: 0;
      }
    }

    &.#{$css-prefix}card-btn-action-only-cancel {
      flex-direction: row-reverse;

      .btn-ok {
        visibility: hidden;
      }
    }

    &.#{$css-prefix}card-btn-action-only-ok {
      .btn-cancel {
        visibility: hidden;
      }
    }

    // 点赞收藏底部定制
    &.#{$css-prefix}card-social-action {

      .cardtags,
      .cardlike,
      .cardshare {
        padding: 0 $s-3;
        flex: 1;
        cursor: pointer;
        color: $color-fill1-5;

        &:hover {
          color: black;
        }
      }

      .cardtags {
        border-right: $b-design-card-action-social-border;
      }

      .cardlike {
        text-align: center;
        border-right: $b-design-card-action-social-border;
      }

      .cardshare {
        text-align: end;
      }
    }
  }

  // 带media的card
  .#{$css-prefix}card-media:not(.#{$css-prefix}full-media) {
    display: flex;
    justify-content: center;
    padding: 0 $s-6;
    margin-top: 12px;

    img,
    video {
      border-radius: 4px;
    }

  }


}

// 横向
.#{$css-prefix}card-horizontal {
  display: flex;
  justify-content: space-between;
  width: fit-content;

  .#{$css-prefix}card-media:not(.#{$css-prefix}full-media) {
    height: 100%;
    width: auto;
    flex-shrink: 0;
    margin: 24px 16px 24px 24px;
    padding: 0px;
  }

  .#{$css-prefix}card-header {
    padding-left: 0px;
  }

  .#{$css-prefix}card-content-container {
    padding-left: 0px;
  }
}